Documentation
¶
Overview ¶
Package gomesh provides functions for basic handling of 3D mesh data in Go.
Index ¶
Constants ¶
const ( X = iota Y Z )
Axis definitions
Variables ¶
var ErrInvalidMesh = errors.New("invalid Mesh data")
ErrInvalidMesh is returned when a decoding function can not make a valid mesh from the data
var ErrUnsupportedOBJ = errors.New("unsupported OBJ Format")
ErrUnsupportedOBJ is returned when DecodeOBJ can not parse the data
var ErrVertexNotFound = errors.New("vertex not found")
ErrVertexNotFound is returned when the FindVertex() function does not find the vertex
Functions ¶
This section is empty.
Types ¶
type Face ¶
type Face struct {
Vertices []int
}
Face contains a list of points (as a slice of mesh vertex ids) which describe the face's 3D structure
type Mesh ¶
Mesh is composed of one or multiple faces
func (*Mesh) AddPlane ¶
AddPlane generates a plane with the size of {w,h} with offset z. The function panics if the axis parameter is invalid.
func (*Mesh) AddVertex ¶
AddVertex creates a vertex at the given position if there is not already a vertex. Returns the vertex id
func (Mesh) FindVertex ¶
FindVertex searches for a vertex at the given position