48 AUTO_GENERATE_NONE = 0x0,
52 AUTO_GENERATE_ALL = MASS | CM_OFFSET | INERTIA
76 inline Real getMass()
const;
81 inline const Real& getInvMass()
const;
108 Vec3 getInvMassVector()
const;
138 Vec3 getPrincipalInertiae()
const;
154 const Vec3& getMassCoefficients( )
const;
159 const Vec3& getEffectiveMass()
const;
175 const Vec3& getInertiaTensorCoefficients()
const;
208 const Vec3& getEffectiveMassTransformDiagonal()
const;
230 void setDefaultValues();
244 agx::Physics::RigidBodyPtr m_entity;
254 Real xx, xy, xz, yz, yy, zz, xtx;
280 return m_entity.mass();
284 inline const Vec3& MassProperties::getEffectiveMass()
const
287 return m_entity.effectiveMass();
290 inline const Vec3& MassProperties::getMassCoefficients( )
const
293 return m_entity.effectiveMassCoefficients();
296 inline const Vec3& MassProperties::getInertiaTensorCoefficients()
const
299 return m_entity.effectiveInertiaCoefficients();
304 return m_autoGenerateMask;
310 return m_entity.inertia();
313 inline const SPDMatrix3x3& MassProperties::getEffectiveInertiaTensor()
const
316 return m_entity.effectiveInertia();
319 inline const Vec3& MassProperties::getEffectiveMassTransformDiagonal()
const
322 return m_entity.effectiveMassTransformDiagonal();
326 inline Vec3 MassProperties::getPrincipalInertiae()
const
329 return m_entity.inertia().getDiagonal();
332 inline const Real& MassProperties::getInvMass()
const
335 return m_entity.invMass();
338 inline Vec3 MassProperties::getInvMassVector()
const
341 return Vec3(m_entity.invMass(), m_entity.invMass(), m_entity.invMass());
347 return SPDMatrix3x3(
Vec3(m_entity.invMass(), m_entity.invMass(), m_entity.invMass()) );
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
#define AGXPHYSICS_EXPORT
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Class for rigid body inertia tensor and mass.
MassProperties(agx::Physics::RigidBodyPtr entity)
Constructor (for internal use) which associates this object to the storage for a RigidBody.
bool setMass(Real m, bool autoGenerate=false)
Set the mass.
Vec3 getEffectiveInvMassVector() const
void setAutoGenerateMask(uint32_t mask)
Specify which parameters should be automatically calculated from the geometries of the body given a b...
bool setMassCoefficients(const Vec3 &coefficients)
Set mass coefficients.
bool setInertiaTensorCoefficients(const Vec3 &coefficients)
Set inertia tensor coefficients.
SPDMatrix3x3 getEffectiveInvMassMatrix() const
void setEffectiveMassTransformDiagonal(const Vec3 &effectiveMassTransformDiagonal)
Set the transform to transform the effective coefficients to the body/mass frame.
bool setInertiaTensor(const Vec3 &inertiaDiagonal, bool autoGenerate=false)
Set the inertia tensor given the diagonal.
virtual ~MassProperties()
Destructor.
bool setInertiaTensor(const SPDMatrix3x3 &m, bool autoGenerate=false)
Set the inertia tensor as a full 3x3 tensor matrix.
AutoGenerateFlags
Specifies a bit mask for controlling what should be automatically calculated when a body/geometry is ...
Pointer to a entity instance of type Physics.RigidBody.
The rigid body class, combining a geometric model and a frame of reference.
Specialized type of matrices for holding symmetric positive definite matrices.
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
The agx namespace contains the dynamics/math part of the AGX Dynamics API.