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,
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.
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.
std::ostream & operator<<(std::ostream &stream, const AtomicValueT< T > &value)
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()
Namespace agx contains the dynamics/math part of the AGX Dynamics API.
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.