mesh

package module
v0.0.0-...-3218f21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2016 License: MIT Imports: 6 Imported by: 0

README

go-mesh

A modular, idiomatic library for working with 3D triangle meshes in Go.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsFormat

func IsFormat(err error) bool

func IsSize

func IsSize(err error) bool

Types

type ArrayBuffer

type ArrayBuffer []Triangle

func (*ArrayBuffer) ConvertFrom

func (this *ArrayBuffer) ConvertFrom(mesh Mesh)

func (*ArrayBuffer) NumTriangles

func (this *ArrayBuffer) NumTriangles() int

type Box

type Box struct {
	LowerBound, UpperBound vec3.T
}

func (Box) BoundTriangle

func (this Box) BoundTriangle(tri Triangle)

func (Box) BoundTriangles

func (this Box) BoundTriangles(tris ...Triangle)

type Face

type Face [3]uint16

type IndexBuffer

type IndexBuffer struct {
	Vertices []vec3.T
	Faces    []Face
}

func (*IndexBuffer) ConvertFrom

func (this *IndexBuffer) ConvertFrom(mesh Mesh)

func (*IndexBuffer) NumTriangles

func (this *IndexBuffer) NumTriangles() int

type Mesh

type Mesh interface {
	NumTriangles() int

	ConvertFrom(Mesh)
	// contains filtered or unexported methods
}

type StlFile

type StlFile struct {
	// contains filtered or unexported fields
}

StlFile reads from an existing .stl file or creates a new one if it doesn't exist.

func NewStlFile

func NewStlFile(filepath string) (*StlFile, error)

func (*StlFile) ConvertFrom

func (this *StlFile) ConvertFrom(mesh Mesh)

func (*StlFile) NumTriangles

func (this *StlFile) NumTriangles() int

type Triangle

type Triangle [3]vec3.T

Directories

Path Synopsis
src
svx

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL