Class SBGRenderSTLObject#
ClassList > SBGRenderSTLObject
The class can be used to load and display 3D objects from STL files.
#include <SBGRenderSTLObject.hpp>
Public Functions#
| Type | Name |
|---|---|
| SBGRenderSTLObject (const std::string & fileName, bool smoothed) Builds an STL object renderer from the STL file fileName . |
|
| virtual void | display (const SBSpatialTransform & transform, float * color) Displays the STL object. |
| virtual void | display (const SBSpatialTransform & transform, unsigned int nodeIndex) Displays the STL object. |
| virtual | ~SBGRenderSTLObject () Destructor. |
Protected Attributes#
| Type | Name |
|---|---|
| SBGRenderSTLObjectData * | dataPointer A pointer to the private data. |
Public Functions Documentation#
function SBGRenderSTLObject#
Builds an STL object renderer from the STL file fileName .
Constructs an SBGRenderSTLObject and loads an STL file.
This constructor initializes the object and loads the geometry from the specified STL file. The fileName parameter specifies the path to the STL file. The smoothed flag indicates whether the loaded geometry should be smoothed during loading.
Parameters:
fileNamePath to the STL file to load.smoothedIf true, the geometry is smoothed during loading; otherwise it is loaded as‑as.
function display [1/2]#
Displays the STL object.
Displays the STL object using the given spatial transform and color.
This function renders the object at the position and orientation defined by transform, applying the specified color to the geometry.
Parameters:
transformSpatial transform that defines the object's position, rotation, and scaling.colorPointer to an array of three floats representing the RGB color components.
function display [2/2]#
Displays the STL object.
virtual void SBGRenderSTLObject::display (
const SBSpatialTransform & transform,
unsigned int nodeIndex
)
Displays the STL object for a specific node selection.
This overload renders the object using the given spatial transform, highlighting or otherwise indicating the node identified by nodeIndex.
Parameters:
transformSpatial transform that defines the object's position, rotation, and scaling.nodeIndexIndex of the node to be highlighted or selected during rendering.
function ~SBGRenderSTLObject#
Destructor.
Destroys the SBGRenderSTLObject and releases associated resources.
Protected Attributes Documentation#
variable dataPointer#
A pointer to the private data.