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] ) ;
126 bool isIdentity()
const;
133 if ( &rhs ==
this )
return *
this;
142 inline void set(
Real const *
const ptr ) {
144 for (
size_t i = 0;i < 9;++i ) local_ptr[i] = (
Real )ptr[i];
161 void get(
Quat& q )
const;
162 inline Quat get( )
const;
176 return (
Real* )m_data;
179 return (
const Real * )m_data;
184 void setRotate(
const Vec3& from,
const Vec3& to );
185 void setRotate(
Real angle,
const Vec3& axis );
187 void setRotate(
const Quat& );
188 void setRotate(
Real angle1,
const Vec3& axis1,
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 );
283 m_data[0][1], m_data[1][1], m_data[2][1],
284 m_data[0][2], m_data[1][2], m_data[2][2]);
289 return Vec3( ( m_data[0][0]*v.
x() + m_data[0][1]*v.
y() + m_data[0][2]*v.
z() ),
290 ( m_data[1][0]*v.
x() + m_data[1][1]*v.
y() + m_data[1][2]*v.
z() ),
291 ( m_data[2][0]*v.
x() + m_data[2][1]*v.
y() + m_data[2][2]*v.
z() ) );
295 return Vec3( ( m_data[0][0]*v.
x() + m_data[1][0]*v.
y() + m_data[2][0]*v.
z() ),
296 ( m_data[0][1]*v.
x() + m_data[1][1]*v.
y() + m_data[2][1]*v.
z() ),
297 ( m_data[0][2]*v.
x() + m_data[1][2]*v.
y() + m_data[2][2]*v.
z() ) );
306 return postMult( v );
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;
Real mult(const Jacobian6DOFElementT< T > &G1, const Jacobian6DOFElementT< T > &G2)
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.
OrthoMatrix3x3 transpose() const
void setRow(size_t row, const agx::Vec3 &vec)
Set the row of the matrix,.
OrthoMatrix3x3()
Default constructor.
bool invert(const OrthoMatrix3x3 &rhs)
OrthoMatrix3x3(const OrthoMatrix3x3 &mat)
Copy constructor.
bool operator==(T val, InvalidIndexStruct)
OrthoMatrix3x3 inverse() const
static OrthoMatrix3x3 rotate(const Vec3 &from, const Vec3 &to)
T inverse(const T &value)
void mult(const OrthoMatrix3x3 &, const OrthoMatrix3x3 &)
This class provides conversion services between Euler angles in any of the 24 conventions and corresp...
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
OrthoMatrix3x3(EulerAngles &euler)
std::ostream & operator<<(std::ostream &os, const agx::AddedMassInteraction::Matrix6x6 &m)
void setRotate(const Vec3 &from, const Vec3 &to)
OrthoMatrix3x3(Real const *const ptr)
Real & operator()(size_t row, size_t col)
Real operator()(size_t row, size_t col) const
bool operator!=(T val, InvalidIndexStruct)
Vec3 getRow(size_t row) const
Return the row of the matrix,.
Vec3 postMult(const Vec3 &v) const
OrthoMatrix3x3(const Quat &quat)
Vec3 operator*(const Vec3 &v) const
void setColumn(size_t col, const agx::Vec3 &vec)
Set the column of the matrix,.
Vec3T< T > operator*(const Vec3T< T > &v, const AffineMatrix4x4T< T > &m)
Specialized types of matrices for holding orthogonal transformation matrices.
Vec3 preMult(const Vec3 &v) const