Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Prec = 10
Prec sets the precision when writing .obj data.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct { Mesh // contains filtered or unexported fields }
Builder is inteded to help build meshes. Extrusions are more useful and this will probably be deprecated.
type Extrusion ¶
type Extrusion struct {
// contains filtered or unexported fields
}
Extrusion creates a mesh by extruding the perimeter by transormations.
func NewExtrusion ¶
NewExtrusion takes a face as the start of an extrusion.
func (*Extrusion) EdgeExtrude ¶
EdgeExtrude performs an extrusion then subdivides each edge in to 3 segments. The points from the starting permeter are lined to the subdivision points. This allows the extrusion to increase the number of facets.
type Mesh ¶
Mesh defines a solid with polygon facets.
func (Mesh) TriangleMesh ¶
func (m Mesh) TriangleMesh() (TriangleMesh, error)
TriangleMesh generated from a normal mesh.
type TriangleMesh ¶
TriangleMesh is a mesh comprised only of triangles.
func (TriangleMesh) Edges ¶
func (m TriangleMesh) Edges() (original []solid.IdxEdge, subFacet []solid.IdxEdge)
Edges returns the edges in the mesh. Original contains the edges that were in the original mesh and subFacet is the edges creates when facets were subdivided into triangles.
func (TriangleMesh) Face ¶
func (m TriangleMesh) Face(idx int) [][3]d3.Pt
Face converts a face from index values to Pt values.
func (TriangleMesh) GetTriangleCount ¶
func (m TriangleMesh) GetTriangleCount() int
GetTriangleCount returns the number of triangles in a mesh.
func (TriangleMesh) T ¶
func (m TriangleMesh) T(t *d3.T) TriangleMesh
T applies a transformation to all the points in the mesh.