JSim 2026.06.01-p(1)
Loading...
Searching...
No Matches
frcsim::DeformableBody Class Reference

Rigid body with optional deformable mesh dynamics overlay. More...

#include <deformable_body.hpp>

Public Member Functions

 DeformableBody (double mass_kg=1.0)
 Constructs a rigid-body-based deformable body.
const RigidBodyrigidBase () const
 Immutable access to underlying rigid body state and properties.
RigidBodyrigidBase ()
 Mutable access to underlying rigid body.
void enableDeformation (bool enable)
 Enables or disables deformation solving.
bool isDeformationEnabled () const
 Returns whether deformation is currently enabled.
void setBendStiffness (double stiffness_npm)
 Sets the bending stiffness for deformation resistance.
double bendStiffness () const
 Returns bending stiffness in newtons per meter.
void setWarpDamping (double damping_nspm)
 Sets the warp damping coefficient for deformation energy dissipation.
double warpDamping () const
 Returns warp damping in newton-seconds per meter.
const std::vector< Vector3 > & deformationNodes () const
 Immutable access to local-frame deformation node positions.
std::vector< Vector3 > & deformationNodes ()
 Mutable access to local-frame deformation node positions.
const std::vector< Vector3 > & deformationVelocities () const
 Immutable access to deformation node velocities.
std::vector< Vector3 > & deformationVelocities ()
 Mutable access to deformation node velocities.

Detailed Description

Rigid body with optional deformable mesh dynamics overlay.

Extends rigid body behavior with per-node deformation tracking in local coordinates.

This is intentionally overkill for current use cases, but it keeps the future flex-body integration path explicit. TODO: Implement deformation solving during simulation substeps.

Constructor & Destructor Documentation

◆ DeformableBody()

frcsim::DeformableBody::DeformableBody ( double mass_kg = 1.0)
inlineexplicit

Constructs a rigid-body-based deformable body.

Parameters
mass_kgBody mass in kilograms.

Member Function Documentation

◆ bendStiffness()

double frcsim::DeformableBody::bendStiffness ( ) const
inline

Returns bending stiffness in newtons per meter.

◆ deformationNodes() [1/2]

std::vector< Vector3 > & frcsim::DeformableBody::deformationNodes ( )
inline

Mutable access to local-frame deformation node positions.

Returns
Reference to vector of node positions in body-local coordinates.

◆ deformationNodes() [2/2]

const std::vector< Vector3 > & frcsim::DeformableBody::deformationNodes ( ) const
inline

Immutable access to local-frame deformation node positions.

Returns
Const reference to vector of node positions in body-local coordinates.
Note
TODO: Populate with actual deformation mesh nodes during application setup.

◆ deformationVelocities() [1/2]

std::vector< Vector3 > & frcsim::DeformableBody::deformationVelocities ( )
inline

Mutable access to deformation node velocities.

Returns
Reference to velocity vector for bending dynamics.

◆ deformationVelocities() [2/2]

const std::vector< Vector3 > & frcsim::DeformableBody::deformationVelocities ( ) const
inline

Immutable access to deformation node velocities.

Returns
Const reference to velocity vector for bending dynamics.

◆ enableDeformation()

void frcsim::DeformableBody::enableDeformation ( bool enable)
inline

Enables or disables deformation solving.

Parameters
enableWhether deformation dynamics are active.

◆ isDeformationEnabled()

bool frcsim::DeformableBody::isDeformationEnabled ( ) const
inline

Returns whether deformation is currently enabled.

◆ rigidBase() [1/2]

RigidBody & frcsim::DeformableBody::rigidBase ( )
inline

Mutable access to underlying rigid body.

◆ rigidBase() [2/2]

const RigidBody & frcsim::DeformableBody::rigidBase ( ) const
inline

Immutable access to underlying rigid body state and properties.

◆ setBendStiffness()

void frcsim::DeformableBody::setBendStiffness ( double stiffness_npm)
inline

Sets the bending stiffness for deformation resistance.

Parameters
stiffness_npmStiffness in newtons per meter.

◆ setWarpDamping()

void frcsim::DeformableBody::setWarpDamping ( double damping_nspm)
inline

Sets the warp damping coefficient for deformation energy dissipation.

Parameters
damping_nspmDamping in newton-seconds per meter.

◆ warpDamping()

double frcsim::DeformableBody::warpDamping ( ) const
inline

Returns warp damping in newton-seconds per meter.


The documentation for this class was generated from the following file: