79 #define AGX_EULER_AXES() const int axes[4] = {0,1,2,0}
80 #define AGX_EULER_PAXES() const int paxes[4] = {1,2,0,1};
89 inline int firstAxis()
const {
90 return ( m_c >> 3 )&3;
95 const static char *names[];
101 int getConvention()
const;
112 bool operator=(
const int &c );
119 return ( m_c >> 2 )&1;
122 return ( m_c >> 1 )&1;
124 inline int i()
const {
126 return axes[firstAxis()];
128 inline int j()
const {
130 return paxes[i()+isOdd()];
132 inline int k()
const {
134 return paxes[i()+!isOdd()];
146 enum Axes {X, Y, Z, W};
171 inline Real& operator [] (
size_t i);
176 inline Real operator [] (
size_t i)
const;
182 inline void set(
const Vec3& angles );
188 inline void set(
Real x,
194 EulerAngles::EulerOrder& getOrder();
197 const EulerAngles::EulerOrder& getOrder()
const;
209 EulerAngles(
const EulerAngles & e ) =
default;
222 EulerAngles & operator=(
const EulerAngles& e ) =
default;
288 bool get( Matrix4x4T<Real32>& m )
const;
289 bool get( Matrix4x4T<Real64>& m )
const;
296 bool get( OrthoMatrix3x3 & m )
const;
303 bool get( Matrix3x3T<double> & m )
const;
310 bool get(Matrix3x3T<float> &m)
const;
317 bool get(
Quat &q )
const;
327 const Real* ptr()
const;
393 m_angles[0] = angles[0];
394 m_angles[1] = angles[1];
395 m_angles[2] = angles[2];
408 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.
bool isStatic() const
The computational routines used by the EulerAngle class.
Vec3T< T > min(const Vec3T< T > &lhs, const Vec3T< T > &rhs)
Vec3T< T > max(const Vec3T< T > &lhs, const Vec3T< T > &rhs)
std::ostream & operator<<(std::ostream &stream, const AtomicValueT< T > &value)
The default Euler convention used by agx.
Matrix class for affine transformations.
int getConvention() const
Get the current convention.
This class provides conversion services between Euler angles in any of the 24 conventions and corresp...
#define AGX_EULER_PAXES()
Real x() const
Get the first angle.
bool operator=(const EulerConvention::Convention &c)
Assignment operator.
Real & operator[](size_t i)
Get an element by index as a reference.
Real z() const
Get the third angle.
Real y() const
Get the second angle.
Convention
The 24 Euler conventions.
EulerOrder(EulerConvention::Convention=EulerConvention::DEFAULT_CONVENTION)
Default constructor: EulerConvention::DEFAULT_CONVENTION convention and 0 angles. ...
void set(const Vec3 &angles)
Set the three angles in one call.