raisin::CoordinateFrame
class · #include <rayrai/CoordinateFrame.hpp>
Render helper for visualizing multiple coordinate frames.
Nested classes
structPose — Pose definition for a single coordinate frame.
Constructors & destructor
CoordinateFrame
cpp
CoordinateFrame(std::shared_ptr<RayraiGlobalAsset> &asset)Construct a coordinate frame visualizer.
Parameters
| Parameter | Description |
|---|---|
asset | Shared asset cache; the shared unit-cylinder axis mesh is fetched from it once here. |
~CoordinateFrame
cpp
~CoordinateFrame()Public member functions
draw
cpp
void draw(Shader &shader)Draws all coordinate frames in poses without culling.
Each axis is drawn as a cylinder (X red, Y green, Z blue) by setting the model and objectColor uniforms. The shader is not bound here, so shader must already be in use. Requires a current OpenGL context.
Parameters
| Parameter | Description |
|---|---|
shader | The shader program to use for rendering. |
cpp
void draw(Shader &shader, const glm::mat4 &viewProjection, bool boundShader)Variant that also frustum-culls poses against viewProjection.
Parameters
| Parameter | Description |
|---|---|
shader | Shader that must already be in use. |
viewProjection | Camera view-projection matrix; an all-zero matrix disables culling. |
boundShader | Unused; kept for API parity (neither overload binds the shader). |
enable
cpp
void enable(bool enable)Enables or disables rendering of this coordinate frame set.
Parameters
| Parameter | Description |
|---|---|
enable | True to enable, false to disable. |
enabled
cpp
bool enabled() constReturns True when this frame set is rendered.
Public attributes
poses
cpp
std::vector<Pose> posesList of poses to render.
frameSize
cpp
double frameSizeAxis length in world units; the axis radius is 3% of this value.