Class Physical1DofSubhinge#
Defined in File PinSubhinge.h
Nested Relationships#
Nested Types#
Inheritance Relationships#
Base Type#
public Karana::Dynamics::PhysicalSubhinge_T< 1, 1 >(Template Class PhysicalSubhinge_T)
Derived Types#
public Karana::Dynamics::LinearSubhinge(Class LinearSubhinge)public Karana::Dynamics::PinSubhinge(Class PinSubhinge)public Karana::Dynamics::ScrewSubhinge(Class ScrewSubhinge)
Class Documentation#
-
class Physical1DofSubhinge : public Karana::Dynamics::PhysicalSubhinge_T<1, 1>#
Base class for 1 degree of freedom physical subhinges.
See Subhinges section for more information on physical subhinges.
Subclassed by Karana::Dynamics::LinearSubhinge, Karana::Dynamics::PinSubhinge, Karana::Dynamics::ScrewSubhinge
Public Functions
-
Physical1DofSubhinge(kc::ks_ptr<kf::Frame> oframe, kc::ks_ptr<kf::Frame> pframe, std::string_view name, kc::ks_ptr<FramePairHinge> hge)#
Constructs a Physical1DofSubhinge.
-
inline ~Physical1DofSubhinge()#
-
virtual void setUnitAxis(const km::Vec3 &axis)#
Set the unit axis for the pin hinge.
- Parameters:
axis – The unit axis for the pin hinge.
-
inline const km::Vec3 &getUnitAxis() const#
Get the unit axis for the pin hinge.
- Returns:
The unit axis for the pin hinge.
-
void setJointLimits(const Karana::Math::Vec &limits)#
Set the lower/upper pair of joint limit values for the 1 dof subhinge.
- Parameters:
limits – the lower and upper limit values
-
inline km::Vec getJointLimits() const#
Return the lower/upper pair of joint limit values for the 1 dof subhinge.
- Returns:
array with the lower and upper joint limit values
-
void setGearRatio(double gear_ratio)#
Set the gear ratio for the 1 dof subhinge.
- Parameters:
gear_ratio – the gear ratio
-
inline double getGearRatio() const#
Return the gear ratio for the 1 dof subhinge.
- Returns:
the gear ratio value
-
virtual bool isFinalized() const override#
Checks is the params for the object have been initialized.
- Returns:
True if the params have set up.
Protected Functions
-
virtual kc::ks_ptr<PhysicalSubhinge::PhysicalSubhingeParams> _getParams() const override#
Get/set params for a subhinge.
-
virtual void _setParams(const PhysicalSubhinge::PhysicalSubhingeParams ¶ms) override#
apply the params from the twin subhinge to this subhinge
Protected Attributes
-
km::Vec _joint_limits = km::Vec(2)#
joint limits for the subhinge, initialized by default to NaNs
-
double _gear_ratio = km::uninitializedNaN#
gear ratio for the pin subhinge, initialized by default to a NaN
-
km::Vec3 _unit_axis = {0, 0, 0}#
axis of rotation in pframe
-
struct PhysicalSubhingeParams : public Karana::Dynamics::PhysicalSubhinge::PhysicalSubhingeParams#
Specialization of param class for this subhinge type.
Subclassed by Karana::Dynamics::ScrewSubhinge::PhysicalSubhingeParams
Public Functions
-
PhysicalSubhingeParams() = default#
-
inline PhysicalSubhingeParams &operator=(const PhysicalSubhinge::PhysicalSubhingeParams *p)#
copy operator
Public Members
-
km::Vec3 unit_axis#
the subhinge unit axis
-
PhysicalSubhingeParams() = default#
-
Physical1DofSubhinge(kc::ks_ptr<kf::Frame> oframe, kc::ks_ptr<kf::Frame> pframe, std::string_view name, kc::ks_ptr<FramePairHinge> hge)#