Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
om::math::VectorND< T, 4 > Class Template Reference

A templatized math class representing a 4-dimensional vector. More...

#include <omVector4D.h>

Public Member Functions

 VectorND ()
 Create a new 4D vector with all elements equal to zero. More...
 
 VectorND (T value)
 Create a new 4D vector with all elements equal to a single value. More...
 
 VectorND (const T array[4])
 Create a new 4D vector from a pointer to a 4 element array. More...
 
 VectorND (T newX, T newY, T newZ, T newW)
 Create a new 4D vector by specifying it's x, y, z, and w values. More...
 
 VectorND (const VectorND< T, 2 > &vector, T newZ, T newW)
 Create a new 4D vector from a 2D vector and 2 values for the Z and W coordinates. More...
 
 VectorND (T newX, const VectorND< T, 2 > &vector, T newW)
 Create a new 4D vector from a scalar, a 2D vector and another scalar. More...
 
 VectorND (T newX, T newY, const VectorND< T, 2 > &vector)
 Create a new 4D vector from two scalars for the X, Y coordinates and a 2D vector. More...
 
 VectorND (const VectorND< T, 3 > &vector, T newW)
 Create a new 4D vector from a 3D vector and a value for the W coordinate. More...
 
 VectorND (T newX, const VectorND< T, 3 > &vector)
 Create a new 4D vector from a value for the X coordinate and a 3D vector. More...
 
template<typename U >
 VectorND (const VectorND< U, 4 > &vector)
 Create a new 4D vector from an existing vector with a different template type. More...
 
 VectorND (const VectorND< T, 4 > &vector)
 Create a new 4D vector from an existing vector with the same template type. More...
 
VectorNDoperator= (const VectorND &vector)
 Create a new 4D vector from an existing vector with a different template type. More...
 
getMagnitude () const
 Return the magnitude of this vector (the length). More...
 
getMagnitudeSquared () const
 Return the square of the magnitude of this vector. More...
 
VectorND normalize () const
 Return a normalized version of this vector. More...
 
VectorND normalize (T &magnitude) const
 Return a normalized version of this vector, placing the vector's magnitude in the output parameter. More...
 
VectorND projectOn (const VectorND &vector) const
 Project this vector on another vector and return the projected vector. More...
 
VectorND projectOnNormalized (const VectorND &vector) const
 Project this vector on a normalized vector and return the projected vector. More...
 
getDistanceTo (const VectorND &vector) const
 Return the distance from this vector to another in 4D Euclidean space. More...
 
getDistanceToSquared (const VectorND &vector) const
 Return the square of the distance from this vector to another in 4D Euclidean space. More...
 
T * toArray ()
 Return a pointer to the internal storage of this vector. More...
 
const T * toArray () const
 Return a const pointer to the internal storage of this vector. More...
 
getMin () const
 Return the minimum component of this vector. More...
 
getMax () const
 Return the maximum component of this vector. More...
 
T & get (Index index)
 Return a reference to the vector coordinate at the specified index. More...
 
const T & get (Index index) const
 Return a const reference to the vector coordinate at the specified index. More...
 
T & operator[] (Index index)
 Return a reference to the vector coordinate at the specified index. More...
 
const T & operator[] (Index index) const
 Return a const reference to the vector coordinate at the specified index. More...
 
void setAll (T newX, T newY, T newZ, T newW)
 Set the X, Y, Z, and W coordinates of the vector to the specified values. More...
 
void set (Index index, T newValue)
 Set the coordinate of this vector at the specified index to a new value. More...
 
Bool operator== (const VectorND &v) const
 Return whether or not this vector is equal to another for all components. More...
 
Bool operator!= (const VectorND &v) const
 Return whether or not this vector is not equal to another for any component. More...
 
VectorND operator- () const
 Negate each component of this vector and return the result. More...
 
VectorND operator+ () const
 Return copy of the original vector. More...
 
VectorND operator+ (T value) const
 Add a scalar to every component of this vector and return the result. More...
 
VectorND operator- (T value) const
 Subtract a scalar from every component of this vector and return the result. More...
 
VectorND operator* (T value) const
 Multiply every component of this vector by a scalar and return the result. More...
 
VectorND operator/ (T value) const
 Divide every component of this vector by a scalar and return the result. More...
 
VectorND operator+ (const VectorND &vector) const
 Add this vector to another and return the result and return the result. More...
 
VectorND operator- (const VectorND &vector) const
 Subtract a vector from this vector and return the result. More...
 
VectorND operator* (const VectorND &vector) const
 Multiply this vector by another vector and return the result. More...
 
VectorND operator/ (const VectorND &vector) const
 Divide this vector by another vector and return the result. More...
 
VectorNDoperator+= (T value)
 Add a scalar to each component of this vector and modify the original vector. More...
 
VectorNDoperator-= (T value)
 Subtract a scalar from each component of this vector and modify the original vector. More...
 
VectorNDoperator*= (T value)
 Multiply each component of this vector by a scalar and modify the original vector. More...
 
VectorNDoperator/= (T value)
 Divide each component of this vector by a scalar and modify the original vector. More...
 
VectorNDoperator+= (const VectorND &vector)
 Add a vector to this vector, modifying this vector. More...
 
VectorNDoperator-= (const VectorND &vector)
 Subtract a vector from this vector, modifying this vector. More...
 
VectorNDoperator*= (const VectorND &vector)
 Multiply this vector by another vector and modify this vector. More...
 
VectorNDoperator/= (const VectorND &vector)
 Divide this vector by another vector and modify this vector. More...
 
data::String toString () const
 Convert this 4D vector into a human-readable string representation. More...
 
 operator data::String () const
 Convert this 4D vector into a human-readable string representation. More...
 

Public Attributes

union om::math::VectorND< T, 4 >:: { ... }  
 
v [3]
 An array that contains the vector components. More...
 
r
 The red component of a 4-component color. More...
 
g
 The green component of a 4-component color. More...
 
b
 The blue component of a 4-component color. More...
 
a
 The alpha component of a 4-component color. More...
 
x
 The X coordinate of a 4D vector. More...
 
y
 The Y coordinate of a 4D vector. More...
 
z
 The Z coordinate of a 4D vector. More...
 
w
 The W coordinate of a 4D vector. More...
 
Swizzle2D< T, 4, 0, 0 > xx
 
Swizzle2D< T, 4, 0, 0 > rr
 
Swizzle2D< T, 4, 1, 1 > yy
 
Swizzle2D< T, 4, 1, 1 > gg
 
Swizzle2D< T, 4, 2, 2 > zz
 
Swizzle2D< T, 4, 2, 2 > bb
 
Swizzle2D< T, 4, 3, 3 > ww
 
Swizzle2D< T, 4, 3, 3 > aa
 
Swizzle2D< T, 4, 0, 1 > xy
 
Swizzle2D< T, 4, 0, 1 > rg
 
Swizzle2D< T, 4, 0, 2 > xz
 
Swizzle2D< T, 4, 0, 2 > rb
 
Swizzle2D< T, 4, 0, 3 > xw
 
Swizzle2D< T, 4, 0, 3 > ra
 
Swizzle2D< T, 4, 1, 0 > yx
 
Swizzle2D< T, 4, 1, 0 > gr
 
Swizzle2D< T, 4, 1, 2 > yz
 
Swizzle2D< T, 4, 1, 2 > gb
 
Swizzle2D< T, 4, 1, 3 > yw
 
Swizzle2D< T, 4, 1, 3 > ga
 
Swizzle2D< T, 4, 2, 0 > zx
 
Swizzle2D< T, 4, 2, 0 > br
 
Swizzle2D< T, 4, 2, 1 > zy
 
Swizzle2D< T, 4, 2, 1 > bg
 
Swizzle2D< T, 4, 2, 3 > zw
 
Swizzle2D< T, 4, 2, 3 > ba
 
Swizzle2D< T, 4, 3, 0 > wx
 
Swizzle2D< T, 4, 3, 0 > ar
 
Swizzle2D< T, 4, 3, 1 > wy
 
Swizzle2D< T, 4, 3, 1 > ag
 
Swizzle2D< T, 4, 3, 2 > wz
 
Swizzle2D< T, 4, 3, 2 > ab
 
Swizzle3D< T, 4, 0, 0, 0 > xxx
 
Swizzle3D< T, 4, 0, 0, 0 > rrr
 
Swizzle3D< T, 4, 1, 1, 1 > yyy
 
Swizzle3D< T, 4, 1, 1, 1 > ggg
 
Swizzle3D< T, 4, 2, 2, 2 > zzz
 
Swizzle3D< T, 4, 2, 2, 2 > bbb
 
Swizzle3D< T, 4, 3, 3, 3 > www
 
Swizzle3D< T, 4, 3, 3, 3 > aaa
 
Swizzle3D< T, 4, 0, 1, 1 > xyy
 
Swizzle3D< T, 4, 0, 1, 1 > rgg
 
Swizzle3D< T, 4, 1, 0, 1 > yxy
 
Swizzle3D< T, 4, 1, 0, 1 > grg
 
Swizzle3D< T, 4, 1, 1, 0 > yyx
 
Swizzle3D< T, 4, 1, 1, 0 > ggr
 
Swizzle3D< T, 4, 0, 2, 2 > xzz
 
Swizzle3D< T, 4, 0, 2, 2 > rbb
 
Swizzle3D< T, 4, 2, 0, 2 > zxz
 
Swizzle3D< T, 4, 2, 0, 2 > brb
 
Swizzle3D< T, 4, 2, 2, 0 > zzx
 
Swizzle3D< T, 4, 2, 2, 0 > bbr
 
Swizzle3D< T, 4, 0, 3, 3 > xww
 
Swizzle3D< T, 4, 0, 3, 3 > raa
 
Swizzle3D< T, 4, 3, 0, 3 > wxw
 
Swizzle3D< T, 4, 3, 0, 3 > ara
 
Swizzle3D< T, 4, 3, 3, 0 > wwx
 
Swizzle3D< T, 4, 3, 3, 0 > aar
 
Swizzle3D< T, 4, 1, 0, 0 > yxx
 
Swizzle3D< T, 4, 1, 0, 0 > grr
 
Swizzle3D< T, 4, 0, 1, 0 > xyx
 
Swizzle3D< T, 4, 0, 1, 0 > rgr
 
Swizzle3D< T, 4, 0, 0, 1 > xxy
 
Swizzle3D< T, 4, 0, 0, 1 > rrg
 
Swizzle3D< T, 4, 1, 2, 2 > yzz
 
Swizzle3D< T, 4, 1, 2, 2 > gbb
 
Swizzle3D< T, 4, 2, 1, 2 > zyz
 
Swizzle3D< T, 4, 2, 1, 2 > bgb
 
Swizzle3D< T, 4, 2, 2, 1 > zzy
 
Swizzle3D< T, 4, 2, 2, 1 > bbg
 
Swizzle3D< T, 4, 1, 3, 3 > yww
 
Swizzle3D< T, 4, 1, 3, 3 > gaa
 
Swizzle3D< T, 4, 3, 1, 3 > wyw
 
Swizzle3D< T, 4, 3, 1, 3 > aga
 
Swizzle3D< T, 4, 3, 3, 1 > wwy
 
Swizzle3D< T, 4, 3, 3, 1 > aag
 
Swizzle3D< T, 4, 2, 0, 0 > zxx
 
Swizzle3D< T, 4, 2, 0, 0 > brr
 
Swizzle3D< T, 4, 0, 2, 0 > xzx
 
Swizzle3D< T, 4, 0, 2, 0 > rbr
 
Swizzle3D< T, 4, 0, 0, 2 > xxz
 
Swizzle3D< T, 4, 0, 0, 2 > rrb
 
Swizzle3D< T, 4, 2, 1, 1 > zyy
 
Swizzle3D< T, 4, 2, 1, 1 > bgg
 
Swizzle3D< T, 4, 1, 2, 1 > yzy
 
Swizzle3D< T, 4, 1, 2, 1 > gbg
 
Swizzle3D< T, 4, 1, 1, 2 > yyz
 
Swizzle3D< T, 4, 1, 1, 2 > ggb
 
Swizzle3D< T, 4, 2, 3, 3 > zww
 
Swizzle3D< T, 4, 2, 3, 3 > baa
 
Swizzle3D< T, 4, 3, 2, 3 > wzw
 
Swizzle3D< T, 4, 3, 2, 3 > aba
 
Swizzle3D< T, 4, 3, 3, 2 > wwz
 
Swizzle3D< T, 4, 3, 3, 2 > aab
 
Swizzle3D< T, 4, 3, 0, 0 > wxx
 
Swizzle3D< T, 4, 3, 0, 0 > arr
 
Swizzle3D< T, 4, 0, 3, 0 > xwx
 
Swizzle3D< T, 4, 0, 3, 0 > rar
 
Swizzle3D< T, 4, 0, 0, 3 > xxw
 
Swizzle3D< T, 4, 0, 0, 3 > rra
 
Swizzle3D< T, 4, 3, 1, 1 > wyy
 
Swizzle3D< T, 4, 3, 1, 1 > agg
 
Swizzle3D< T, 4, 1, 3, 1 > ywy
 
Swizzle3D< T, 4, 1, 3, 1 > gag
 
Swizzle3D< T, 4, 1, 1, 3 > yyw
 
Swizzle3D< T, 4, 1, 1, 3 > gga
 
Swizzle3D< T, 4, 3, 2, 2 > wzz
 
Swizzle3D< T, 4, 3, 2, 2 > abb
 
Swizzle3D< T, 4, 2, 3, 2 > zwz
 
Swizzle3D< T, 4, 2, 3, 2 > bab
 
Swizzle3D< T, 4, 2, 2, 3 > zzw
 
Swizzle3D< T, 4, 2, 2, 3 > bba
 
Swizzle3D< T, 4, 0, 1, 2 > xyz
 
Swizzle3D< T, 4, 0, 1, 2 > rgb
 
Swizzle3D< T, 4, 0, 1, 3 > xyw
 
Swizzle3D< T, 4, 0, 1, 3 > rga
 
Swizzle3D< T, 4, 0, 2, 1 > xzy
 
Swizzle3D< T, 4, 0, 2, 1 > rbg
 
Swizzle3D< T, 4, 0, 2, 3 > xzw
 
Swizzle3D< T, 4, 0, 2, 3 > rba
 
Swizzle3D< T, 4, 1, 0, 2 > yxz
 
Swizzle3D< T, 4, 1, 0, 2 > grb
 
Swizzle3D< T, 4, 1, 0, 3 > yxw
 
Swizzle3D< T, 4, 1, 0, 3 > gra
 
Swizzle3D< T, 4, 1, 2, 0 > yzx
 
Swizzle3D< T, 4, 1, 2, 0 > gbr
 
Swizzle3D< T, 4, 1, 2, 3 > yzw
 
Swizzle3D< T, 4, 1, 2, 3 > gba
 
Swizzle3D< T, 4, 2, 1, 0 > zyx
 
Swizzle3D< T, 4, 2, 1, 0 > bgr
 
Swizzle3D< T, 4, 2, 1, 3 > zyw
 
Swizzle3D< T, 4, 2, 1, 3 > bga
 
Swizzle3D< T, 4, 2, 0, 1 > zxy
 
Swizzle3D< T, 4, 2, 0, 1 > brg
 
Swizzle3D< T, 4, 2, 0, 3 > zxw
 
Swizzle3D< T, 4, 2, 0, 3 > bra
 
Swizzle4D< T, 4, 0, 1, 2, 3 > xyzw
 
Swizzle4D< T, 4, 0, 1, 3, 2 > xywz
 
Swizzle4D< T, 4, 0, 2, 1, 3 > xzyw
 
Swizzle4D< T, 4, 0, 2, 3, 1 > xzwy
 
Swizzle4D< T, 4, 0, 3, 1, 2 > xwyz
 
Swizzle4D< T, 4, 0, 3, 2, 1 > xwzy
 
Swizzle4D< T, 4, 1, 0, 2, 3 > yxzw
 
Swizzle4D< T, 4, 1, 0, 3, 2 > yxwz
 
Swizzle4D< T, 4, 1, 2, 0, 3 > yzxw
 
Swizzle4D< T, 4, 1, 2, 3, 0 > yzwx
 
Swizzle4D< T, 4, 1, 3, 0, 2 > ywxz
 
Swizzle4D< T, 4, 1, 3, 2, 0 > ywzx
 
Swizzle4D< T, 4, 2, 0, 1, 3 > zxyw
 
Swizzle4D< T, 4, 2, 0, 3, 1 > zxwy
 
Swizzle4D< T, 4, 2, 1, 0, 3 > zyxw
 
Swizzle4D< T, 4, 2, 1, 3, 0 > zywx
 
Swizzle4D< T, 4, 2, 3, 0, 1 > zwxy
 
Swizzle4D< T, 4, 2, 3, 1, 0 > zwyx
 
Swizzle4D< T, 4, 3, 0, 1, 2 > wxyz
 
Swizzle4D< T, 4, 3, 0, 2, 1 > wxzy
 
Swizzle4D< T, 4, 3, 1, 0, 2 > wyxz
 
Swizzle4D< T, 4, 3, 1, 2, 0 > wyzx
 
Swizzle4D< T, 4, 3, 2, 0, 1 > wzxy
 
Swizzle4D< T, 4, 3, 2, 1, 0 > wzyx
 

Static Public Attributes

static const VectorND ZERO
 A constant vector with all elements equal to zero. More...
 

Detailed Description

template<typename T>
class om::math::VectorND< T, 4 >

A templatized math class representing a 4-dimensional vector.

Constructor & Destructor Documentation

template<typename T >
om::math::VectorND< T, 4 >::VectorND ( )
inline

Create a new 4D vector with all elements equal to zero.

template<typename T >
om::math::VectorND< T, 4 >::VectorND ( value)
inlineexplicit

Create a new 4D vector with all elements equal to a single value.

This constructor creates a uniform 4D vector with all elements equal to each other and equal to the single constructor parameter value.

Parameters
value- The value to set all elements of the vector to.
template<typename T >
om::math::VectorND< T, 4 >::VectorND ( const T  array[4])
inlineexplicit

Create a new 4D vector from a pointer to a 4 element array.

This constructor takes a pointer to an array of 4 values and sets it's x, y, z, and w coordinates to be the 0th, 1th, 2th, and 3th indexed values in the array. No error checking is performed, so make sure to pass in a correct array of values or expect the worst.

Parameters
array- An indexed array of 4 values for the vector's coordinates.
template<typename T >
om::math::VectorND< T, 4 >::VectorND ( newX,
newY,
newZ,
newW 
)
inline

Create a new 4D vector by specifying it's x, y, z, and w values.

template<typename T >
om::math::VectorND< T, 4 >::VectorND ( const VectorND< T, 2 > &  vector,
newZ,
newW 
)
inline

Create a new 4D vector from a 2D vector and 2 values for the Z and W coordinates.

template<typename T >
om::math::VectorND< T, 4 >::VectorND ( newX,
const VectorND< T, 2 > &  vector,
newW 
)
inline

Create a new 4D vector from a scalar, a 2D vector and another scalar.

template<typename T >
om::math::VectorND< T, 4 >::VectorND ( newX,
newY,
const VectorND< T, 2 > &  vector 
)
inline

Create a new 4D vector from two scalars for the X, Y coordinates and a 2D vector.

template<typename T >
om::math::VectorND< T, 4 >::VectorND ( const VectorND< T, 3 > &  vector,
newW 
)
inline

Create a new 4D vector from a 3D vector and a value for the W coordinate.

template<typename T >
om::math::VectorND< T, 4 >::VectorND ( newX,
const VectorND< T, 3 > &  vector 
)
inline

Create a new 4D vector from a value for the X coordinate and a 3D vector.

template<typename T >
template<typename U >
om::math::VectorND< T, 4 >::VectorND ( const VectorND< U, 4 > &  vector)
inline

Create a new 4D vector from an existing vector with a different template type.

template<typename T >
om::math::VectorND< T, 4 >::VectorND ( const VectorND< T, 4 > &  vector)
inline

Create a new 4D vector from an existing vector with the same template type.

This is declared because the auto-generated one was not working with the crazy uniform mess.

Member Function Documentation

template<typename T >
VectorND& om::math::VectorND< T, 4 >::operator= ( const VectorND< T, 4 > &  vector)
inline

Create a new 4D vector from an existing vector with a different template type.

This is declared because the auto-generated one was not working with the crazy uniform mess.

template<typename T >
T om::math::VectorND< T, 4 >::getMagnitude ( ) const
inline

Return the magnitude of this vector (the length).

template<typename T >
T om::math::VectorND< T, 4 >::getMagnitudeSquared ( ) const
inline

Return the square of the magnitude of this vector.

template<typename T >
VectorND om::math::VectorND< T, 4 >::normalize ( ) const
inline

Return a normalized version of this vector.

template<typename T >
VectorND om::math::VectorND< T, 4 >::normalize ( T &  magnitude) const
inline

Return a normalized version of this vector, placing the vector's magnitude in the output parameter.

template<typename T >
VectorND om::math::VectorND< T, 4 >::projectOn ( const VectorND< T, 4 > &  vector) const
inline

Project this vector on another vector and return the projected vector.

template<typename T >
VectorND om::math::VectorND< T, 4 >::projectOnNormalized ( const VectorND< T, 4 > &  vector) const
inline

Project this vector on a normalized vector and return the projected vector.

template<typename T >
T om::math::VectorND< T, 4 >::getDistanceTo ( const VectorND< T, 4 > &  vector) const
inline

Return the distance from this vector to another in 4D Euclidean space.

template<typename T >
T om::math::VectorND< T, 4 >::getDistanceToSquared ( const VectorND< T, 4 > &  vector) const
inline

Return the square of the distance from this vector to another in 4D Euclidean space.

template<typename T >
T* om::math::VectorND< T, 4 >::toArray ( )
inline

Return a pointer to the internal storage of this vector.

template<typename T >
const T* om::math::VectorND< T, 4 >::toArray ( ) const
inline

Return a const pointer to the internal storage of this vector.

template<typename T >
T om::math::VectorND< T, 4 >::getMin ( ) const
inline

Return the minimum component of this vector.

template<typename T >
T om::math::VectorND< T, 4 >::getMax ( ) const
inline

Return the maximum component of this vector.

template<typename T >
T& om::math::VectorND< T, 4 >::get ( Index  index)
inline

Return a reference to the vector coordinate at the specified index.

template<typename T >
const T& om::math::VectorND< T, 4 >::get ( Index  index) const
inline

Return a const reference to the vector coordinate at the specified index.

template<typename T >
T& om::math::VectorND< T, 4 >::operator[] ( Index  index)
inline

Return a reference to the vector coordinate at the specified index.

template<typename T >
const T& om::math::VectorND< T, 4 >::operator[] ( Index  index) const
inline

Return a const reference to the vector coordinate at the specified index.

template<typename T >
void om::math::VectorND< T, 4 >::setAll ( newX,
newY,
newZ,
newW 
)
inline

Set the X, Y, Z, and W coordinates of the vector to the specified values.

template<typename T >
void om::math::VectorND< T, 4 >::set ( Index  index,
newValue 
)
inline

Set the coordinate of this vector at the specified index to a new value.

template<typename T >
Bool om::math::VectorND< T, 4 >::operator== ( const VectorND< T, 4 > &  v) const
inline

Return whether or not this vector is equal to another for all components.

template<typename T >
Bool om::math::VectorND< T, 4 >::operator!= ( const VectorND< T, 4 > &  v) const
inline

Return whether or not this vector is not equal to another for any component.

template<typename T >
VectorND om::math::VectorND< T, 4 >::operator- ( ) const
inline

Negate each component of this vector and return the result.

template<typename T >
VectorND om::math::VectorND< T, 4 >::operator+ ( ) const
inline

Return copy of the original vector.

template<typename T >
VectorND om::math::VectorND< T, 4 >::operator+ ( value) const
inline

Add a scalar to every component of this vector and return the result.

template<typename T >
VectorND om::math::VectorND< T, 4 >::operator- ( value) const
inline

Subtract a scalar from every component of this vector and return the result.

template<typename T >
VectorND om::math::VectorND< T, 4 >::operator* ( value) const
inline

Multiply every component of this vector by a scalar and return the result.

template<typename T >
VectorND om::math::VectorND< T, 4 >::operator/ ( value) const
inline

Divide every component of this vector by a scalar and return the result.

template<typename T >
VectorND om::math::VectorND< T, 4 >::operator+ ( const VectorND< T, 4 > &  vector) const
inline

Add this vector to another and return the result and return the result.

template<typename T >
VectorND om::math::VectorND< T, 4 >::operator- ( const VectorND< T, 4 > &  vector) const
inline

Subtract a vector from this vector and return the result.

template<typename T >
VectorND om::math::VectorND< T, 4 >::operator* ( const VectorND< T, 4 > &  vector) const
inline

Multiply this vector by another vector and return the result.

template<typename T >
VectorND om::math::VectorND< T, 4 >::operator/ ( const VectorND< T, 4 > &  vector) const
inline

Divide this vector by another vector and return the result.

template<typename T >
VectorND& om::math::VectorND< T, 4 >::operator+= ( value)
inline

Add a scalar to each component of this vector and modify the original vector.

template<typename T >
VectorND& om::math::VectorND< T, 4 >::operator-= ( value)
inline

Subtract a scalar from each component of this vector and modify the original vector.

template<typename T >
VectorND& om::math::VectorND< T, 4 >::operator*= ( value)
inline

Multiply each component of this vector by a scalar and modify the original vector.

template<typename T >
VectorND& om::math::VectorND< T, 4 >::operator/= ( value)
inline

Divide each component of this vector by a scalar and modify the original vector.

template<typename T >
VectorND& om::math::VectorND< T, 4 >::operator+= ( const VectorND< T, 4 > &  vector)
inline

Add a vector to this vector, modifying this vector.

template<typename T >
VectorND& om::math::VectorND< T, 4 >::operator-= ( const VectorND< T, 4 > &  vector)
inline

Subtract a vector from this vector, modifying this vector.

template<typename T >
VectorND& om::math::VectorND< T, 4 >::operator*= ( const VectorND< T, 4 > &  vector)
inline

Multiply this vector by another vector and modify this vector.

template<typename T >
VectorND& om::math::VectorND< T, 4 >::operator/= ( const VectorND< T, 4 > &  vector)
inline

Divide this vector by another vector and modify this vector.

template<typename T >
data::String om::math::VectorND< T, 4 >::toString ( ) const
inline

Convert this 4D vector into a human-readable string representation.

template<typename T >
om::math::VectorND< T, 4 >::operator data::String ( ) const
inline

Convert this 4D vector into a human-readable string representation.

Member Data Documentation

template<typename T >
T om::math::VectorND< T, 4 >::v[3]

An array that contains the vector components.

template<typename T >
T om::math::VectorND< T, 4 >::r

The red component of a 4-component color.

template<typename T >
T om::math::VectorND< T, 4 >::g

The green component of a 4-component color.

template<typename T >
T om::math::VectorND< T, 4 >::b

The blue component of a 4-component color.

template<typename T >
T om::math::VectorND< T, 4 >::a

The alpha component of a 4-component color.

template<typename T >
T om::math::VectorND< T, 4 >::x

The X coordinate of a 4D vector.

template<typename T >
T om::math::VectorND< T, 4 >::y

The Y coordinate of a 4D vector.

template<typename T >
T om::math::VectorND< T, 4 >::z

The Z coordinate of a 4D vector.

template<typename T >
T om::math::VectorND< T, 4 >::w

The W coordinate of a 4D vector.

template<typename T >
Swizzle2D<T,4,0,0> om::math::VectorND< T, 4 >::xx
template<typename T >
Swizzle2D<T,4,0,0> om::math::VectorND< T, 4 >::rr
template<typename T >
Swizzle2D<T,4,1,1> om::math::VectorND< T, 4 >::yy
template<typename T >
Swizzle2D<T,4,1,1> om::math::VectorND< T, 4 >::gg
template<typename T >
Swizzle2D<T,4,2,2> om::math::VectorND< T, 4 >::zz
template<typename T >
Swizzle2D<T,4,2,2> om::math::VectorND< T, 4 >::bb
template<typename T >
Swizzle2D<T,4,3,3> om::math::VectorND< T, 4 >::ww
template<typename T >
Swizzle2D<T,4,3,3> om::math::VectorND< T, 4 >::aa
template<typename T >
Swizzle2D<T,4,0,1> om::math::VectorND< T, 4 >::xy
template<typename T >
Swizzle2D<T,4,0,1> om::math::VectorND< T, 4 >::rg
template<typename T >
Swizzle2D<T,4,0,2> om::math::VectorND< T, 4 >::xz
template<typename T >
Swizzle2D<T,4,0,2> om::math::VectorND< T, 4 >::rb
template<typename T >
Swizzle2D<T,4,0,3> om::math::VectorND< T, 4 >::xw
template<typename T >
Swizzle2D<T,4,0,3> om::math::VectorND< T, 4 >::ra
template<typename T >
Swizzle2D<T,4,1,0> om::math::VectorND< T, 4 >::yx
template<typename T >
Swizzle2D<T,4,1,0> om::math::VectorND< T, 4 >::gr
template<typename T >
Swizzle2D<T,4,1,2> om::math::VectorND< T, 4 >::yz
template<typename T >
Swizzle2D<T,4,1,2> om::math::VectorND< T, 4 >::gb
template<typename T >
Swizzle2D<T,4,1,3> om::math::VectorND< T, 4 >::yw
template<typename T >
Swizzle2D<T,4,1,3> om::math::VectorND< T, 4 >::ga
template<typename T >
Swizzle2D<T,4,2,0> om::math::VectorND< T, 4 >::zx
template<typename T >
Swizzle2D<T,4,2,0> om::math::VectorND< T, 4 >::br
template<typename T >
Swizzle2D<T,4,2,1> om::math::VectorND< T, 4 >::zy
template<typename T >
Swizzle2D<T,4,2,1> om::math::VectorND< T, 4 >::bg
template<typename T >
Swizzle2D<T,4,2,3> om::math::VectorND< T, 4 >::zw
template<typename T >
Swizzle2D<T,4,2,3> om::math::VectorND< T, 4 >::ba
template<typename T >
Swizzle2D<T,4,3,0> om::math::VectorND< T, 4 >::wx
template<typename T >
Swizzle2D<T,4,3,0> om::math::VectorND< T, 4 >::ar
template<typename T >
Swizzle2D<T,4,3,1> om::math::VectorND< T, 4 >::wy
template<typename T >
Swizzle2D<T,4,3,1> om::math::VectorND< T, 4 >::ag
template<typename T >
Swizzle2D<T,4,3,2> om::math::VectorND< T, 4 >::wz
template<typename T >
Swizzle2D<T,4,3,2> om::math::VectorND< T, 4 >::ab
template<typename T >
Swizzle3D<T,4,0,0,0> om::math::VectorND< T, 4 >::xxx
template<typename T >
Swizzle3D<T,4,0,0,0> om::math::VectorND< T, 4 >::rrr
template<typename T >
Swizzle3D<T,4,1,1,1> om::math::VectorND< T, 4 >::yyy
template<typename T >
Swizzle3D<T,4,1,1,1> om::math::VectorND< T, 4 >::ggg
template<typename T >
Swizzle3D<T,4,2,2,2> om::math::VectorND< T, 4 >::zzz
template<typename T >
Swizzle3D<T,4,2,2,2> om::math::VectorND< T, 4 >::bbb
template<typename T >
Swizzle3D<T,4,3,3,3> om::math::VectorND< T, 4 >::www
template<typename T >
Swizzle3D<T,4,3,3,3> om::math::VectorND< T, 4 >::aaa
template<typename T >
Swizzle3D<T,4,0,1,1> om::math::VectorND< T, 4 >::xyy
template<typename T >
Swizzle3D<T,4,0,1,1> om::math::VectorND< T, 4 >::rgg
template<typename T >
Swizzle3D<T,4,1,0,1> om::math::VectorND< T, 4 >::yxy
template<typename T >
Swizzle3D<T,4,1,0,1> om::math::VectorND< T, 4 >::grg
template<typename T >
Swizzle3D<T,4,1,1,0> om::math::VectorND< T, 4 >::yyx
template<typename T >
Swizzle3D<T,4,1,1,0> om::math::VectorND< T, 4 >::ggr
template<typename T >
Swizzle3D<T,4,0,2,2> om::math::VectorND< T, 4 >::xzz
template<typename T >
Swizzle3D<T,4,0,2,2> om::math::VectorND< T, 4 >::rbb
template<typename T >
Swizzle3D<T,4,2,0,2> om::math::VectorND< T, 4 >::zxz
template<typename T >
Swizzle3D<T,4,2,0,2> om::math::VectorND< T, 4 >::brb
template<typename T >
Swizzle3D<T,4,2,2,0> om::math::VectorND< T, 4 >::zzx
template<typename T >
Swizzle3D<T,4,2,2,0> om::math::VectorND< T, 4 >::bbr
template<typename T >
Swizzle3D<T,4,0,3,3> om::math::VectorND< T, 4 >::xww
template<typename T >
Swizzle3D<T,4,0,3,3> om::math::VectorND< T, 4 >::raa
template<typename T >
Swizzle3D<T,4,3,0,3> om::math::VectorND< T, 4 >::wxw
template<typename T >
Swizzle3D<T,4,3,0,3> om::math::VectorND< T, 4 >::ara
template<typename T >
Swizzle3D<T,4,3,3,0> om::math::VectorND< T, 4 >::wwx
template<typename T >
Swizzle3D<T,4,3,3,0> om::math::VectorND< T, 4 >::aar
template<typename T >
Swizzle3D<T,4,1,0,0> om::math::VectorND< T, 4 >::yxx
template<typename T >
Swizzle3D<T,4,1,0,0> om::math::VectorND< T, 4 >::grr
template<typename T >
Swizzle3D<T,4,0,1,0> om::math::VectorND< T, 4 >::xyx
template<typename T >
Swizzle3D<T,4,0,1,0> om::math::VectorND< T, 4 >::rgr
template<typename T >
Swizzle3D<T,4,0,0,1> om::math::VectorND< T, 4 >::xxy
template<typename T >
Swizzle3D<T,4,0,0,1> om::math::VectorND< T, 4 >::rrg
template<typename T >
Swizzle3D<T,4,1,2,2> om::math::VectorND< T, 4 >::yzz
template<typename T >
Swizzle3D<T,4,1,2,2> om::math::VectorND< T, 4 >::gbb
template<typename T >
Swizzle3D<T,4,2,1,2> om::math::VectorND< T, 4 >::zyz
template<typename T >
Swizzle3D<T,4,2,1,2> om::math::VectorND< T, 4 >::bgb
template<typename T >
Swizzle3D<T,4,2,2,1> om::math::VectorND< T, 4 >::zzy
template<typename T >
Swizzle3D<T,4,2,2,1> om::math::VectorND< T, 4 >::bbg
template<typename T >
Swizzle3D<T,4,1,3,3> om::math::VectorND< T, 4 >::yww
template<typename T >
Swizzle3D<T,4,1,3,3> om::math::VectorND< T, 4 >::gaa
template<typename T >
Swizzle3D<T,4,3,1,3> om::math::VectorND< T, 4 >::wyw
template<typename T >
Swizzle3D<T,4,3,1,3> om::math::VectorND< T, 4 >::aga
template<typename T >
Swizzle3D<T,4,3,3,1> om::math::VectorND< T, 4 >::wwy
template<typename T >
Swizzle3D<T,4,3,3,1> om::math::VectorND< T, 4 >::aag
template<typename T >
Swizzle3D<T,4,2,0,0> om::math::VectorND< T, 4 >::zxx
template<typename T >
Swizzle3D<T,4,2,0,0> om::math::VectorND< T, 4 >::brr
template<typename T >
Swizzle3D<T,4,0,2,0> om::math::VectorND< T, 4 >::xzx
template<typename T >
Swizzle3D<T,4,0,2,0> om::math::VectorND< T, 4 >::rbr
template<typename T >
Swizzle3D<T,4,0,0,2> om::math::VectorND< T, 4 >::xxz
template<typename T >
Swizzle3D<T,4,0,0,2> om::math::VectorND< T, 4 >::rrb
template<typename T >
Swizzle3D<T,4,2,1,1> om::math::VectorND< T, 4 >::zyy
template<typename T >
Swizzle3D<T,4,2,1,1> om::math::VectorND< T, 4 >::bgg
template<typename T >
Swizzle3D<T,4,1,2,1> om::math::VectorND< T, 4 >::yzy
template<typename T >
Swizzle3D<T,4,1,2,1> om::math::VectorND< T, 4 >::gbg
template<typename T >
Swizzle3D<T,4,1,1,2> om::math::VectorND< T, 4 >::yyz
template<typename T >
Swizzle3D<T,4,1,1,2> om::math::VectorND< T, 4 >::ggb
template<typename T >
Swizzle3D<T,4,2,3,3> om::math::VectorND< T, 4 >::zww
template<typename T >
Swizzle3D<T,4,2,3,3> om::math::VectorND< T, 4 >::baa
template<typename T >
Swizzle3D<T,4,3,2,3> om::math::VectorND< T, 4 >::wzw
template<typename T >
Swizzle3D<T,4,3,2,3> om::math::VectorND< T, 4 >::aba
template<typename T >
Swizzle3D<T,4,3,3,2> om::math::VectorND< T, 4 >::wwz
template<typename T >
Swizzle3D<T,4,3,3,2> om::math::VectorND< T, 4 >::aab
template<typename T >
Swizzle3D<T,4,3,0,0> om::math::VectorND< T, 4 >::wxx
template<typename T >
Swizzle3D<T,4,3,0,0> om::math::VectorND< T, 4 >::arr
template<typename T >
Swizzle3D<T,4,0,3,0> om::math::VectorND< T, 4 >::xwx
template<typename T >
Swizzle3D<T,4,0,3,0> om::math::VectorND< T, 4 >::rar
template<typename T >
Swizzle3D<T,4,0,0,3> om::math::VectorND< T, 4 >::xxw
template<typename T >
Swizzle3D<T,4,0,0,3> om::math::VectorND< T, 4 >::rra
template<typename T >
Swizzle3D<T,4,3,1,1> om::math::VectorND< T, 4 >::wyy
template<typename T >
Swizzle3D<T,4,3,1,1> om::math::VectorND< T, 4 >::agg
template<typename T >
Swizzle3D<T,4,1,3,1> om::math::VectorND< T, 4 >::ywy
template<typename T >
Swizzle3D<T,4,1,3,1> om::math::VectorND< T, 4 >::gag
template<typename T >
Swizzle3D<T,4,1,1,3> om::math::VectorND< T, 4 >::yyw
template<typename T >
Swizzle3D<T,4,1,1,3> om::math::VectorND< T, 4 >::gga
template<typename T >
Swizzle3D<T,4,3,2,2> om::math::VectorND< T, 4 >::wzz
template<typename T >
Swizzle3D<T,4,3,2,2> om::math::VectorND< T, 4 >::abb
template<typename T >
Swizzle3D<T,4,2,3,2> om::math::VectorND< T, 4 >::zwz
template<typename T >
Swizzle3D<T,4,2,3,2> om::math::VectorND< T, 4 >::bab
template<typename T >
Swizzle3D<T,4,2,2,3> om::math::VectorND< T, 4 >::zzw
template<typename T >
Swizzle3D<T,4,2,2,3> om::math::VectorND< T, 4 >::bba
template<typename T >
Swizzle3D<T,4,0,1,2> om::math::VectorND< T, 4 >::xyz
template<typename T >
Swizzle3D<T,4,0,1,2> om::math::VectorND< T, 4 >::rgb
template<typename T >
Swizzle3D<T,4,0,1,3> om::math::VectorND< T, 4 >::xyw
template<typename T >
Swizzle3D<T,4,0,1,3> om::math::VectorND< T, 4 >::rga
template<typename T >
Swizzle3D<T,4,0,2,1> om::math::VectorND< T, 4 >::xzy
template<typename T >
Swizzle3D<T,4,0,2,1> om::math::VectorND< T, 4 >::rbg
template<typename T >
Swizzle3D<T,4,0,2,3> om::math::VectorND< T, 4 >::xzw
template<typename T >
Swizzle3D<T,4,0,2,3> om::math::VectorND< T, 4 >::rba
template<typename T >
Swizzle3D<T,4,1,0,2> om::math::VectorND< T, 4 >::yxz
template<typename T >
Swizzle3D<T,4,1,0,2> om::math::VectorND< T, 4 >::grb
template<typename T >
Swizzle3D<T,4,1,0,3> om::math::VectorND< T, 4 >::yxw
template<typename T >
Swizzle3D<T,4,1,0,3> om::math::VectorND< T, 4 >::gra
template<typename T >
Swizzle3D<T,4,1,2,0> om::math::VectorND< T, 4 >::yzx
template<typename T >
Swizzle3D<T,4,1,2,0> om::math::VectorND< T, 4 >::gbr
template<typename T >
Swizzle3D<T,4,1,2,3> om::math::VectorND< T, 4 >::yzw
template<typename T >
Swizzle3D<T,4,1,2,3> om::math::VectorND< T, 4 >::gba
template<typename T >
Swizzle3D<T,4,2,1,0> om::math::VectorND< T, 4 >::zyx
template<typename T >
Swizzle3D<T,4,2,1,0> om::math::VectorND< T, 4 >::bgr
template<typename T >
Swizzle3D<T,4,2,1,3> om::math::VectorND< T, 4 >::zyw
template<typename T >
Swizzle3D<T,4,2,1,3> om::math::VectorND< T, 4 >::bga
template<typename T >
Swizzle3D<T,4,2,0,1> om::math::VectorND< T, 4 >::zxy
template<typename T >
Swizzle3D<T,4,2,0,1> om::math::VectorND< T, 4 >::brg
template<typename T >
Swizzle3D<T,4,2,0,3> om::math::VectorND< T, 4 >::zxw
template<typename T >
Swizzle3D<T,4,2,0,3> om::math::VectorND< T, 4 >::bra
template<typename T >
Swizzle4D<T,4,0,1,2,3> om::math::VectorND< T, 4 >::xyzw
template<typename T >
Swizzle4D<T,4,0,1,3,2> om::math::VectorND< T, 4 >::xywz
template<typename T >
Swizzle4D<T,4,0,2,1,3> om::math::VectorND< T, 4 >::xzyw
template<typename T >
Swizzle4D<T,4,0,2,3,1> om::math::VectorND< T, 4 >::xzwy
template<typename T >
Swizzle4D<T,4,0,3,1,2> om::math::VectorND< T, 4 >::xwyz
template<typename T >
Swizzle4D<T,4,0,3,2,1> om::math::VectorND< T, 4 >::xwzy
template<typename T >
Swizzle4D<T,4,1,0,2,3> om::math::VectorND< T, 4 >::yxzw
template<typename T >
Swizzle4D<T,4,1,0,3,2> om::math::VectorND< T, 4 >::yxwz
template<typename T >
Swizzle4D<T,4,1,2,0,3> om::math::VectorND< T, 4 >::yzxw
template<typename T >
Swizzle4D<T,4,1,2,3,0> om::math::VectorND< T, 4 >::yzwx
template<typename T >
Swizzle4D<T,4,1,3,0,2> om::math::VectorND< T, 4 >::ywxz
template<typename T >
Swizzle4D<T,4,1,3,2,0> om::math::VectorND< T, 4 >::ywzx
template<typename T >
Swizzle4D<T,4,2,0,1,3> om::math::VectorND< T, 4 >::zxyw
template<typename T >
Swizzle4D<T,4,2,0,3,1> om::math::VectorND< T, 4 >::zxwy
template<typename T >
Swizzle4D<T,4,2,1,0,3> om::math::VectorND< T, 4 >::zyxw
template<typename T >
Swizzle4D<T,4,2,1,3,0> om::math::VectorND< T, 4 >::zywx
template<typename T >
Swizzle4D<T,4,2,3,0,1> om::math::VectorND< T, 4 >::zwxy
template<typename T >
Swizzle4D<T,4,2,3,1,0> om::math::VectorND< T, 4 >::zwyx
template<typename T >
Swizzle4D<T,4,3,0,1,2> om::math::VectorND< T, 4 >::wxyz
template<typename T >
Swizzle4D<T,4,3,0,2,1> om::math::VectorND< T, 4 >::wxzy
template<typename T >
Swizzle4D<T,4,3,1,0,2> om::math::VectorND< T, 4 >::wyxz
template<typename T >
Swizzle4D<T,4,3,1,2,0> om::math::VectorND< T, 4 >::wyzx
template<typename T >
Swizzle4D<T,4,3,2,0,1> om::math::VectorND< T, 4 >::wzxy
template<typename T >
Swizzle4D<T,4,3,2,1,0> om::math::VectorND< T, 4 >::wzyx
union { ... }
template<typename T >
const VectorND< T, 4 > om::math::VectorND< T, 4 >::ZERO
static

A constant vector with all elements equal to zero.


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