Om  1.0.0
A universal framework for multimedia simulation
Classes | Namespaces | Functions
omVector2D.h File Reference
#include "omMathConfig.h"
#include "../data/omString.h"
#include "../data/omStringBuffer.h"
#include "omVectorND.h"

Classes

class  om::math::Swizzle2D< T, dimension, i0, i1 >
 A class that is used to implement arbitrary vector permutations. More...
 
class  om::math::VectorND< T, 2 >
 A class that represents a 2-dimensional point or vector. More...
 
class  om::math::Swizzle2D< T, dimension, i0, i1 >
 A class that is used to implement arbitrary vector permutations. More...
 
class  om::math::Swizzle2D< T, dimension, i0, i0 >
 A class that is used to implement arbitrary vector permutations. More...
 

Namespaces

 om
 The enclosing namespace for the entire Om library.
 
 om::math
 A namespace containing classes and functions that do fast math operations.
 

Functions

template<typename T >
VectorND< T, 2 > om::math::operator+ (T value, const VectorND< T, 2 > &vector)
 Add a value to every component of the vector. More...
 
template<typename T >
VectorND< T, 2 > om::math::operator- (T value, const VectorND< T, 2 > &vector)
 Subtract every component of the vector from the value, returning a vector result. More...
 
template<typename T >
VectorND< T, 2 > om::math::operator* (T value, const VectorND< T, 2 > &vector)
 Multiply every component of the vector with the value, returning a vector result. More...
 
template<typename T >
VectorND< T, 2 > om::math::operator/ (T value, const VectorND< T, 2 > &vector)
 Divide a value by every component of the vector, returning a vector result. More...
 
template<typename T >
om::math::dot (const VectorND< T, 2 > &vector1, const VectorND< T, 2 > &vector2)
 Compute and return the dot product of two vectors. More...
 
template<typename T >
VectorND< T, 2 > om::math::perp (const VectorND< T, 2 > &vector)
 Return the "perp" product of a vector. More...
 
template<typename T >
VectorND< T, 2 > om::math::midpoint (const VectorND< T, 2 > &vector1, const VectorND< T, 2 > &vector2)
 Compute the midpoint (e.g. average) of two vectors. More...
 
template<typename T >
VectorND< T, 2 > om::math::abs (const VectorND< T, 2 > &vector)
 Return the absolute value of the specified vector, such that the every component is positive. More...
 
template<typename T >
VectorND< T, 2 > om::math::min (const VectorND< T, 2 > &vector1, const VectorND< T, 2 > &vector2)
 Compute the component-wise minimum of two vectors. More...
 
template<typename T >
VectorND< T, 2 > om::math::max (const VectorND< T, 2 > &vector1, const VectorND< T, 2 > &vector2)
 Compute the component-wise minimum of two vectors. More...
 
template<typename T >
VectorND< T, 2 > om::math::floor (const VectorND< T, 2 > &vector)
 Return the floor of the specified vector, rounding each component down to the nearest integer. More...
 
template<typename T >
VectorND< T, 2 > om::math::ceiling (const VectorND< T, 2 > &vector)
 Return the floor of the specified vector, rounding each component up to the nearest integer. More...
 
template<typename T >
VectorND< T, 2 > om::math::mod (const VectorND< T, 2 > &vector, const T &modulus)
 Return the component-wise modulus of the specified vector. More...
 
template<typename T >
VectorND< T, 2 > om::math::mod (const VectorND< T, 2 > &vector, const VectorND< T, 2 > &modulus)
 Return the component-wise modulus of the specified vector. More...
 
template<typename T >
Bool om::math::isNAN (const VectorND< T, 2 > &vector)
 Return whether or not any component of this vector is Not-A-Number. More...
 
template<typename T , Index dimension, Index i0, Index i1>
VectorND< T, 2 > om::math::operator+ (T value, const Swizzle2D< T, dimension, i0, i1 > &vector)
 Add a scalar to every component of the vector. More...
 
template<typename T , Index dimension, Index i0, Index i1>
VectorND< T, 2 > om::math::operator- (T value, const Swizzle2D< T, dimension, i0, i1 > &vector)
 Subtract a scalar to every component of the vector. More...
 
template<typename T , Index dimension, Index i0, Index i1>
VectorND< T, 2 > om::math::operator* (T value, const Swizzle2D< T, dimension, i0, i1 > &vector)
 Multiply every component of a vector with scalar, returning a vector result. More...
 
template<typename T , Index dimension, Index i0, Index i1>
VectorND< T, 2 > om::math::operator/ (T value, const Swizzle2D< T, dimension, i0, i1 > &vector)
 Divide a value by every component of the vector, returning a vector result. More...