Class PhysicalBodyVars#

Inheritance Relationships#

Base Type#

Derived Type#

Class Documentation#

class PhysicalBodyVars : public Karana::Frame::FrameVars#

The Vars for the PhysicalBody class.

Subclassed by Karana::Dynamics::PhysicalModalBodyVars

Public Functions

PhysicalBodyVars(const kc::ks_ptr<PhysicalBody> &body)#

PhysicalBodyVars constructor. The constructor is not meant to be called directly. Please use the create(…) method instead to create an instance.

Parameters:

body – The body associated with this PhysicalBodyVars.

~PhysicalBodyVars()#

Destructor.

virtual kc::NestedVars getAllVars() const override#

Get all the Vars that this VarHolder has.

Returns:

A map of Vars, where the Var name is the key and the Var is the value.

Public Members

kc::ks_ptr<Karana::Core::Var_T<double>> mass#

The mass of the PhysicalBody.

kc::ks_ptr<Karana::Core::Var_T<km::Vec3>> body_to_cm#

body to CM vector

kc::ks_ptr<Karana::Core::Var_T<km::Mat33>> inertia#

body inertia

kc::ks_ptr<Karana::Core::Var_T<km::Mat33>> cm_inertia#

body CM inertia

kc::ks_ptr<Karana::Core::Var_T<std::string>> physical_parent#

The physical parent body name.

kc::ks_ptr<Karana::Core::Var_T<std::vector<std::string>>> physical_children#

The names of the physical children bodies.

kc::ks_ptr<Karana::Core::Var_T<km::Vec3>> local_gravity_accel#

The local frame gravitational acceleration.

Public Static Functions

static kc::ks_ptr<PhysicalBodyVars> create(const kc::ks_ptr<PhysicalBody> &body)#

Create an instance of the PhysicalBodyVars.

Parameters:

body – The body associated with this PhysicalBodyVars.

Returns:

A pointer to the newly created instance of PhysicalBodyVars.