72 const agx::Real* operator[](
size_t i )
const;
87 const agx::Real& at(
size_t i,
size_t j )
const;
94 agx::Real operator()(
size_t i,
size_t j)
const;
101 agx::Real& operator()(
size_t i,
size_t j);
110 void set(
size_t i,
size_t j,
agx::Real value );
289 void translateWorldDiagonalBlock(
const agx::Vec3 cmOffset,
292 void translateWorldDiagonalBlock(
const agx::Vec3 cmOffsetRb1,
324 virtual void prepare()
override;
357 rb1DiagonalBlock.
reset();
358 rb2DiagonalBlock.
reset();
359 offDiagonalBlock.
reset();
367 Transformed m_transformed;
392 return (*
this)[i][j];
398 return (*
this)[i][j];
404 return (*
this)[ i ][ j ];
411 (*this)[ i ][ j ] = value;
418 return (*
this)[ i ][ j ];
433 return m_offDiagonalBlock;
438 return m_offDiagonalBlock;
443 os <<
"{" << std::endl;
444 for (
size_t row = 0; row < 6; ++row) {
446 for (
size_t col = 0; col < 6; ++col)
447 os << m(row, col) <<
" ";
450 os <<
"}" << std::endl;
InputRef< T > in(const char *name, T &obj)
Create an object with a name and a reference to the object that should be restored (usually a pointer...
OutputRef< Serializable > out(const char *name, const Serializable *obj)
Return an object that contain the name and the object that should be serialized to an archive...
AGXCORE_EXPORT const Real RealEpsilon
const agx::AddedMassInteraction::Matrix6x6 & getBlock() const
Base class for a strong interaction concept where there interaction is defined in the mass matrix par...
6x6 matrix class with blockwise interface to get or set 3x3 matrices: [ M(0, 0) M(0, 1) ] [ M(1, 0) M(1, 1) ]
void AGXCORE_EXPORT transform(void *target, const Format *targetFormat, const void *source, const Format *sourceFormat, size_t numElements)
Transform data between two buffers.
#define AGXPHYSICS_EXPORT
#define AGX_DECLARE_POINTER_TYPES(type)
const agx::Real & at(size_t i, size_t j) const
Pointer to a entity instance of type Physics.RigidBody.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
void set(size_t i, size_t j, agx::Real value)
Interface to write added mass matrices for one or two rigid bodies.
agx::Real operator()(size_t i, size_t j) const
std::ostream & operator<<(std::ostream &os, const agx::AddedMassInteraction::Matrix6x6 &m)
void reset()
Resets all values to zero.
AGXPHYSICS_EXPORT agx::Bool equivalent(const agx::AddedMassInteraction::Matrix6x6 &lhs, const agx::AddedMassInteraction::Matrix6x6 &rhs, agx::Real eps=agx::RealEpsilon)
The rigid body class, combining a geometric model and a frame of reference.
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Class containing a rigid body and the 6x6 matrix to be written in the diagonal of the system matrix...
Class for writing serialized data in binary format to a stream.
AGXPHYSICS_EXPORT agx::Bool equalsZero(const agx::AddedMassInteraction::Matrix6x6 &matrix, agx::Real eps=agx::RealEpsilon)
const agx::Real * operator[](size_t i) const
const agx::AddedMassInteraction::Matrix6x6 & getOffDiagonalBlock() const
Off diagonal block (6x6 matrix).