Class ScrewSubhinge#
Defined in File PinSubhinge.h
Inheritance Relationships#
Base Type#
public Karana::Dynamics::Physical1DofSubhinge(Class Physical1DofSubhinge)
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.
-
virtual 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 isReady() 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(const kc::ks_ptr<kf::Frame> &oframe, const kc::ks_ptr<kf::Frame> &pframe, std::string_view name, const kc::ks_ptr<FramePairHinge> &hge)#
Constructs a ScrewSubhinge.
- Parameters:
oframe – the oframe frame
pframe – the pframe frame
name – the name for the subhinge
hge – the parent hinge
-
virtual void setParams(const kc::ks_ptr<PhysicalSubhingeParams> ¶ms) override#
Set the parameters for this subhinge.
- Parameters:
params – The parameters to set for this subhinge.
-
virtual kc::ks_ptr<PhysicalSubhingeParams> getParams() const override#
Get the parameters for this subhinge.
- Returns:
The parameters to set for this subhinge.
Protected Functions
-
virtual void _computeTransform(Karana::Math::HomTran &T) override#
Compute the transformation between the oframe and pframe.
This the relTransform data cache callback.
- Parameters:
T – The buffer to place the computed homogeneous transformation in.
-
virtual void _computeVelocity(Karana::Math::SpatialVelocity &V) override#
Compute the spatial velocity between the oframe and pframe.
This the relSpVel data cache callback.
- Parameters:
V – The buffer to put the computed spatial velocity in.
-
virtual void _computeAccel(Karana::Math::SpatialAcceleration &a) override#
Compute the spatial acceleration between the oframe and pframe.
This the relSpAccel data cache callback.
- Parameters:
a – The buffer to put the computed spatial acceleration in.
-
virtual kc::ks_ptr<PhysicalSubhinge::PhysicalSubhingeParamsAndState> _getParamsAndState() const override#
Get params for the subhinge.
- Returns:
the params
-
inline virtual ~ScrewSubhinge()#