JUCE API reference
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
juce::Quaternion< Type > Class Template Reference

Holds a quaternion (a 3D vector and a scalar value). More...

Public Member Functions

 Quaternion () noexcept
 
 Quaternion (const Quaternion &other) noexcept
 
 Quaternion (Vector3D< Type > vectorPart, Type scalarPart) noexcept
 
 Quaternion (Type x, Type y, Type z, Type w) noexcept
 
Quaternion & operator= (Quaternion other) noexcept
 
Quaternion & operator*= (Quaternion other) noexcept
 
Type length () const noexcept
 
Type normal () const noexcept
 
Quaternion normalised () const noexcept
 
Matrix3D< Type > getRotationMatrix () const noexcept
 Returns the matrix that will perform the rotation specified by this quaternion.
 

Static Public Member Functions

static Quaternion fromAngle (Type angle, Vector3D< Type > axis) noexcept
 Creates a quaternion from an angle and an axis.
 

Public Attributes

Vector3D< Type > vector
 The vector part of the quaternion.
 
Type scalar
 The scalar part of the quaternion.
 

Detailed Description

template<typename Type>
class juce::Quaternion< Type >

Holds a quaternion (a 3D vector and a scalar value).

Constructor & Destructor Documentation

◆ Quaternion() [1/4]

template<typename Type >
juce::Quaternion< Type >::Quaternion ( )
inlinenoexcept

◆ Quaternion() [2/4]

template<typename Type >
juce::Quaternion< Type >::Quaternion ( const Quaternion< Type > &  other)
inlinenoexcept

◆ Quaternion() [3/4]

template<typename Type >
juce::Quaternion< Type >::Quaternion ( Vector3D< Type >  vectorPart,
Type  scalarPart 
)
inlinenoexcept

◆ Quaternion() [4/4]

template<typename Type >
juce::Quaternion< Type >::Quaternion ( Type  x,
Type  y,
Type  z,
Type  w 
)
inlinenoexcept

Member Function Documentation

◆ fromAngle()

template<typename Type >
static Quaternion juce::Quaternion< Type >::fromAngle ( Type  angle,
Vector3D< Type >  axis 
)
inlinestaticnoexcept

Creates a quaternion from an angle and an axis.

References juce::Quaternion< Type >::Quaternion().

◆ operator=()

template<typename Type >
Quaternion & juce::Quaternion< Type >::operator= ( Quaternion< Type >  other)
inlinenoexcept

◆ operator*=()

template<typename Type >
Quaternion & juce::Quaternion< Type >::operator*= ( Quaternion< Type >  other)
inlinenoexcept

◆ length()

template<typename Type >
Type juce::Quaternion< Type >::length ( ) const
inlinenoexcept

◆ normal()

template<typename Type >
Type juce::Quaternion< Type >::normal ( ) const
inlinenoexcept

◆ normalised()

template<typename Type >
Quaternion juce::Quaternion< Type >::normalised ( ) const
inlinenoexcept

◆ getRotationMatrix()

template<typename Type >
Matrix3D< Type > juce::Quaternion< Type >::getRotationMatrix ( ) const
inlinenoexcept

Returns the matrix that will perform the rotation specified by this quaternion.

References juce::Quaternion< Type >::normal(), juce::Quaternion< Type >::scalar, and juce::Quaternion< Type >::vector.

Referenced by juce::Draggable3DOrientation::getRotationMatrix().

Member Data Documentation

◆ vector

template<typename Type >
Vector3D<Type> juce::Quaternion< Type >::vector

◆ scalar

template<typename Type >
Type juce::Quaternion< Type >::scalar

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