67 m_data[row][0] = vec[0];
68 m_data[row][1] = vec[1];
69 m_data[row][2] = vec[2];
77 return Vec3(m_data[row][0], m_data[row][1], m_data[row][2]);
87 m_data[0][col] = vec[0];
88 m_data[1][col] = vec[1];
89 m_data[2][col] = vec[2];
101 const int bitCompare = memcmp(m_data, m.
m_data,
sizeof(m_data));
102 return (bitCompare == 0);
106 const int bitCompare = memcmp(m_data, m.
m_data,
sizeof(m_data));
107 return (bitCompare != 0);
111 return m_data[row][col];
114 return m_data[row][col];
121 return std::isnan( m_data[0][0] ) || std::isnan( m_data[0][1] ) || std::isnan( m_data[0][2] ) ||
122 std::isnan( m_data[1][0] ) || std::isnan( m_data[1][1] ) || std::isnan( m_data[1][2] ) ||
123 std::isnan( m_data[2][0] ) || std::isnan( m_data[2][1] ) || std::isnan( m_data[2][2] ) ;
133 if ( &rhs ==
this )
return *
this;
144 for (
size_t i = 0;i < 9;++i ) local_ptr[i] = (
Real )ptr[i];
162 inline Quat get( )
const;
176 return (
Real* )m_data;
179 return (
const Real * )m_data;
202 inline Vec3 preMult(
const Vec3& v )
const;
203 inline Vec3 postMult(
const Vec3& v )
const;
207 return Vec3( m_data[0][0], m_data[1][1], m_data[2][2] );
217 if (
this == &other ) {
221 else postMult( other );
263 m.
setRotate( angle1, axis1, angle2, axis2, angle3, axis3 );
311 os <<
"{" << std::endl;
312 for (
size_t row = 0; row < 3; ++row ) {
314 for (
size_t col = 0; col < 3; ++col )
315 os << m( row, col ) <<
" ";
318 os <<
"}" << std::endl;
This class provides conversion services between Euler angles in any of the 24 conventions and corresp...
Specialized types of matrices for holding orthogonal transformation matrices.
Real & operator()(size_t row, size_t col)
bool invert_3x3_new(const agx::OrthoMatrix3x3 &)
void setColumn(size_t col, const agx::Vec3 &vec)
Set the column of the matrix,.
Vec3 getRow(size_t row) const
Return the row of the matrix,.
Vec3 postMult(const Vec3 &v) const
OrthoMatrix3x3(EulerAngles &euler)
OrthoMatrix3x3(Real const *const ptr)
Vec3 preMult(const Vec3 &v) const
void setRotate(Real angle1, const Vec3 &axis1, Real angle2, const Vec3 &axis2, Real angle3, const Vec3 &axis3)
void set(const OrthoMatrix3x3 &rhs)
OrthoMatrix3x3 transpose() const
OrthoMatrix3x3(const Quat &quat)
void mult(const OrthoMatrix3x3 &, const OrthoMatrix3x3 &)
OrthoMatrix3x3 inverse() const
void setRotate(const Quat &)
void setRotate(Real angle, const Vec3 &axis)
void preMult(const OrthoMatrix3x3 &)
OrthoMatrix3x3 & set(const Quat &q_)
Set the value of this matrix from the specified quaternion.
void setRotate(const Vec3 &from, const Vec3 &to)
void get(EulerAngles &e) const
Convert the rotation of this matrix into a specified EulerAngles representation.
OrthoMatrix3x3()
Default constructor.
void setRow(size_t row, const agx::Vec3 &vec)
Set the row of the matrix,.
static OrthoMatrix3x3 rotate(const Vec3 &from, const Vec3 &to)
OrthoMatrix3x3 & set(EulerAngles &e)
Set the rotation of matrix to be the rotation specified in the given EulerAngles object.
Vec3 operator*(const Vec3 &v) const
bool invert(const OrthoMatrix3x3 &rhs)
void set(Real a00, Real a01, Real a02, Real a10, Real a11, Real a12, Real a20, Real a21, Real a22)
Real operator()(size_t row, size_t col) const
OrthoMatrix3x3(const OrthoMatrix3x3 &mat)
Copy constructor.
void postMult(const OrthoMatrix3x3 &)
void set(Real const *const ptr)
OrthoMatrix3x3(Real a00, Real a01, Real a02, Real a10, Real a11, Real a12, Real a20, Real a21, Real a22)
void get(Quat &q) const
Set the quaternion with the rotation from this matrix.
void setRotate(Real angle, Real x, Real y, Real z)
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.
bool operator!=(T val, InvalidIndexStruct)
bool operator==(T val, InvalidIndexStruct)
Vec3T< T > operator*(const Vec3T< T > &v, const AffineMatrix4x4T< T > &m)
T inverse(const T &value)
std::ostream & operator<<(std::ostream &stream, const AtomicValueT< T > &value)