Class SubhingeBase#

Inheritance Relationships#

Base Type#

Derived Types#

Class Documentation#

class SubhingeBase : public Karana::Dynamics::CoordBase#

Represents the abstract base class for articulation subhinges.

This class is the base class for subhinges from which physical and compound subhinge classes are derived. See Subhinges for more discussion about subhinges.

Subclassed by Karana::Dynamics::CompoundSubhinge, Karana::Dynamics::PhysicalSubhinge

Public Functions

virtual ~SubhingeBase()#

SubhingeBase destructor.

virtual std::string_view typeString(bool brief = true) const noexcept = 0#

Returns the type string of the object.

Parameters:

brief – if true, return the short form of the class type name, else the full type name

Returns:

The type string.

virtual SubhingeType subhingeType() const = 0#

Helper method to return the subhinge type.

Returns:

the subhinge type

inline virtual void setPrescribed(bool flag)#

Set the prescribed flag for the subhinge.

Parameters:

flag – the enable/disable flag

inline bool getPrescribed() const#

Return the prescribed flag for the subhinge.

Returns:

the prescribed mode status

inline const kc::ks_ptr<HingeBase> &parentHinge() const#

Return the parent hinge for the subhinge.

Returns:

the PhysicalHinge parent hinge

Public Static Functions

static std::string subhingeTypeString(SubhingeType shtype)#

Helper method to return the string name for a SubhingeType subhinge type.

Parameters:

shtype – the subhinge type

Returns:

the subhinge type as a string

Protected Functions

SubhingeBase(std::string_view nm, kc::id_t id, kc::ks_ptr<HingeBase> hge)#

Constructs a SubhingeBase.

Parameters:
  • nm – the name for the subhinge

  • id – the id for the subhinge

  • hge – the parent hinge

Protected Attributes

kc::ks_ptr<HingeBase> _parent_hinge = nullptr#

the parent hinge

bool _prescribed = false#

flag indicating whether the subhinge is prescribed