Class ChainedFrame2Frame#

Inheritance Relationships#

Base Type#

Class Documentation#

class ChainedFrame2Frame : public Karana::Frame::Frame2Frame#

Frame2Frame class connecting arbitrary oframe/pframe Frame pairs.

The oframe and pframe frames can be located anywhere in the frames tree.

See The frames layer for more discussion on the frames layer.

Public Functions

ChainedFrame2Frame(const kc::ks_ptr<Frame> &oframe, const kc::ks_ptr<Frame> &pframe, const std::string &name = "")#

Constructor for ChainedFrame2Frame.

Parameters:
virtual const std::string &typeString() const noexcept override#

Returns the type string of LockingBase.

Returns:

The type string.

virtual std::string dumpString(const std::string &prefix = "", const Karana::Core::Base::dumpOptions *options = nullptr) const override#

Return information about the object.

Parameters:
  • prefix – A string to use as prefix for each output line

  • options – Struct with options to tailor the output

Returns:

String with the information about the object.

virtual void makeZombie() override#

Make the ChainedFrame2Frame a zombie.

This also removes dependencies for the transform, velocity, and accel caches.

Public Static Functions

static const kc::ks_ptr<ChainedFrame2Frame> &lookupOrCreate(const kc::ks_ptr<Frame> &oframe, const kc::ks_ptr<Frame> &pframe)#

Looks up or creates a ChainedFrame2Frame between two frames.

Parameters:
  • oframe – The oframe of the chain.

  • pframe – The pframe of the chain.

Returns:

The ChainedFrame2Frame that connects the oframe and pframe.

Protected Functions

virtual void _makeStale() override#

Used to tear down cached info - it will be rebuilt.

void _setup()#

Used to setup the ChainedFrame2Frame.

must be called by the constructor as well as after a _tearDown() call

virtual void _makeCurrent() override#

Used to lock the ChainedFrame2Frame.

virtual void _computeTransform(km::HomTran&) override#

Compute the transformation between the oframe and pframe.

Returns:

The computed homogeneous transformation.

virtual void _computeVelocity(km::SpatialVector&) override#

Compute the spatial velocity between the oframe and pframe.

Returns:

The computed spatial velocity.

virtual void _computeAccel(km::SpatialVector&) override#

Compute the spatial acceleration between the oframe and pframe.

Returns:

The computed spatial acceleration.

void _discard(kc::ks_ptr<Base> &base) override#

Discard the provided ChainedFrame2Frame.

Parameters:

base – - Base pointer to the ChainedFrame2Frame to discard.