The PolyhedronGeom class stores a collection of general planar concave polygons that may also contain holes. Each polygon is described by a sequence of vertex loops. The first loop defines the polygon boundary and each subsequent loop describes a hole. Each loop is a sequence of vertex indices.
Creates an empty polyhedron.
A PolyhedronGeom has the following slots:
Slot | Type | Access | Description |
---|---|---|---|
verts_slot | vec3 array | rw | The polygon vertices |
This attribute contains the sequence of polygon vertices.
Return True if there is at least one polygon with a hole.
Return the number of polygons.
Return the number of vertex loops in the polygon with index poly.
Return the number of vertex indices in one particular loop. poly is the polygon index and loop the loop index.
Allocate space for num polygons.
Allocate space for num loops in the polygon with index poly.
Return a loop from a polygon. poly is the polygon index and loop the loop index. The return value is a sequence of vertex indices.
Set a new polygon loop. poly is the polygon index, loop the loop index and vloop a sequence of vertex indices.
Return a polygon. poly is the polygon index. The return value is a sequence of vertex loops.
Set a polygon. poly is the polygon index and polydef a sequence of vertex loops.