JUCE: Vector3D< Type > Class Template Reference

JUCE

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Vector3D< Type > Class Template Reference
juce_opengl » geometry

A three-coordinate vector. More...

`#include <juce_Vector3D.h>`

## Public Member Functions
| Vector3D () noexcept
| Vector3D (Type xValue, Type yValue, Type zValue) noexcept
| Vector3D (const Vector3D &other) noexcept
Vector3D & | operator= (Vector3D other) noexcept
Vector3D & | operator+= (Vector3D other) noexcept
Vector3D & | operator-= (Vector3D other) noexcept
Vector3D & | operator*= (Type scaleFactor) noexcept
Vector3D & | operator/= (Type scaleFactor) noexcept
Vector3D | operator+ (Vector3D other) const noexcept
Vector3D | operator- (Vector3D other) const noexcept
Vector3D | operator* (Type scaleFactor) const noexcept
Vector3D | operator/ (Type scaleFactor) const noexcept
Vector3D | operator- () const noexcept
Type | operator* (Vector3D other) const noexcept
| Returns the dot-product of these two vectors. More...
Vector3D | operator^ (Vector3D other) const noexcept
| Returns the cross-product of these two vectors. More...
Type | length () const noexcept
Type | lengthSquared () const noexcept
Vector3D | normalised () const noexcept
bool | lengthIsBelowEpsilon () const noexcept
| Returns true if the vector is practically equal to the origin. 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]

template<typename Type >

Vector3D< Type >::Vector3D | ( |  | ) |
| noexcept

## ◆ Vector3D() [2/3]

template<typename Type >

Vector3D< Type >::Vector3D | ( | Type | xValue,
|  | Type | yValue,
|  | Type | zValue
| ) |  |
| noexcept

## ◆ Vector3D() [3/3]

template<typename Type >

Vector3D< Type >::Vector3D | ( | const Vector3D< Type > & | other | ) |
| noexcept

## Member Function Documentation

## ◆ operator=()

template<typename Type >

Vector3D & Vector3D< Type >::operator= | ( | Vector3D< Type > | other | ) |
| noexcept

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

## ◆ xAxis()

template<typename Type >

static Vector3D Vector3D< Type >::xAxis | ( |  | ) |
| staticnoexcept

Returns a vector that lies along the X axis.

## ◆ yAxis()

template<typename Type >

static Vector3D Vector3D< Type >::yAxis | ( |  | ) |
| staticnoexcept

Returns a vector that lies along the Y axis.

## ◆ zAxis()

template<typename Type >

static Vector3D Vector3D< Type >::zAxis | ( |  | ) |
| staticnoexcept

Returns a vector that lies along the Z axis.

## ◆ operator+=()

template<typename Type >

Vector3D & Vector3D< Type >::operator+= | ( | Vector3D< Type > | other | ) |
| noexcept

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

## ◆ operator-=()

template<typename Type >

Vector3D & Vector3D< Type >::operator-= | ( | Vector3D< Type > | other | ) |
| noexcept

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

## ◆ operator*=()

template<typename Type >

Vector3D & Vector3D< Type >::operator*= | ( | Type | scaleFactor | ) |
| noexcept

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

## ◆ operator/=()

template<typename Type >

Vector3D & Vector3D< Type >::operator/= | ( | Type | scaleFactor | ) |
| noexcept

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

## ◆ operator+()

template<typename Type >

Vector3D Vector3D< Type >::operator+ | ( | Vector3D< Type > | other | ) | const
| noexcept

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

## ◆ operator-() [1/2]

template<typename Type >

Vector3D Vector3D< Type >::operator- | ( | Vector3D< Type > | other | ) | const
| noexcept

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

## ◆ operator*() [1/2]

template<typename Type >

Vector3D Vector3D< Type >::operator* | ( | Type | scaleFactor | ) | const
| noexcept

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

## ◆ operator/()

template<typename Type >

Vector3D Vector3D< Type >::operator/ | ( | Type | scaleFactor | ) | const
| noexcept

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

## ◆ operator-() [2/2]

template<typename Type >

Vector3D Vector3D< Type >::operator- | ( |  | ) | const
| noexcept

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

## ◆ operator*() [2/2]

template<typename Type >

Type Vector3D< Type >::operator* | ( | Vector3D< Type > | other | ) | const
| noexcept

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^ | ( | Vector3D< Type > | other | ) | const
| noexcept

Returns the cross-product of these two vectors.

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

## ◆ length()

template<typename Type >

Type Vector3D< Type >::length | ( |  | ) | const
| noexcept

References Vector3D< Type >::lengthSquared().

Referenced by Vector3D< Type >::normalised().

## ◆ lengthSquared()

template<typename Type >

Type Vector3D< Type >::lengthSquared | ( |  | ) | const
| noexcept

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

Referenced by Vector3D< Type >::length().

## ◆ normalised()

template<typename Type >

Vector3D Vector3D< Type >::normalised | ( |  | ) | const
| noexcept

References Vector3D< Type >::length().

## ◆ lengthIsBelowEpsilon()

template<typename Type >

bool Vector3D< Type >::lengthIsBelowEpsilon | ( |  | ) | const
| noexcept

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

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

## Member Data Documentation

## ◆ x

template<typename Type >

Type Vector3D< Type >::x

Referenced by Vector3D< Type >::lengthIsBelowEpsilon(), Vector3D< Type >::lengthSquared(), Vector3D< Type >::operator*(), Vector3D< Type >::operator*=(), Vector3D< Type >::operator+(), Vector3D< Type >::operator+=(), Vector3D< Type >::operator-(), Vector3D< Type >::operator-=(), Vector3D< Type >::operator/(), Vector3D< Type >::operator/=(), Vector3D< Type >::operator=(), and Vector3D< Type >::operator^().

## ◆ y

template<typename Type >

Type Vector3D< Type >::y

Referenced by Vector3D< Type >::lengthIsBelowEpsilon(), Vector3D< Type >::lengthSquared(), Vector3D< Type >::operator*(), Vector3D< Type >::operator*=(), Vector3D< Type >::operator+(), Vector3D< Type >::operator+=(), Vector3D< Type >::operator-(), Vector3D< Type >::operator-=(), Vector3D< Type >::operator/(), Vector3D< Type >::operator/=(), Vector3D< Type >::operator=(), and Vector3D< Type >::operator^().

## ◆ z

template<typename Type >

Type Vector3D< Type >::z

Referenced by Vector3D< Type >::lengthIsBelowEpsilon(), Vector3D< Type >::lengthSquared(), Vector3D< Type >::operator*(), Vector3D< Type >::operator*=(), Vector3D< Type >::operator+(), Vector3D< Type >::operator+=(), Vector3D< Type >::operator-(), Vector3D< Type >::operator-=(), Vector3D< Type >::operator/(), Vector3D< Type >::operator/=(), Vector3D< Type >::operator=(), and Vector3D< Type >::operator^().

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

- juce_Vector3D.h