15#ifndef AGX_VIRTUALCONSTRAINTINERTIA_H
16#define AGX_VIRTUALCONSTRAINTINERTIA_H
160 addedMassMatrix1.
set( 0, 0, 0, 0, 0, 0, 0, 0, 0 );
161 addedMassMatrix2.
set( 0, 0, 0, 0, 0, 0, 0, 0, 0 );
162 addedInertiaMatrix1.
set( 0, 0, 0, 0, 0, 0, 0, 0, 0 );
163 addedInertiaMatrix2.
set( 0, 0, 0, 0, 0, 0, 0, 0, 0 );
#define AGX_DECLARE_POINTER_TYPES(type)
#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
The base class for a constraint.
void set(T const *const ptr)
Pointer to a entity instance of type Physics.RigidBody.
The rigid body class, combining a geometric model and a frame of reference.
Base class for a strong interaction concept where there interaction is defined in the mass matrix par...
This class will add a virtual inertia along or around the constraint axis (N-axis),...
void setRigidBody1TranslationalInertia(agx::Real translationalInertia)
Sets the virtual translational inertia that will be applied in the constraint interaction applied on ...
agx::Real m_rigidBody1TranslationalInertia
Transformed m_transformed
agx::Real m_rigidBody1RotationalInertia
agx::ConstraintRef m_constraint
virtual ~VirtualConstraintInertia()
Reference counted object, protected destructor.
agx::Real m_rigidBody2RotationalInertia
virtual void writeRhs(agx::Physics::RigidBodyPtr rb1, agx::Real *rb1Rhs, agx::Physics::RigidBodyPtr rb2, agx::Real *rb2Rhs, agx::Bool isRestingSolve) override
Write data to the right hand side, for dynamic bodies.
agx::Real getRigidBody2RotationalInertia() const
Gets the virtual rotational inertia that will be applied in the constraint interaction upon rigid bod...
agx::Real getRigidBody1TranslationalInertia() const
Gets the virtual translational inertia that will be applied in the constraint interaction applied on ...
virtual agx::RigidBody * getRigidBody1() const override
void setRigidBody2RotationalInertia(agx::Real rotationalInertia)
Sets the virtual rotational inertia that will be applied in the constraint interaction upon rigid bod...
virtual agx::RigidBody * getRigidBody2() const override
agx::Real getRigidBody2TranslationalInertia() const
Gets the virtual translational inertia that will be applied in the constraint interaction applied on ...
agx::Real m_rigidBody2TranslationalInertia
VirtualConstraintInertia(agx::Constraint *constraint, agx::Real rigidBody1TranslationInertia, agx::Real rigidBody1RotationalInertia, agx::Real rigidBody2TranslationInertia, agx::Real rigidBody2RotationalInertia)
Basic constructor that takes a constraint and the virtual inertias that should be applied in the cent...
void setRigidBody2TranslationalInertia(agx::Real translationalInertia)
Sets the virtual translational inertia that will be applied in the constraint interaction applied on ...
virtual void writeMatrixData(agx::StrongInteraction::MatrixData rb1DiagonalBlock, agx::StrongInteraction::MatrixData rb2DiagonalBlock, agx::StrongInteraction::MatrixData offDiagonalBlock) override
Write data for dynamic bodies.
virtual void prepare() override
Prepares for solve.
agx::Real getRigidBody1RotationalInertia() const
Gets the virtual rotational inertia that will be applied in the constraint interaction upon rigid bod...
VirtualConstraintInertia()
Default constructor used by serialization.
void setRigidBody1RotationalInertia(agx::Real rotationalInertia)
Sets the virtual rotational inertia that will be applied in the constraint interaction upon rigid bod...
The agx namespace contains the dynamics/math part of the AGX Dynamics API.