Class FrameToFrameVectorVisualizer#

Inheritance Relationships#

Base Type#

Class Documentation#

class FrameToFrameVectorVisualizer : public Karana::KUtils::VectorVisualizer#

Visualize a vector that spans the two frames in a FrameToFrame.

The origin of the vector is at the o-frame of the FrameToFrame, and the end of the vector is at the p-frame of the FrameToFrame.

Public Functions

FrameToFrameVectorVisualizer(std::string_view name, const kc::ks_ptr<kf::FrameToFrame> &frame_to_frame, const kc::ks_ptr<ks::ProxyScene> &scene)#

ScaledVectorVisualizer constructor. The constructor is not meant to be called directly. Please use the create(…) method instead to create an instance.

Parameters:
  • name – Name of the visualizer.

  • frame_to_frame – The FrameToFrame for the vector.

  • scene – The ProxyScene to add the vector to.

const km::Vec3 &getEndOffset()#

Get the ending offset of the vector.

This is the offset between the p-frame of the frame to frame and the end of the vector.

Returns:

The start offset of the vector.

void setEndOffset(const km::Vec3 &offset)#

Set the end offset of the vector.

This is the offset between the p-frame of the frame to frame and the end of the vector.

Parameters:

offset – The new end offset of the vector.

virtual void registerCallback() override#

Register the update callback with the scene.

Public Static Functions

static kc::ks_ptr<FrameToFrameVectorVisualizer> create(std::string_view name, const kc::ks_ptr<kf::FrameToFrame> &frame_to_frame, const kc::ks_ptr<ks::ProxyScene> &scene)#

Create a new instance of VectorVisualizer.

Parameters:
  • name – Name of the visualizer.

  • frame_to_frame – The FrameToFrame for the vector.

  • scene – The ProxyScene to add the vector to.

Returns:

A pointer to the newly created FrameToFrameVectorVisualizer.

Protected Attributes

km::Vec3 _end_offset = {0.0, 0.0, 0.0}#

The starting offset of the vector.

kc::ks_ptr<kf::FrameToFrame> _frame_to_frame#

The associated frame_to_frame to visualize.