73 #define AGX_EULER_AXES() const int axes[4] = {0,1,2,0} 74 #define AGX_EULER_PAXES() const int paxes[4] = {1,2,0,1}; 83 inline int firstAxis()
const {
84 return ( m_c >> 3 )&3;
89 const static char *names[];
95 int getConvention()
const;
106 bool operator=(
const int &c );
113 return ( m_c >> 2 )&1;
116 return ( m_c >> 1 )&1;
118 inline int i()
const {
120 return axes[firstAxis()];
122 inline int j()
const {
124 return paxes[i()+isOdd()];
126 inline int k()
const {
128 return paxes[i()+!isOdd()];
140 enum Axes {X, Y, Z, W};
165 inline Real& operator [] (
size_t i);
170 inline Real operator [] (
size_t i)
const;
176 inline void set(
const Vec3& angles );
182 inline void set(
Real x,
218 template <
typename T>
222 template <
typename T>
295 bool get(
Quat &q )
const;
305 const Real* ptr()
const;
375 m_angles[0] = angles[0];
376 m_angles[1] = angles[1];
377 m_angles[2] = angles[2];
390 os <<
"[" << e[0] <<
" " << e[1] <<
" " << e[2] <<
"]";
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.
EulerAngles::EulerOrder & getOrder()
Get the convention.
Real x() const
Get the first angle.
Vec3T< T > min(const Vec3T< T > &lhs, const Vec3T< T > &rhs)
Vec3T< T > max(const Vec3T< T > &lhs, const Vec3T< T > &rhs)
int getConvention() const
Get the current convention.
The default Euler convention used by agx.
Matrix class for affine transformations.
Real z() const
Get the third angle.
bool isStatic() const
The computational routines used by the EulerAngle class.
This class provides conversion services between Euler angles in any of the 24 conventions and corresp...
#define AGX_EULER_PAXES()
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
std::ostream & operator<<(std::ostream &os, const agx::AddedMassInteraction::Matrix6x6 &m)
Real y() const
Get the second angle.
bool operator=(const EulerConvention::Convention &c)
Assignment operator.
Real & operator[](size_t i)
Get an element by index as a reference.
Convention
The 24 Euler conventions.
EulerOrder(EulerConvention::Convention=EulerConvention::DEFAULT_CONVENTION)
Default constructor: EulerConvention::DEFAULT_CONVENTION convention and 0 angles. ...
Specialized types of matrices for holding orthogonal transformation matrices.
void set(const Vec3 &angles)
Set the three angles in one call.