JUCE  v5.1.1-3-g1a0b28c73
JUCE API
Vector3D< Type > Class Template Reference

A three-coordinate vector. More...

#include <juce_Vector3D.h>

Collaboration diagram for Vector3D< Type >:

Public Member Functions

 Vector3D () noexcept
 
 Vector3D (Type xValue, Type yValue, Type zValue) noexcept
 
 Vector3D (const Vector3D &other) noexcept
 
Type length () const noexcept
 
bool lengthIsBelowEpsilon () const noexcept
 Returns true if the vector is practically equal to the origin. More...
 
Type lengthSquared () const noexcept
 
Vector3D normalised () const noexcept
 
Vector3D operator* (Type scaleFactor) const noexcept
 
Type operator* (Vector3D other) const noexcept
 Returns the dot-product of these two vectors. More...
 
Vector3Doperator*= (Type scaleFactor) noexcept
 
Vector3D operator+ (Vector3D other) const noexcept
 
Vector3Doperator+= (Vector3D other) noexcept
 
Vector3D operator- (Vector3D other) const noexcept
 
Vector3D operator- () const noexcept
 
Vector3Doperator-= (Vector3D other) noexcept
 
Vector3D operator/ (Type scaleFactor) const noexcept
 
Vector3Doperator/= (Type scaleFactor) noexcept
 
Vector3Doperator= (Vector3D other) noexcept
 
Vector3D operator^ (Vector3D other) const noexcept
 Returns the cross-product of these two vectors. More...
 

Static Public Member Functions

static Vector3D xAxis () noexcept
 Returns a vector that lies along the X axis. More...
 
static Vector3D yAxis () noexcept
 Returns a vector that lies along the Y axis. More...
 
static Vector3D zAxis () noexcept
 Returns a vector that lies along the Z axis. More...
 

Public Attributes

Type x
 
Type y
 
Type z
 

Detailed Description

template<typename Type>
class Vector3D< Type >

A three-coordinate vector.

Constructor & Destructor Documentation

◆ Vector3D() [1/3]

◆ Vector3D() [2/3]

template<typename Type>
Vector3D< Type >::Vector3D ( Type  xValue,
Type  yValue,
Type  zValue 
)
inlinenoexcept

◆ Vector3D() [3/3]

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

Member Function Documentation

◆ length()

template<typename Type>
Type Vector3D< Type >::length ( ) const
inlinenoexcept

◆ lengthIsBelowEpsilon()

template<typename Type>
bool Vector3D< Type >::lengthIsBelowEpsilon ( ) const
inlinenoexcept

Returns true if the vector is practically equal to the origin.

References Vector3D< Type >::x, Vector3D< Type >::y, and Vector3D< Type >::z.

Referenced by Draggable3DOrientation::rotationFromMove().

◆ lengthSquared()

template<typename Type>
Type Vector3D< Type >::lengthSquared ( ) const
inlinenoexcept

◆ normalised()

template<typename Type>
Vector3D Vector3D< Type >::normalised ( ) const
inlinenoexcept

◆ operator*() [1/2]

template<typename Type>
Vector3D Vector3D< Type >::operator* ( Type  scaleFactor) const
inlinenoexcept

◆ operator*() [2/2]

template<typename Type>
Type Vector3D< Type >::operator* ( Vector3D< Type >  other) const
inlinenoexcept

Returns the dot-product of these two vectors.

References Vector3D< Type >::x, Vector3D< Type >::y, and Vector3D< Type >::z.

◆ operator*=()

template<typename Type>
Vector3D& Vector3D< Type >::operator*= ( Type  scaleFactor)
inlinenoexcept

◆ operator+()

template<typename Type>
Vector3D Vector3D< Type >::operator+ ( Vector3D< Type >  other) const
inlinenoexcept

◆ operator+=()

template<typename Type>
Vector3D& Vector3D< Type >::operator+= ( Vector3D< Type >  other)
inlinenoexcept

◆ operator-() [1/2]

template<typename Type>
Vector3D Vector3D< Type >::operator- ( Vector3D< Type >  other) const
inlinenoexcept

◆ operator-() [2/2]

template<typename Type>
Vector3D Vector3D< Type >::operator- ( ) const
inlinenoexcept

◆ operator-=()

template<typename Type>
Vector3D& Vector3D< Type >::operator-= ( Vector3D< Type >  other)
inlinenoexcept

◆ operator/()

template<typename Type>
Vector3D Vector3D< Type >::operator/ ( Type  scaleFactor) const
inlinenoexcept

◆ operator/=()

template<typename Type>
Vector3D& Vector3D< Type >::operator/= ( Type  scaleFactor)
inlinenoexcept

◆ operator=()

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

◆ operator^()

template<typename Type>
Vector3D Vector3D< Type >::operator^ ( Vector3D< Type >  other) const
inlinenoexcept

Returns the cross-product of these two vectors.

References Vector3D< Type >::Vector3D(), Vector3D< Type >::x, Vector3D< Type >::y, and Vector3D< Type >::z.

◆ xAxis()

template<typename Type>
static Vector3D Vector3D< Type >::xAxis ( )
inlinestaticnoexcept

Returns a vector that lies along the X axis.

References Vector3D< Type >::Vector3D().

Referenced by Draggable3DOrientation::rotationFromMove().

◆ yAxis()

template<typename Type>
static Vector3D Vector3D< Type >::yAxis ( )
inlinestaticnoexcept

Returns a vector that lies along the Y axis.

References Vector3D< Type >::Vector3D().

◆ zAxis()

template<typename Type>
static Vector3D Vector3D< Type >::zAxis ( )
inlinestaticnoexcept

Returns a vector that lies along the Z axis.

References Vector3D< Type >::Vector3D().

Member Data Documentation

◆ x

◆ y

◆ z


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