Skip to content

raisin::CoordinateFrame ​

class · #include <rayrai/CoordinateFrame.hpp>

Render helper for visualizing multiple coordinate frames.

Nested classes ​

  • struct Pose — Pose definition for a single coordinate frame.

Constructors & destructor ​

CoordinateFrame ​

cpp
CoordinateFrame(std::shared_ptr<RayraiGlobalAsset> &asset)

Construct a coordinate frame visualizer.

Parameters

ParameterDescription
assetShared 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

ParameterDescription
shaderThe 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

ParameterDescription
shaderShader that must already be in use.
viewProjectionCamera view-projection matrix; an all-zero matrix disables culling.
boundShaderUnused; 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

ParameterDescription
enableTrue to enable, false to disable.

enabled ​

cpp
bool enabled() const

Returns True when this frame set is rendered.

Public attributes ​

poses ​

cpp
std::vector<Pose> poses

List of poses to render.

frameSize ​

cpp
double frameSize

Axis length in world units; the axis radius is 3% of this value.

RaiSim — physics for robotics and AI.