MathFu
An open source project by FPL.
 All Classes Namespaces Files Functions Variables Typedefs Friends Groups Pages
mathfu::Vector< T, 3 > Class Template Reference

Public Types

typedef T Scalar
 

Public Member Functions

 Vector (const Vector< T, 3 > &v)
 
template<typename U >
 Vector (const Vector< U, 3 > &v)
 
 Vector (const T &s)
 
 Vector (const T *a)
 
 Vector (const T &s1, const T &s2, const T &s3)
 
 Vector (const Vector< T, 2 > &v12, const T &s3)
 
 Vector (const VectorPacked< T, 3 > &vector)
 
T & operator() (const int i)
 
const T & operator() (const int i) const
 
T & operator[] (const int i)
 
const T & operator[] (const int i) const
 
Vector< T, 3 > xyz ()
 
const Vector< T, 3 > xyz () const
 
Vector< T, 2 > xy ()
 
const Vector< T, 2 > xy () const
 
void Pack (VectorPacked< T, 3 > *const vector) const
 
LengthSquared () const
 
Length () const
 
Normalize ()
 
Vector< T, 3 > Normalized () const
 

Static Public Member Functions

template<typename CompatibleT >
static Vector< T, 3 > FromType (const CompatibleT &compatible)
 
template<typename CompatibleT >
static CompatibleT ToType (const Vector< T, 3 > &v)
 
static T DotProduct (const Vector< T, 3 > &v1, const Vector< T, 3 > &v2)
 
static Vector< T, 3 > HadamardProduct (const Vector< T, 3 > &v1, const Vector< T, 3 > &v2)
 
static Vector< T, 3 > CrossProduct (const Vector< T, 3 > &v1, const Vector< T, 3 > &v2)
 
static Vector< T, 3 > Lerp (const Vector< T, 3 > &v1, const Vector< T, 3 > &v2, const T percent)
 
static Vector< T, 3 > RandomInRange (const Vector< T, 3 > &min, const Vector< T, 3 > &max)
 
static Vector< T, 3 > Max (const Vector< T, 3 > &v1, const Vector< T, 3 > &v2)
 
static Vector< T, 3 > Min (const Vector< T, 3 > &v1, const Vector< T, 3 > &v2)
 

Public Attributes

MATHFU_DEFINE_CLASS_SIMD_AWARE_NEW_DELETE
union mathfu::Vector< T, 3 >:: { ... }  
 
data_ [3]
 
x
 
y
 
z
 

Static Public Attributes

static const int d = 3
 

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