VTK  9.4.20241219
Classes | Macros
vtkQuaternion.h File Reference
#include "vtkTuple.h"
#include "vtkQuaternion.txx"
Include dependency graph for vtkQuaternion.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  vtkQuaternion< T >
 templated base type for storage of quaternions. More...
 
class  vtkQuaternionf
 
class  vtkQuaterniond
 

Macros

#define vtkQuaternionIdentity(quaternionType, type)
 Several macros to define the various operator overloads for the quaternions.
 
#define vtkQuaternionNormalized(quaternionType, type)
 
#define vtkQuaternionConjugated(quaternionType, type)
 
#define vtkQuaternionInverse(quaternionType, type)
 
#define vtkQuaternionUnitLog(quaternionType, type)
 
#define vtkQuaternionUnitExp(quaternionType, type)
 
#define vtkQuaternionNormalizedWithAngleInDegrees(quaternionType, type)
 
#define vtkQuaternionSlerp(quaternionType, type)
 
#define vtkQuaternionInnerPoint(quaternionType, type)
 
#define vtkQuaternionOperatorPlus(quaternionType, type)
 
#define vtkQuaternionOperatorMinus(quaternionType, type)
 
#define vtkQuaternionOperatorMultiply(quaternionType, type)
 
#define vtkQuaternionOperatorMultiplyScalar(quaternionType, type)
 
#define vtkQuaternionOperatorDivide(quaternionType, type)
 
#define vtkQuaternionOperatorDivideScalar(quaternionType, type)
 
#define vtkQuaternionOperatorMacro(quaternionType, type)
 

Macro Definition Documentation

◆ vtkQuaternionIdentity

#define vtkQuaternionIdentity (   quaternionType,
  type 
)
Value:
quaternionType Identity() const \
{ \
return quaternionType(vtkQuaternion<type>::Identity().GetData()); \
}
templated base type for storage of quaternions.

Several macros to define the various operator overloads for the quaternions.

These are necessary for the derived classes that are commonly used.

Definition at line 290 of file vtkQuaternion.h.

◆ vtkQuaternionNormalized

#define vtkQuaternionNormalized (   quaternionType,
  type 
)
Value:
quaternionType Normalized() const \
{ \
return quaternionType(vtkQuaternion<type>::Normalized().GetData()); \
}

Definition at line 295 of file vtkQuaternion.h.

◆ vtkQuaternionConjugated

#define vtkQuaternionConjugated (   quaternionType,
  type 
)
Value:
quaternionType Conjugated() const \
{ \
return quaternionType(vtkQuaternion<type>::Conjugated().GetData()); \
}

Definition at line 300 of file vtkQuaternion.h.

◆ vtkQuaternionInverse

#define vtkQuaternionInverse (   quaternionType,
  type 
)
Value:
quaternionType Inverse() const \
{ \
return quaternionType(vtkQuaternion<type>::Inverse().GetData()); \
}

Definition at line 305 of file vtkQuaternion.h.

◆ vtkQuaternionUnitLog

#define vtkQuaternionUnitLog (   quaternionType,
  type 
)
Value:
quaternionType UnitLog() const \
{ \
return quaternionType(vtkQuaternion<type>::UnitLog().GetData()); \
}

Definition at line 310 of file vtkQuaternion.h.

◆ vtkQuaternionUnitExp

#define vtkQuaternionUnitExp (   quaternionType,
  type 
)
Value:
quaternionType UnitExp() const \
{ \
return quaternionType(vtkQuaternion<type>::UnitExp().GetData()); \
}

Definition at line 315 of file vtkQuaternion.h.

◆ vtkQuaternionNormalizedWithAngleInDegrees

#define vtkQuaternionNormalizedWithAngleInDegrees (   quaternionType,
  type 
)
Value:
quaternionType NormalizedWithAngleInDegrees() const \
{ \
return quaternionType(vtkQuaternion<type>::NormalizedWithAngleInDegrees().GetData()); \
}

Definition at line 320 of file vtkQuaternion.h.

◆ vtkQuaternionSlerp

#define vtkQuaternionSlerp (   quaternionType,
  type 
)
Value:
quaternionType Slerp(type t, const quaternionType& q) const \
{ \
return quaternionType(vtkQuaternion<type>::Slerp(t, q).GetData()); \
}

Definition at line 325 of file vtkQuaternion.h.

◆ vtkQuaternionInnerPoint

#define vtkQuaternionInnerPoint (   quaternionType,
  type 
)
Value:
quaternionType InnerPoint(const quaternionType& q1, const quaternionType& q2) const \
{ \
return quaternionType(vtkQuaternion<type>::InnerPoint(q1, q2).GetData()); \
}

Definition at line 330 of file vtkQuaternion.h.

◆ vtkQuaternionOperatorPlus

#define vtkQuaternionOperatorPlus (   quaternionType,
  type 
)
Value:
inline quaternionType operator+(const quaternionType& q) const \
{ \
return quaternionType( \
(static_cast<vtkQuaternion<type>>(*this) + static_cast<vtkQuaternion<type>>(q)).GetData()); \
}
vtkVector< A, Size > operator+(const vtkVector< A, Size > &v1, const vtkVector< A, Size > &v2)
Performs addition of vectors of the same basic type.
Definition vtkVector.h:568

Definition at line 335 of file vtkQuaternion.h.

◆ vtkQuaternionOperatorMinus

#define vtkQuaternionOperatorMinus (   quaternionType,
  type 
)
Value:
inline quaternionType operator-(const quaternionType& q) const \
{ \
return quaternionType( \
(static_cast<vtkQuaternion<type>>(*this) - static_cast<vtkQuaternion<type>>(q)).GetData()); \
}
vtkVector< A, Size > operator-(const vtkVector< A, Size > &v)
This following operators enhance the vtkVector classes, allowing various operator overloads one might...
Definition vtkVector.h:554

Definition at line 341 of file vtkQuaternion.h.

◆ vtkQuaternionOperatorMultiply

#define vtkQuaternionOperatorMultiply (   quaternionType,
  type 
)
Value:
inline quaternionType operator*(const quaternionType& q) const \
{ \
return quaternionType( \
(static_cast<vtkQuaternion<type>>(*this) * static_cast<vtkQuaternion<type>>(q)).GetData()); \
}
vtkVector< A, Size > operator*(const vtkVector< A, Size > &v1, const vtkVector< A, Size > &v2)
Performs multiplication of vectors of the same basic type.
Definition vtkVector.h:624

Definition at line 347 of file vtkQuaternion.h.

◆ vtkQuaternionOperatorMultiplyScalar

#define vtkQuaternionOperatorMultiplyScalar (   quaternionType,
  type 
)
Value:
inline quaternionType operator*(const type& scalar) const \
{ \
return quaternionType((static_cast<vtkQuaternion<type>>(*this) * scalar).GetData()); \
}

Definition at line 353 of file vtkQuaternion.h.

◆ vtkQuaternionOperatorDivide

#define vtkQuaternionOperatorDivide (   quaternionType,
  type 
)
Value:
inline quaternionType operator/(const quaternionType& q) const \
{ \
return quaternionType( \
(static_cast<vtkQuaternion<type>>(*this) / static_cast<vtkQuaternion<type>>(q)).GetData()); \
}
vtkVector< A, Size > operator/(const vtkVector< A, Size > &v1, const vtkVector< A, Size > &v2)
Performs division of vectors of the same type.
Definition vtkVector.h:652

Definition at line 358 of file vtkQuaternion.h.

◆ vtkQuaternionOperatorDivideScalar

#define vtkQuaternionOperatorDivideScalar (   quaternionType,
  type 
)
Value:
inline quaternionType operator/(const type& scalar) const \
{ \
return quaternionType((static_cast<vtkQuaternion<type>>(*this) / scalar).GetData()); \
}

Definition at line 364 of file vtkQuaternion.h.

◆ vtkQuaternionOperatorMacro

#define vtkQuaternionOperatorMacro (   quaternionType,
  type 
)
Value:
vtkQuaternionIdentity(quaternionType, type); \
vtkQuaternionNormalized(quaternionType, type); \
vtkQuaternionConjugated(quaternionType, type); \
vtkQuaternionInverse(quaternionType, type); \
vtkQuaternionUnitLog(quaternionType, type); \
vtkQuaternionUnitExp(quaternionType, type); \
vtkQuaternionNormalizedWithAngleInDegrees(quaternionType, type); \
vtkQuaternionSlerp(quaternionType, type); \
vtkQuaternionInnerPoint(quaternionType, type); \
vtkQuaternionOperatorPlus(quaternionType, type); \
vtkQuaternionOperatorMinus(quaternionType, type); \
vtkQuaternionOperatorMultiply(quaternionType, type); \
vtkQuaternionOperatorMultiplyScalar(quaternionType, type); \
vtkQuaternionOperatorDivide(quaternionType, type); \
vtkQuaternionOperatorDivideScalar(quaternionType, type)
#define vtkQuaternionIdentity(quaternionType, type)
Several macros to define the various operator overloads for the quaternions.

Definition at line 370 of file vtkQuaternion.h.