Class ScrewSubhinge#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Type#

Class Documentation#

class ScrewSubhinge : public Karana::Dynamics::Physical1DofSubhinge#

Represents a 1 dof helical subhinge with coupled rotation/translation about a common axis.

See Subhinges section for more information on physical subhinges.

Public Functions

inline virtual ~ScrewSubhinge()#

ScrewSubhinge destructor.

inline virtual std::string_view typeString() const noexcept override#

Returns the type string of the SubTree.

Returns:

The type string.

virtual SubhingeBase::SubhingeType subhingeType() const override#

Helper method to return the subhinge type.

Returns:

the subhinge type

virtual void setUnitAxis(const km::Vec3 &axis) override#

Set the unit axis for the pin hinge.

Parameters:

axis – The unit axis for the pin hinge.

virtual bool isFinalized() const override#

Checks is the params for the object have been initialized.

Returns:

True if the params have set up.

void setPitch(double pitch)#

Set the pitch value for the subhinge.

The pitch is defined as meters of translation/radian.

Parameters:

pitch – the pitch value

inline double getPitch() const#

Return the pitch value for the subhinge.

The pitch is defined as meters of translation/radian.

Returns:

the pitch value

ScrewSubhinge(kc::ks_ptr<kf::Frame> oframe, kc::ks_ptr<kf::Frame> pframe, std::string_view name, kc::ks_ptr<FramePairHinge> hge)#

Constructs a ScrewSubhinge_T.

Protected Functions

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

Compute the transformation between the oframe and pframe.

This the relTransform data cache callback.

Returns:

The computed homogeneous transformation.

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

Compute the spatial velocity between the oframe and pframe.

This the relSpVel data cache callback.

Returns:

The computed spatial velocity.

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

Compute the spatial acceleration between the oframe and pframe.

This the relSpAccel data cache callback.

Returns:

The computed spatial acceleration.

virtual kc::ks_ptr<PhysicalSubhinge::PhysicalSubhingeParams> _getParams() const override#

Get/set params for a subhinge.

virtual void _setParams(const PhysicalSubhinge::PhysicalSubhingeParams &params) override#

apply the params from the twin subhinge to this subhinge

struct PhysicalSubhingeParams : public Karana::Dynamics::Physical1DofSubhinge::PhysicalSubhingeParams#

Specialization of param class for this subhinge type.

Public Functions

inline PhysicalSubhingeParams &operator=(const PhysicalSubhinge::PhysicalSubhingeParams *p)#

Assignment operator.

Parameters:

p – The PhysicalSubhingeParams to copy values from.

Returns:

A reference to the newly assigned PhysicalSubhingeParams.

Public Members

double pitch#

the screw’s pitch (meters of translation/radian)