AGX Dynamics 2.41.2.0
Loading...
Searching...
No Matches
agx::QuatT< T > Class Template Reference

The object holding quaternions and providing operations on these. More...

#include <QuatTemplate.h>

Public Types

typedef T Type
 

Public Member Functions

 QuatT ()
 Default constructor. Create a Quaternion with an identity rotation.
 
 QuatT (const AffineMatrix4x4T< T > &matrix)
 Create a Quaternion based on the rotation part in the specified Affine 4x4 transformation matrix.
 
 QuatT (const EulerAngles &euler)
 Create a Quaternion based on the rotation from euler specified as a EulerAngle.
 
 QuatT (const QuatT< T > &copy)=default
 Copy constructor.
 
template<typename T2 >
 QuatT (const QuatT< T2 > &copy)
 Copy constructor for other types.
 
 QuatT (const Vec3T< T > &from, const Vec3T< T > &to)
 Create a Quaternion which maps the rotation from vector from to the vector to.
 
 QuatT (const Vec4T< T > &v)
 Create a Quaternion based on the 4D vector (x,y,z,w)
 
 QuatT (T angle, const Vec3T< T > &axis)
 Create a Quaternion calculated from a rotation of angle radians around the rotation axis axis.
 
 QuatT (T angle1, const Vec3T< T > &axis1, T angle2, const Vec3T< T > &axis2, T angle3, const Vec3T< T > &axis3)
 Create a Quaternion based on the concatenation between the three specified angle and axis.
 
 QuatT (T x, T y, T z, T w)
 Create a Quaternion with the specified scalar values.
 
Vec3T< T > asVec3 () const
 
Vec4T< T > asVec4 () const
 
QuatT< T > conj () const
 
void get (AffineMatrix4x4T< T > &matrix) const
 Set the Rotational part of matrix from this quaternion.
 
void get (EulerAngles &euler) const
 Convert this quaternion to an EulerAngles representation.
 
void get (OrthoMatrix3x3 &matrix) const
 Set an OrthoMatrix3x3 to represent the same rotation as the quaternion.
 
void get (T &angle, agx::Vec3T< T > &axis) const
 Convert a Quaternion to an axis and angle representation.
 
agx::Real getAngle () const
 Get the rotation angle represented by the quaternion.
 
Vec3T< T > getAsEulerAngles (agx::EulerConvention::Convention convention=agx::EulerConvention::Convention::DEFAULT_CONVENTION) const
 Convert to Euler anglers.
 
void getRotate (T &angle, T &x, T &y, T &z) const
 Get the angle and vector components represented by the quaternion.
 
void getRotate (T &angle, Vec3T< T > &vec) const
 Get the angle and vector represented by the quaternion.
 
agx::Vec3T< T > getUnitVector () const
 Get the rotation unit vector represented by the quaternion.
 
QuatT< T > inverse () const
 Multiplicative inverse method: q^(-1) = q^*‍/(q.q^*)
 
const QuatT< T > leftMult (const QuatT< T > &rhs) const
 Binary left multiplication: q = p * rhs; results in the OTHER WAY AROUND: q = rhs quatmultiply p;.
 
length () const
 
length2 () const
 
normalize ()
 Normalize the quat so that it has unit length.
 
bool operator!= (const QuatT< T > &v) const
 
const QuatT< T > operator* (const QuatT< T > &rhs) const
 Binary LEFT multiply: result is q = rhs quatmultiply this, even though the notation is q = this * rhs ;.
 
Vec3T< T > operator* (const Vec3T< T > &v) const
 Rotate a vector by this quaternion.
 
const QuatT< T > operator* (T rhs) const
 Multiply by scalar rhs.
 
QuatT< T > & operator*= (const QuatT< T > &rhs)
 Unary LEFT multiply: result is this = rhs quatmultiply this, which makes sense since the notation suggests this = rhs * this ;.
 
QuatT< T > & operator*= (T rhs)
 Unary multiply by scalar rhs.
 
const QuatT< T > operator+ (const QuatT< T > &rhs) const
 Binary addition.
 
QuatT< T > & operator+= (const QuatT< T > &rhs)
 Unary addition.
 
const QuatT< T > operator- () const
 Negation operator - returns the negative of the quaternion.
 
const QuatT< T > operator- (const QuatT< T > &rhs) const
 Binary subtraction.
 
QuatT< T > & operator-= (const QuatT< T > &rhs)
 Unary subtraction.
 
const QuatT< T > operator/ (const QuatT< T > &denom) const
 Binary divide.
 
QuatT< T > operator/ (T rhs) const
 Divide by scalar rhs.
 
QuatT< T > & operator/= (const QuatT< T > &denom)
 Unary divide.
 
QuatT< T > & operator/= (T rhs)
 Unary divide by scalar rhs.
 
QuatT< T > & operator= (const QuatT< T > &v)
 Assignment operator.
 
bool operator== (const QuatT< T > &v) const
 Test for equality.
 
T & operator[] (size_t i)
 
operator[] (size_t i) const
 
T * ptr ()
 
const T * ptr () const
 
const QuatT< T > rightMult (const QuatT< T > &rhs) const
 Binary RIGHT multiplication: q = p * rhs ; results in q = p quatmultiply rhs ;.
 
QuatT< T > & set (const AffineMatrix4x4T< T > &matrix)
 Set this quaternion with the rotational part of matrix.
 
QuatT< T > & set (const EulerAngles &euler)
 Set this quaternion with the rotation described by the EulerAngles representation.
 
QuatT< T > & set (const OrthoMatrix3x3 &matrix)
 Set this quaternion with the rotation described by a OrthoMatrix3x3.
 
void set (const Vec4T< T > &v)
 Set the four elements of the quaternion as an Vec4.
 
void set (T x, T y, T z, T w)
 Set the 4 elements of the quaternion as 4 scalars.
 
void setRotate (const Vec3T< T > &from, const Vec3T< T > &to)
 Make a rotation QuatT<T> which will rotate from to to Generally take a dot product to get the angle between these and then use a cross product to get the rotation axis Watch out for the two special cases when the vectors are co-incident or opposite in direction.
 
void setRotate (T angle, const Vec3T< T > &vec)
 Set the rotation of this Quaternion as a rotation angle radians around the vector vec.
 
void setRotate (T angle, T x, T y, T z)
 Set the rotation of the Quaternion as a rotation angle radians around the vector (x, y, z)
 
void setRotate (T angle1, const Vec3T< T > &axis1, T angle2, const Vec3T< T > &axis2, T angle3, const Vec3T< T > &axis3)
 Set the rotation of this Quaternion as a concatenation of the three angle/axis rotations:
 
void slerp (T t, const QuatT< T > &from, const QuatT< T > &to)
 Spherical Linear Interpolation.
 
T & w ()
 
w () const
 
T & x ()
 
x () const
 
T & y ()
 
y () const
 
T & z ()
 
z () const
 
bool zeroRotation () const
 

Static Public Member Functions

static QuatT< T > rotate (const Vec3T< T > &from, const Vec3T< T > &to)
 Static method which constructs and returns a Quaternion from rotating vector from to vector to.
 
static QuatT< T > rotate (T angle, const Vec3T< T > &vec)
 Static method which constructs and returns a Quaternion from a rotation given as angle radians around the vector vec.
 
static QuatT< T > rotate (T angle, T x, T y, T z)
 Static method which constructs and returns a Quaternion from a rotation given as angle radians around the vector (x, y, z)
 
static QuatT< T > rotate (T angle1, const Vec3T< T > &axis1, T angle2, const Vec3T< T > &axis2, T angle3, const Vec3T< T > &axis3)
 Static method which constructs and returns a Quaternion from a rotation given as a concatenation of the three angle/axis rotations:
 

Protected Attributes

m_data [4]
 

Detailed Description

template<typename T>
class agx::QuatT< T >

The object holding quaternions and providing operations on these.

The quaternion class holds a representation of quaternion objects and provides simple arithmetic as well as conversion utilities. In addition, the class can compute the 3x4 matrices for converting angular velocities to quaternion velocities and vice versa. The class can also convert from and to a 3x3 orthonormal matrix.

The convention adopted for quaternions is that they map a moving frame to the fixed global reference.

Definition at line 56 of file QuatTemplate.h.

Member Typedef Documentation

◆ Type

template<typename T >
typedef T agx::QuatT< T >::Type

Definition at line 60 of file QuatTemplate.h.

Constructor & Destructor Documentation

◆ QuatT() [1/10]

template<typename T >
agx::QuatT< T >::QuatT

Default constructor. Create a Quaternion with an identity rotation.

Definition at line 408 of file QuatTemplate.h.

◆ QuatT() [2/10]

template<typename T >
agx::QuatT< T >::QuatT ( x,
y,
z,
w 
)

Create a Quaternion with the specified scalar values.

Definition at line 417 of file QuatTemplate.h.

◆ QuatT() [3/10]

template<typename T >
agx::QuatT< T >::QuatT ( const Vec4T< T > &  v)
explicit

Create a Quaternion based on the 4D vector (x,y,z,w)

Definition at line 426 of file QuatTemplate.h.

References agx::Vec4T< T >::w(), agx::Vec4T< T >::x(), agx::Vec4T< T >::y(), and agx::Vec4T< T >::z().

◆ QuatT() [4/10]

template<typename T >
agx::QuatT< T >::QuatT ( angle,
const Vec3T< T > &  axis 
)

Create a Quaternion calculated from a rotation of angle radians around the rotation axis axis.

Definition at line 435 of file QuatTemplate.h.

◆ QuatT() [5/10]

template<typename T >
agx::QuatT< T >::QuatT ( angle1,
const Vec3T< T > &  axis1,
angle2,
const Vec3T< T > &  axis2,
angle3,
const Vec3T< T > &  axis3 
)

Create a Quaternion based on the concatenation between the three specified angle and axis.

Definition at line 441 of file QuatTemplate.h.

◆ QuatT() [6/10]

template<typename T >
agx::QuatT< T >::QuatT ( const Vec3T< T > &  from,
const Vec3T< T > &  to 
)

Create a Quaternion which maps the rotation from vector from to the vector to.

Definition at line 449 of file QuatTemplate.h.

◆ QuatT() [7/10]

template<typename T >
agx::QuatT< T >::QuatT ( const EulerAngles euler)
explicit

Create a Quaternion based on the rotation from euler specified as a EulerAngle.

◆ QuatT() [8/10]

template<typename T >
agx::QuatT< T >::QuatT ( const QuatT< T > &  copy)
default

Copy constructor.

◆ QuatT() [9/10]

template<typename T >
template<typename T2 >
agx::QuatT< T >::QuatT ( const QuatT< T2 > &  copy)
explicit

Copy constructor for other types.

Definition at line 457 of file QuatTemplate.h.

◆ QuatT() [10/10]

template<typename T >
agx::QuatT< T >::QuatT ( const AffineMatrix4x4T< T > &  matrix)
explicit

Create a Quaternion based on the rotation part in the specified Affine 4x4 transformation matrix.

Definition at line 466 of file QuatTemplate.h.

Member Function Documentation

◆ asVec3()

template<typename T >
Vec3T< T > agx::QuatT< T >::asVec3
Returns
the vector part (x,y,z) as a Vec3T<T>

Definition at line 501 of file QuatTemplate.h.

◆ asVec4()

template<typename T >
Vec4T< T > agx::QuatT< T >::asVec4
Returns
the elements in the Quaternion as a Vec4

Definition at line 495 of file QuatTemplate.h.

◆ conj()

template<typename T >
QuatT< T > agx::QuatT< T >::conj
Returns
the conjugate

Definition at line 730 of file QuatTemplate.h.

◆ get() [1/4]

template<typename T >
void agx::QuatT< T >::get ( AffineMatrix4x4T< T > &  matrix) const

Set the Rotational part of matrix from this quaternion.

Parameters
matrix- reference to the matrix where the result will be written.

◆ get() [2/4]

template<typename T >
void agx::QuatT< T >::get ( EulerAngles euler) const

Convert this quaternion to an EulerAngles representation.

param euler - reference to where the result will be written.

◆ get() [3/4]

template<typename T >
void agx::QuatT< T >::get ( OrthoMatrix3x3 matrix) const

Set an OrthoMatrix3x3 to represent the same rotation as the quaternion.

Parameters
matrix- reference to the matrix where the result will be written.

◆ get() [4/4]

template<typename T >
void agx::QuatT< T >::get ( T &  angle,
agx::Vec3T< T > &  axis 
) const

Convert a Quaternion to an axis and angle representation.

Parameters
axis- reference to which the axis will be written
angle- reference to the real value where the angle will be written

◆ getAngle()

template<typename T >
agx::Real agx::QuatT< T >::getAngle ( ) const

Get the rotation angle represented by the quaternion.

◆ getAsEulerAngles()

template<typename T >
Vec3T< T > agx::QuatT< T >::getAsEulerAngles ( agx::EulerConvention::Convention  convention = agx::EulerConvention::Convention::DEFAULT_CONVENTION) const

Convert to Euler anglers.

and retrieve as a Vec3 with the angles stored.

Parameters
convention- The specified convention for EulerAngles

◆ getRotate() [1/2]

template<typename T >
void agx::QuatT< T >::getRotate ( T &  angle,
T &  x,
T &  y,
T &  z 
) const

Get the angle and vector components represented by the quaternion.

Referenced by agx::RigidBody::getCmRotation(), agx::RigidBody::getRotation(), and agxCollide::Geometry::getRotation().

◆ getRotate() [2/2]

template<typename T >
void agx::QuatT< T >::getRotate ( T &  angle,
Vec3T< T > &  vec 
) const

Get the angle and vector represented by the quaternion.

◆ getUnitVector()

template<typename T >
agx::Vec3T< T > agx::QuatT< T >::getUnitVector ( ) const

Get the rotation unit vector represented by the quaternion.

◆ inverse()

template<typename T >
QuatT< T > agx::QuatT< T >::inverse

Multiplicative inverse method: q^(-1) = q^*‍/(q.q^*)

Definition at line 736 of file QuatTemplate.h.

Referenced by agx::QuatT< T >::operator/(), and agx::QuatT< T >::operator/=().

◆ leftMult()

template<typename T >
const QuatT< T > agx::QuatT< T >::leftMult ( const QuatT< T > &  rhs) const

Binary left multiplication: q = p * rhs; results in the OTHER WAY AROUND: q = rhs quatmultiply p;.

Definition at line 634 of file QuatTemplate.h.

◆ length()

template<typename T >
T agx::QuatT< T >::length
Returns
the length of the quaternion = sqrt( vec . vec )

Definition at line 718 of file QuatTemplate.h.

◆ length2()

template<typename T >
T agx::QuatT< T >::length2
Returns
the squared length of the quaternion = vec . vec

Definition at line 724 of file QuatTemplate.h.

◆ normalize()

template<typename T >
T agx::QuatT< T >::normalize

Normalize the quat so that it has unit length.

Returns the previous length of the quat.

Definition at line 789 of file QuatTemplate.h.

◆ operator!=()

template<typename T >
bool agx::QuatT< T >::operator!= ( const QuatT< T > &  v) const
Returns
true if v is not identical to this quaternion

Definition at line 489 of file QuatTemplate.h.

References agx::QuatT< T >::m_data.

◆ operator*() [1/3]

template<typename T >
const QuatT< T > agx::QuatT< T >::operator* ( const QuatT< T > &  rhs) const

Binary LEFT multiply: result is q = rhs quatmultiply this, even though the notation is q = this * rhs ;.

Definition at line 610 of file QuatTemplate.h.

References agx::QuatT< T >::m_data.

◆ operator*() [2/3]

template<typename T >
Vec3T< T > agx::QuatT< T >::operator* ( const Vec3T< T > &  v) const
inline

Rotate a vector by this quaternion.

Definition at line 776 of file QuatTemplate.h.

◆ operator*() [3/3]

template<typename T >
const QuatT< T > agx::QuatT< T >::operator* ( rhs) const

Multiply by scalar rhs.

Definition at line 594 of file QuatTemplate.h.

◆ operator*=() [1/2]

template<typename T >
QuatT< T > & agx::QuatT< T >::operator*= ( const QuatT< T > &  rhs)

Unary LEFT multiply: result is this = rhs quatmultiply this, which makes sense since the notation suggests this = rhs * this ;.

Definition at line 619 of file QuatTemplate.h.

References agx::QuatT< T >::m_data.

◆ operator*=() [2/2]

template<typename T >
QuatT< T > & agx::QuatT< T >::operator*= ( rhs)

Unary multiply by scalar rhs.

Definition at line 600 of file QuatTemplate.h.

◆ operator+()

template<typename T >
const QuatT< T > agx::QuatT< T >::operator+ ( const QuatT< T > &  rhs) const

Binary addition.

Definition at line 678 of file QuatTemplate.h.

References agx::QuatT< T >::m_data.

◆ operator+=()

template<typename T >
QuatT< T > & agx::QuatT< T >::operator+= ( const QuatT< T > &  rhs)

Unary addition.

Definition at line 685 of file QuatTemplate.h.

References agx::QuatT< T >::m_data.

◆ operator-() [1/2]

template<typename T >
const QuatT< T > agx::QuatT< T >::operator-

Negation operator - returns the negative of the quaternion.

Basically just calls operator - () on the Vec4

Definition at line 712 of file QuatTemplate.h.

◆ operator-() [2/2]

template<typename T >
const QuatT< T > agx::QuatT< T >::operator- ( const QuatT< T > &  rhs) const

Binary subtraction.

Definition at line 695 of file QuatTemplate.h.

References agx::QuatT< T >::m_data.

◆ operator-=()

template<typename T >
QuatT< T > & agx::QuatT< T >::operator-= ( const QuatT< T > &  rhs)

Unary subtraction.

Definition at line 702 of file QuatTemplate.h.

References agx::QuatT< T >::m_data.

◆ operator/() [1/2]

template<typename T >
const QuatT< T > agx::QuatT< T >::operator/ ( const QuatT< T > &  denom) const

Binary divide.

Definition at line 665 of file QuatTemplate.h.

References agx::QuatT< T >::inverse().

◆ operator/() [2/2]

template<typename T >
QuatT< T > agx::QuatT< T >::operator/ ( rhs) const

Divide by scalar rhs.

Definition at line 647 of file QuatTemplate.h.

◆ operator/=() [1/2]

template<typename T >
QuatT< T > & agx::QuatT< T >::operator/= ( const QuatT< T > &  denom)

Unary divide.

Definition at line 671 of file QuatTemplate.h.

References agx::QuatT< T >::inverse().

◆ operator/=() [2/2]

template<typename T >
QuatT< T > & agx::QuatT< T >::operator/= ( rhs)

Unary divide by scalar rhs.

Definition at line 654 of file QuatTemplate.h.

◆ operator=()

template<typename T >
QuatT< T > & agx::QuatT< T >::operator= ( const QuatT< T > &  v)

Assignment operator.

Definition at line 473 of file QuatTemplate.h.

References agx::QuatT< T >::m_data.

◆ operator==()

template<typename T >
bool agx::QuatT< T >::operator== ( const QuatT< T > &  v) const

Test for equality.

Returns
true if this Quaternion is identical (using == operator) to v

Definition at line 483 of file QuatTemplate.h.

References agx::QuatT< T >::m_data.

◆ operator[]() [1/2]

template<typename T >
T & agx::QuatT< T >::operator[] ( size_t  i)
Returns
a reference to the i:th element of the quaternion in the order x,y,z,w

Definition at line 525 of file QuatTemplate.h.

References agxAssert.

◆ operator[]() [2/2]

template<typename T >
T agx::QuatT< T >::operator[] ( size_t  i) const
Returns
the value of the i:th element of the quaternion in the order x,y,z,w

Definition at line 532 of file QuatTemplate.h.

References agxAssert.

◆ ptr() [1/2]

template<typename T >
T * agx::QuatT< T >::ptr
Returns
a pointer to the data

Definition at line 804 of file QuatTemplate.h.

◆ ptr() [2/2]

template<typename T >
const T * agx::QuatT< T >::ptr
Returns
a const pointer to the data

Definition at line 810 of file QuatTemplate.h.

◆ rightMult()

template<typename T >
const QuatT< T > agx::QuatT< T >::rightMult ( const QuatT< T > &  rhs) const

Binary RIGHT multiplication: q = p * rhs ; results in q = p quatmultiply rhs ;.

Definition at line 640 of file QuatTemplate.h.

◆ rotate() [1/4]

template<typename T >
QuatT< T > agx::QuatT< T >::rotate ( const Vec3T< T > &  from,
const Vec3T< T > &  to 
)
static

Static method which constructs and returns a Quaternion from rotating vector from to vector to.

Definition at line 767 of file QuatTemplate.h.

References agx::QuatT< T >::setRotate().

◆ rotate() [2/4]

template<typename T >
QuatT< T > agx::QuatT< T >::rotate ( angle,
const Vec3T< T > &  vec 
)
static

Static method which constructs and returns a Quaternion from a rotation given as angle radians around the vector vec.

Definition at line 749 of file QuatTemplate.h.

References agx::QuatT< T >::setRotate().

◆ rotate() [3/4]

template<typename T >
QuatT< T > agx::QuatT< T >::rotate ( angle,
x,
y,
z 
)
static

Static method which constructs and returns a Quaternion from a rotation given as angle radians around the vector (x, y, z)

Definition at line 743 of file QuatTemplate.h.

◆ rotate() [4/4]

template<typename T >
QuatT< T > agx::QuatT< T >::rotate ( angle1,
const Vec3T< T > &  axis1,
angle2,
const Vec3T< T > &  axis2,
angle3,
const Vec3T< T > &  axis3 
)
static

Static method which constructs and returns a Quaternion from a rotation given as a concatenation of the three angle/axis rotations:

this = q1*q2*q3

Definition at line 757 of file QuatTemplate.h.

References agx::QuatT< T >::setRotate().

◆ set() [1/5]

template<typename T >
QuatT< T > & agx::QuatT< T >::set ( const AffineMatrix4x4T< T > &  matrix)

Set this quaternion with the rotational part of matrix.

Returns
a reference to this updated quaternion.

◆ set() [2/5]

template<typename T >
QuatT< T > & agx::QuatT< T >::set ( const EulerAngles euler)

Set this quaternion with the rotation described by the EulerAngles representation.

Returns
reference to this updated quaternion.

◆ set() [3/5]

template<typename T >
QuatT< T > & agx::QuatT< T >::set ( const OrthoMatrix3x3 matrix)

Set this quaternion with the rotation described by a OrthoMatrix3x3.

Returns
a reference to this updated quaternion.

◆ set() [4/5]

template<typename T >
void agx::QuatT< T >::set ( const Vec4T< T > &  v)

Set the four elements of the quaternion as an Vec4.

Definition at line 516 of file QuatTemplate.h.

References agx::Vec4T< T >::w(), agx::Vec4T< T >::x(), agx::Vec4T< T >::y(), and agx::Vec4T< T >::z().

◆ set() [5/5]

template<typename T >
void agx::QuatT< T >::set ( x,
y,
z,
w 
)

Set the 4 elements of the quaternion as 4 scalars.

Definition at line 507 of file QuatTemplate.h.

◆ setRotate() [1/4]

template<typename T >
void agx::QuatT< T >::setRotate ( const Vec3T< T > &  from,
const Vec3T< T > &  to 
)

Make a rotation QuatT<T> which will rotate from to to Generally take a dot product to get the angle between these and then use a cross product to get the rotation axis Watch out for the two special cases when the vectors are co-incident or opposite in direction.

◆ setRotate() [2/4]

template<typename T >
void agx::QuatT< T >::setRotate ( angle,
const Vec3T< T > &  vec 
)

Set the rotation of this Quaternion as a rotation angle radians around the vector vec.

◆ setRotate() [3/4]

template<typename T >
void agx::QuatT< T >::setRotate ( angle,
x,
y,
z 
)

Set the rotation of the Quaternion as a rotation angle radians around the vector (x, y, z)

Referenced by agx::QuatT< T >::rotate(), agx::AffineMatrix4x4T< T >::setRotate(), and agx::Matrix4x4T< T >::setRotate().

◆ setRotate() [4/4]

template<typename T >
void agx::QuatT< T >::setRotate ( angle1,
const Vec3T< T > &  axis1,
angle2,
const Vec3T< T > &  axis2,
angle3,
const Vec3T< T > &  axis3 
)

Set the rotation of this Quaternion as a concatenation of the three angle/axis rotations:

this = q1*q2*q3

◆ slerp()

template<typename T >
void agx::QuatT< T >::slerp ( t,
const QuatT< T > &  from,
const QuatT< T > &  to 
)

Spherical Linear Interpolation.

As t goes from 0 to 1, the QuatT<T> object goes from from to to.

◆ w() [1/2]

template<typename T >
T & agx::QuatT< T >::w
Returns
a reference to the scalar (last) element of the quaternion.

Definition at line 557 of file QuatTemplate.h.

◆ w() [2/2]

template<typename T >
T agx::QuatT< T >::w
Returns
the value of the scalar (last) element of the quaternion.

Definition at line 581 of file QuatTemplate.h.

◆ x() [1/2]

template<typename T >
T & agx::QuatT< T >::x
Returns
a reference to the first element of the vector part of the quaternion.

Definition at line 539 of file QuatTemplate.h.

◆ x() [2/2]

template<typename T >
T agx::QuatT< T >::x
Returns
the value of the first element of the vector part of the quaternion.

Definition at line 563 of file QuatTemplate.h.

◆ y() [1/2]

template<typename T >
T & agx::QuatT< T >::y
Returns
a reference to the second element of the vector part of the quaternion.

Definition at line 545 of file QuatTemplate.h.

◆ y() [2/2]

template<typename T >
T agx::QuatT< T >::y
Returns
the value of the second element of the vector part of the quaternion.

Definition at line 569 of file QuatTemplate.h.

◆ z() [1/2]

template<typename T >
T & agx::QuatT< T >::z
Returns
a reference to the third element of the vector part of the quaternion.

Definition at line 551 of file QuatTemplate.h.

◆ z() [2/2]

template<typename T >
T agx::QuatT< T >::z
Returns
the value of the third element of the vector part of the quaternion.

Definition at line 575 of file QuatTemplate.h.

◆ zeroRotation()

template<typename T >
bool agx::QuatT< T >::zeroRotation
inline
Returns
true if the QuatT<T> represents a zero rotation, and therefore can be ignored in computations.

Definition at line 587 of file QuatTemplate.h.

Member Data Documentation

◆ m_data


The documentation for this class was generated from the following file: