class
DrawHelper
Helper class for immediate drawing of common geometric shapes.
Public
Constructors
DrawHelper
Methods
SetColor
Sets a color that will be used for any shapes recorded after this call.
SetTransform
Sets a transform matrix that will be used for any shapes recorded after this call.
SetLayer
Sets the layer bitfield that can be used for filtering which objects are output into the final mesh.
Cube
Records a solid cuboid with the specified properties in the internal draw queue.
Sphere
Records a solid sphere with the specified properties in the internal draw queue.
WireCube
Records a wireframe cube with the specified properties in the internal draw queue.
WireSphere
Records a wireframe sphere with the specified properties in the internal draw queue.
WireHemisphere
Records a wireframe hemisphere with the specified properties in the internal draw queue.
Line
Records a line with the specified properties in the internal draw queue.
LineList
Records a list of lines in the internal draw queue.
The list must contain lines as pair of vertices, starting point followed by an end point, and so on.
Frustum
Records a wireframe frustum with the specified properties in the internal draw queue.
Cone
Records a solid cone with the specified properties in the internal draw queue.
WireCone
Records a wire cone with the specified properties in the internal draw queue.
Disc
Records a solid disc with the specified properties in the internal draw queue.
WireDisc
Records a wireframe disc with the specified properties in the internal draw queue.
Arc
Records a solid arc with the specified properties in the internal draw queue.
WireArc
Records a wireframe arc with the specified properties in the internal draw queue.
WireMesh
Records a 3D mesh to be drawn as wireframe in the internal draw queue.
Rectangle
Records a solid rectangle with the specified properties in the internal draw queue.
Text
Records a mesh representing 2D text with the specified properties in the internal draw queue.
Clear
Clears all recorded shapes.
BuildMeshes
Generates a set of meshes from all the recorded solid and wireframe shapes.
The meshes can be accessed via getMeshes() and released via clearMeshes().
- sorting
- (optional) Determines how (and if) should elements be sorted based on their distance from the reference point.
- camera
- (optional) Camera through which the meshes will be rendered.
- layers
- (optional) Layers bitfield that can be used for controlling which shapes will be included in the mesh. This bitfield will be ANDed with the layer specified when recording the shape.
Returns: Generated mesh data.