AGX Dynamics 2.41.2.0
Loading...
Searching...
No Matches
agx::SPDMatrix3x3 Class Reference

Specialized type of matrices for holding symmetric positive definite matrices. More...

#include <SPDMatrix3x3.h>

Public Types

typedef Real Type
 

Public Member Functions

 SPDMatrix3x3 ()
 
 SPDMatrix3x3 (const AffineMatrix4x4T< Real > &m)
 
 SPDMatrix3x3 (const Matrix3x3 &m)
 
 SPDMatrix3x3 (const SPDMatrix3x3 &mat)
 
 SPDMatrix3x3 (const Vec3 &v)
 
 SPDMatrix3x3 (Real a00, Real a01, Real a02, Real a10, Real a11, Real a12, Real a20, Real a21, Real a22)
 
void add (const SPDMatrix3x3 &a, const SPDMatrix3x3 &b)
 
Realat (size_t row, size_t col)
 
Real at (size_t row, size_t col) const
 
Real determinant () const
 
Vec3 getDiagonal () const
 
SPDMatrix3x3 inverse () const
 
bool isIdentity () const
 
bool isNaN () const
 
bool isValid () const
 
void makeIdentity ()
 
void mult (const SPDMatrix3x3 &m, const Real &r)
 
bool operator!= (const SPDMatrix3x3 &m) const
 
Realoperator() (size_t row, size_t col)
 
Real operator() (size_t row, size_t col) const
 
SPDMatrix3x3 operator* (const Real &r) const
 
Vec3 operator* (const Vec3 &v) const
 
void operator*= (const Real &r)
 
SPDMatrix3x3 operator+ (const SPDMatrix3x3 &m) const
 
void operator+= (const SPDMatrix3x3 &m)
 
SPDMatrix3x3 operator- (const SPDMatrix3x3 &m) const
 
void operator-= (const SPDMatrix3x3 &m)
 
SPDMatrix3x3 operator/ (const Real &r) const
 
void operator/= (const Real &d)
 
SPDMatrix3x3operator= (const SPDMatrix3x3 &rhs)
 
bool operator== (const SPDMatrix3x3 &m) const
 
Vec3 postMult (const Vec3 &v) const
 
Vec3 preMult (const Vec3 &v) const
 
Realptr ()
 
const Realptr () const
 
void set (const AffineMatrix4x4T< Real > &m)
 
void set (const Matrix3x3 &m)
 
void set (const Vec3 &v)
 
void set (Real a00, Real a01, Real a02, Real a10, Real a11, Real a12, Real a20, Real a21, Real a22)
 
void set (Real v, size_t row, size_t col)
 Set a single element of the matrix.
 
void sub (const SPDMatrix3x3 &a, const SPDMatrix3x3 &b)
 

Protected Attributes

Type m_data [6]
 

Detailed Description

Specialized type of matrices for holding symmetric positive definite matrices.

Stripped down Matrix3x3 with some added stuff to handle: matrix + - matrix matrix * / *= /= scalar scalar * matrix

Stored in the following order:

0 1 2

  • 5 3
  • - 4

Definition at line 48 of file SPDMatrix3x3.h.

Member Typedef Documentation

◆ Type

Definition at line 51 of file SPDMatrix3x3.h.

Constructor & Destructor Documentation

◆ SPDMatrix3x3() [1/6]

agx::SPDMatrix3x3::SPDMatrix3x3 ( )

Definition at line 132 of file SPDMatrix3x3.h.

References makeIdentity().

Referenced by isIdentity().

◆ SPDMatrix3x3() [2/6]

agx::SPDMatrix3x3::SPDMatrix3x3 ( const SPDMatrix3x3 mat)

Definition at line 137 of file SPDMatrix3x3.h.

◆ SPDMatrix3x3() [3/6]

agx::SPDMatrix3x3::SPDMatrix3x3 ( Real  a00,
Real  a01,
Real  a02,
Real  a10,
Real  a11,
Real  a12,
Real  a20,
Real  a21,
Real  a22 
)

Definition at line 142 of file SPDMatrix3x3.h.

References set().

◆ SPDMatrix3x3() [4/6]

agx::SPDMatrix3x3::SPDMatrix3x3 ( const Vec3 v)
explicit

Definition at line 154 of file SPDMatrix3x3.h.

References set().

◆ SPDMatrix3x3() [5/6]

agx::SPDMatrix3x3::SPDMatrix3x3 ( const Matrix3x3 m)
explicit

◆ SPDMatrix3x3() [6/6]

agx::SPDMatrix3x3::SPDMatrix3x3 ( const AffineMatrix4x4T< Real > &  m)
explicit

References agx::isNaN().

Member Function Documentation

◆ add()

void agx::SPDMatrix3x3::add ( const SPDMatrix3x3 a,
const SPDMatrix3x3 b 
)

Definition at line 360 of file SPDMatrix3x3.h.

References m_data.

Referenced by operator+(), and operator+=().

◆ at() [1/2]

Real & agx::SPDMatrix3x3::at ( size_t  row,
size_t  col 
)

Definition at line 175 of file SPDMatrix3x3.h.

References agxAssert, and operator()().

◆ at() [2/2]

Real agx::SPDMatrix3x3::at ( size_t  row,
size_t  col 
) const

Definition at line 183 of file SPDMatrix3x3.h.

References agxAssert, and operator()().

◆ determinant()

Real agx::SPDMatrix3x3::determinant ( ) const

Definition at line 329 of file SPDMatrix3x3.h.

References m_data.

Referenced by isValid().

◆ getDiagonal()

Vec3 agx::SPDMatrix3x3::getDiagonal ( ) const

Definition at line 324 of file SPDMatrix3x3.h.

References m_data.

◆ inverse()

SPDMatrix3x3 agx::SPDMatrix3x3::inverse ( ) const

References agx::mult().

◆ isIdentity()

bool agx::SPDMatrix3x3::isIdentity ( ) const

Definition at line 235 of file SPDMatrix3x3.h.

References SPDMatrix3x3().

◆ isNaN()

bool agx::SPDMatrix3x3::isNaN ( ) const

Definition at line 229 of file SPDMatrix3x3.h.

References m_data.

Referenced by isValid().

◆ isValid()

bool agx::SPDMatrix3x3::isValid ( ) const

Definition at line 208 of file SPDMatrix3x3.h.

References determinant(), isNaN(), and m_data.

◆ makeIdentity()

void agx::SPDMatrix3x3::makeIdentity ( )

Definition at line 240 of file SPDMatrix3x3.h.

References m_data.

Referenced by SPDMatrix3x3().

◆ mult()

void agx::SPDMatrix3x3::mult ( const SPDMatrix3x3 m,
const Real r 
)

Definition at line 350 of file SPDMatrix3x3.h.

References m_data.

Referenced by operator*(), agx::operator*(), operator*=(), operator/(), and operator/=().

◆ operator!=()

bool agx::SPDMatrix3x3::operator!= ( const SPDMatrix3x3 m) const

Definition at line 169 of file SPDMatrix3x3.h.

◆ operator()() [1/2]

Real & agx::SPDMatrix3x3::operator() ( size_t  row,
size_t  col 
)

Definition at line 191 of file SPDMatrix3x3.h.

References m_data.

Referenced by at().

◆ operator()() [2/2]

Real agx::SPDMatrix3x3::operator() ( size_t  row,
size_t  col 
) const

Definition at line 199 of file SPDMatrix3x3.h.

References m_data.

◆ operator*() [1/2]

SPDMatrix3x3 agx::SPDMatrix3x3::operator* ( const Real r) const

Definition at line 400 of file SPDMatrix3x3.h.

References mult().

◆ operator*() [2/2]

Vec3 agx::SPDMatrix3x3::operator* ( const Vec3 v) const

Definition at line 433 of file SPDMatrix3x3.h.

References postMult().

◆ operator*=()

void agx::SPDMatrix3x3::operator*= ( const Real r)

Definition at line 380 of file SPDMatrix3x3.h.

References mult().

◆ operator+()

SPDMatrix3x3 agx::SPDMatrix3x3::operator+ ( const SPDMatrix3x3 m) const

Definition at line 414 of file SPDMatrix3x3.h.

References add().

◆ operator+=()

void agx::SPDMatrix3x3::operator+= ( const SPDMatrix3x3 m)

Definition at line 390 of file SPDMatrix3x3.h.

References add().

◆ operator-()

SPDMatrix3x3 agx::SPDMatrix3x3::operator- ( const SPDMatrix3x3 m) const

Definition at line 421 of file SPDMatrix3x3.h.

References sub().

◆ operator-=()

void agx::SPDMatrix3x3::operator-= ( const SPDMatrix3x3 m)

Definition at line 395 of file SPDMatrix3x3.h.

References sub().

◆ operator/()

SPDMatrix3x3 agx::SPDMatrix3x3::operator/ ( const Real r) const

Definition at line 407 of file SPDMatrix3x3.h.

References mult().

◆ operator/=()

void agx::SPDMatrix3x3::operator/= ( const Real d)

Definition at line 385 of file SPDMatrix3x3.h.

References mult().

◆ operator=()

SPDMatrix3x3 & agx::SPDMatrix3x3::operator= ( const SPDMatrix3x3 rhs)

Definition at line 251 of file SPDMatrix3x3.h.

References m_data.

◆ operator==()

bool agx::SPDMatrix3x3::operator== ( const SPDMatrix3x3 m) const

Definition at line 159 of file SPDMatrix3x3.h.

References m_data.

◆ postMult()

Vec3 agx::SPDMatrix3x3::postMult ( const Vec3 v) const

Definition at line 336 of file SPDMatrix3x3.h.

References m_data, agx::Vec3T< T >::x(), agx::Vec3T< T >::y(), and agx::Vec3T< T >::z().

Referenced by operator*().

◆ preMult()

Vec3 agx::SPDMatrix3x3::preMult ( const Vec3 v) const

Definition at line 343 of file SPDMatrix3x3.h.

References m_data, agx::Vec3T< T >::x(), agx::Vec3T< T >::y(), and agx::Vec3T< T >::z().

Referenced by agx::operator*().

◆ ptr() [1/2]

Real * agx::SPDMatrix3x3::ptr ( )

Definition at line 458 of file SPDMatrix3x3.h.

References m_data.

◆ ptr() [2/2]

const Real * agx::SPDMatrix3x3::ptr ( ) const

Definition at line 463 of file SPDMatrix3x3.h.

References m_data.

◆ set() [1/5]

void agx::SPDMatrix3x3::set ( const AffineMatrix4x4T< Real > &  m)

◆ set() [2/5]

void agx::SPDMatrix3x3::set ( const Matrix3x3 m)

◆ set() [3/5]

void agx::SPDMatrix3x3::set ( const Vec3 v)

Definition at line 299 of file SPDMatrix3x3.h.

References m_data.

◆ set() [4/5]

void agx::SPDMatrix3x3::set ( Real  a00,
Real  a01,
Real  a02,
Real  a10,
Real  a11,
Real  a12,
Real  a20,
Real  a21,
Real  a22 
)

Definition at line 285 of file SPDMatrix3x3.h.

References m_data.

Referenced by SPDMatrix3x3().

◆ set() [5/5]

void agx::SPDMatrix3x3::set ( Real  v,
size_t  row,
size_t  col 
)

Set a single element of the matrix.

Parameters
vValue of the element
rowMatrix row
colMatrix column

Definition at line 311 of file SPDMatrix3x3.h.

References m_data.

◆ sub()

void agx::SPDMatrix3x3::sub ( const SPDMatrix3x3 a,
const SPDMatrix3x3 b 
)

Definition at line 370 of file SPDMatrix3x3.h.

References m_data.

Referenced by operator-(), and operator-=().

Member Data Documentation

◆ m_data

Type agx::SPDMatrix3x3::m_data[6]
protected

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