Class PhysicalHinge#
Defined in File PhysicalHinge.h
Inheritance Relationships#
Base Type#
public Karana::Dynamics::FramePairHinge(Class FramePairHinge)
Class Documentation#
-
class PhysicalHinge : public Karana::Dynamics::FramePairHinge#
Represents the class for physical articulation hinges.
This class is the container for physical subhinges that define articulation for physical bodies. See Connecting bodies via hinges section for more information on physical hinges.
Public Functions
-
virtual ~PhysicalHinge()#
Hinge destructor.
-
PhysicalHinge(PhysicalBody &parent_body, PhysicalBody &child_body, std::string_view name, HingeBase::HingeType htype, const std::vector<SubhingeBase::SubhingeType> &subhinge_types = std::vector<SubhingeBase::SubhingeType>())#
Hinge Constructor.
-
inline virtual std::string_view typeString() const noexcept override#
Returns the type string of the HingeBase.
- Returns:
The type string.
-
const kc::ks_ptr<HingePnode> &pnode() const#
Return the pnode for the hinge See.
Connecting bodies via hinges section for more information on onodes and pnodes.
- Returns:
the HingePnode instance
-
const kc::ks_ptr<HingeOnode> &onode() const#
Return the onode for the hinge See.
Connecting bodies via hinges section for more information on onodes and pnodes.
- Returns:
the HingeOnode instance
-
virtual std::string dumpString(std::string_view prefix, const Karana::Core::Base::DumpOptions *options) 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.
Public Static Functions
-
static const kc::ks_ptr<PhysicalHinge> create(PhysicalBody &parent, PhysicalBody &child, HingeBase::HingeType htype, const std::vector<SubhingeBase::SubhingeType> &subhinge_types = std::vector<SubhingeBase::SubhingeType>())#
Factory method to create a PhysicalHinge instance.
- Parameters:
parent – The parent body
child – The child body
htype – The hinge type
subhinge_types – The list of subhinge types for a custom hinge type
- Returns:
A new PhysicalHinge instance
Protected Functions
-
void _discard(kc::ks_ptr<Base> &base) override#
Discard the PhysicalHinge.
- Parameters:
base – - Pointer to the PhysicalHinge.
-
void _setupATBIDataCaches()#
-
void _teardownATBIDataCaches()#
-
void _setupInvDynDataCaches()#
-
void _teardownInvDynDataCaches()#
-
void _oneTimeTeardown()#
-
virtual void _changeActionT() override#
-
km::SpatialVector _acorPrime(const km::Vec &x_dot_u) const#
Compute the overall Coriolis accel term for all of the subhinges about and in the pnode frame. This is needed for compound bodies ATBI filter step. The XdotU vector is non-null (i.e. non-zero size) only for constraint-embedding compound bodies - where the XdotU term is a contribution from the configuration dependency of the independent to dependent coordinates
-
virtual ~PhysicalHinge()#