Class SpringDamperScratchVars#

Inheritance Relationships#

Base Type#

Class Documentation#

class SpringDamperScratchVars : public Karana::Core::BaseVars#

The Vars for the SpringDamperScratch class.

Public Functions

SpringDamperScratchVars(const kc::ks_ptr<const SpringDamperScratch> &scratch)#

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

Parameters:

scratch – The scratch class associated with this SpringDamperScratchVars.

~SpringDamperScratchVars()#

Destructor.

virtual kc::NestedVars getAllVars() const override#

Get all the Vars that this SpringDamperScratchVars 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<km::Vec3>> offset#

Translation from node1 to node2.

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

Signed length offset from the unsprung length.

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

Relative linear velocity across the spring.

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

Signed scalar force due to spring stiffness.

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

Linear force due to spring damping.

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

Total linear spring force.

Public Static Functions

static kc::ks_ptr<SpringDamperScratchVars> create(const kc::ks_ptr<const SpringDamperScratch> &scratch)#

Create an instance of the SpringDamperScratchVars.

Parameters:

scratch – The scratch class associated with this SpringDamperScratchVars.

Returns:

A pointer to the newly created instance of SpringDamperScratchVars.