Struct PhysicalModalBodyParams#

Inheritance Relationships#

Base Type#

Struct Documentation#

struct PhysicalModalBodyParams : public Karana::Dynamics::PhysicalBodyParams#

Struct with parameters for a modal deformable body

Public Functions

PhysicalModalBodyParams(const km::SpatialInertia &spatial_inertia, const km::HomTran &body_to_joint_transform, const PhysicalHingeParams &hinge_params, const kc::ks_ptr<ParentBodyAttachmentParams> &parent_body_attachment_params, const std::vector<ks::ScenePartSpec> &scene_part_specs, const std::vector<ks::SceneFileObjectSpec> &scene_file_object_specs, size_t nmodes, const km::Vec &stiffness, const km::Vec &damping, const km::Mat3n &pnode_rotational_nodal_matrix, const km::Mat3n &pnode_translational_nodal_matrix)#
Parameters:
  • spatial_inertia – The spatial inertia to assign to each body

  • body_to_joint_transform – The body to joint transform for the bodies

  • hinge_params – The data for the body’s hinge

  • parent_body_attachment_params – The parameters for attaching this body to its parent

  • scene_part_specs – List of scene part specs for the body

  • scene_file_object_specs – List of scene file object specs for the body

  • nmodes – The number of deformation modes

  • stiffness – The stiffness vector (based on modal frequencies)

  • damping – The damping coefficients

  • pnode_rotational_nodal_matrix – The rotational nodal matrix for the pnode

  • pnode_translational_nodal_matrix – The translational nodal matrix for the pnode

~PhysicalModalBodyParams()#

Destructor.

PhysicalModalBodyParams(const PhysicalModalBodyParams&) = delete#
inline PhysicalModalBodyParams &operator=(const PhysicalModalBodyParams &p) noexcept#

Assignment operator.

Parameters:

p – the input param

Returns:

the output

Public Members

size_t nmodes#

the number of deformation modes

km::Vec stiffness#

the stiffness vector (based on modal frequencies)

km::Vec damping#

the damping coefficients

km::Mat pnode_rotational_nodal_matrix#

the rotational nodal matrix for the pnode

km::Mat pnode_translational_nodal_matrix#

the translational nodal matrix for the pnode

Public Static Functions

static PhysicalModalBodyParams createDefault()#

Create a version of PhysicalModalBodyParams with all values filled in.

This is useful for testing or when you just need a body for a simple demo.

Returns:

A PhysicalModalBodyParams with all values filled in.