28 class AffineMatrix4x4T;
65 Real& operator()(
size_t row,
size_t col );
66 Real operator()(
size_t row,
size_t col )
const;
69 Real& at(
size_t row,
size_t col );
71 Real at(
size_t row,
size_t col )
const;
76 bool isIdentity()
const;
85 void set(
const Vec3& v);
93 void set(
Real v,
size_t row,
size_t col);
95 Vec3 getDiagonal()
const;
96 Real determinant()
const;
103 void operator *= (
const Real& r );
104 void operator /= (
const Real& d);
112 Vec3 preMult(
const Vec3& v )
const;
113 Vec3 postMult(
const Vec3& v )
const;
114 Vec3 operator * (
const Vec3& v )
const;
118 const Real* ptr()
const;
121 template <
typename T>
170 return !(*
this == m);
192 size_t index = row + col;
193 if (index == 2 && row == 1)
200 size_t index = row + col;
201 if (index == 2 && row == 1)
230 return std::isnan(
m_data[0] ) || std::isnan(
m_data[1] ) || std::isnan(
m_data[2] ) ||
263#if (defined AGX_DEBUG && defined AGX_SPDMATRIX3X3_VERIFY_VALIDITY)
312 size_t index = row + col;
315 if (index == 2 && row == 1)
381 this->
mult(*
this, r);
448 return (
equivalent(m1(0, 0), m2(0, 0), epsilon) &&
469 os <<
"{" << std::endl;
470 for (
size_t row = 0; row < 3; ++row ) {
472 for (
size_t col = 0; col < 3; ++col )
473 os << m( row, col ) <<
" ";
476 os <<
"}" << std::endl;
AGXCORE_EXPORT agx::String operator+(const std::string &str, const agx::Name &name)
#define AGX_TYPE_BINDING(_Type, _Name)
Matrix class for rigid transformations (translation, rotation).
Specialized type of matrices for holding symmetric positive definite matrices.
SPDMatrix3x3 & operator=(const SPDMatrix3x3 &rhs)
void operator*=(const Real &r)
Real & at(size_t row, size_t col)
SPDMatrix3x3 operator/(const Real &r) const
Real & operator()(size_t row, size_t col)
void mult(const SPDMatrix3x3 &m, const Real &r)
void set(const Matrix3x3 &m)
Vec3 postMult(const Vec3 &v) const
SPDMatrix3x3 operator+(const SPDMatrix3x3 &m) const
SPDMatrix3x3 operator-(const SPDMatrix3x3 &m) const
Vec3 preMult(const Vec3 &v) const
SPDMatrix3x3(const AffineMatrix4x4T< Real > &m)
void operator-=(const SPDMatrix3x3 &m)
void sub(const SPDMatrix3x3 &a, const SPDMatrix3x3 &b)
SPDMatrix3x3 operator*(const Real &r) const
bool operator!=(const SPDMatrix3x3 &m) const
void operator/=(const Real &d)
SPDMatrix3x3(const Matrix3x3 &m)
void add(const SPDMatrix3x3 &a, const SPDMatrix3x3 &b)
void operator+=(const SPDMatrix3x3 &m)
void set(const AffineMatrix4x4T< Real > &m)
void set(Real a00, Real a01, Real a02, Real a10, Real a11, Real a12, Real a20, Real a21, Real a22)
SPDMatrix3x3 inverse() const
bool operator==(const SPDMatrix3x3 &m) const
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.
Vec3T< T > operator*(const Vec3T< T > &v, const AffineMatrix4x4T< T > &m)
std::ostream & operator<<(std::ostream &os, const agx::AddedMassInteraction::Matrix6x6 &m)
bool relativelyEquivalent(float lhs, float rhs, float epsilon=(float) AGX_EQUIVALENT_EPSILON)
Compare two values for relative equality.
Real mult(const Jacobian6DOFElementT< T > &G1, const Jacobian6DOFElementT< T > &G2)
static constexpr Real AGX_EQUIVALENT_EPSILON
AGXPHYSICS_EXPORT agx::Bool equivalent(const agx::AddedMassInteraction::Matrix6x6 &lhs, const agx::AddedMassInteraction::Matrix6x6 &rhs, agx::Real eps=agx::RealEpsilon)