 |
AGX Dynamics
2.38.0.2
|
Go to the documentation of this file.
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,
188 EulerAngles::EulerOrder& getOrder();
191 const EulerAngles::EulerOrder& getOrder()
const;
203 EulerAngles(
const EulerAngles & e ) =
default;
212 EulerAngles & operator=(
const EulerAngles& e ) =
default;
218 template <
typename T>
222 template <
typename T>
279 bool get( Matrix4x4T<T>& m )
const;
287 bool get( Matrix3x3T<T> & m )
const;
288 bool get( OrthoMatrix3x3 & m )
const;
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] <<
"]";
EulerAngles::EulerOrder & getOrder()
Get the convention.
std::ostream & operator<<(std::ostream &os, const agx::AddedMassInteraction::Matrix6x6 &m)
Real x() const
Get the first angle.
Real z() const
Get the third angle.
#define AGX_EULER_PAXES()
int getConvention() const
Get the current convention.
bool isStatic() const
The computational routines used by the EulerAngle class.
Real y() const
Get the second angle.
bool operator=(const EulerConvention::Convention &c)
Assignment operator.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Matrix class for affine transformations.
Convention
The 24 Euler conventions.
@ DEFAULT_CONVENTION
The default Euler convention used by agx.
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.
Vec3T< T > min(const Vec3T< T > &lhs, const Vec3T< T > &rhs)
This class provides conversion services between Euler angles in any of the 24 conventions and corresp...
Real & operator[](size_t i)
Get an element by index as a reference.
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.
Vec3T< T > max(const Vec3T< T > &lhs, const Vec3T< T > &rhs)