|
|
static const Vector< float, 2 > | kZeros2f (0.0f, 0.0f) |
| | 2-dimensional float Vector of zeros.
|
| |
|
static const Vector< float, 2 > | kOnes2f (1.0f, 1.0f) |
| | 2-dimensional float Vector of ones.
|
| |
|
static const Vector< float, 2 > | kAxisX2f (1.0f, 0.0f) |
| | 2-dimensional float unit Vector pointing along the X axis.
|
| |
|
static const Vector< float, 2 > | kAxisY2f (0.0f, 1.0f) |
| | 2-dimensional float unit Vector pointing along the Y axis.
|
| |
|
static const Vector< float, 3 > | kZeros3f (0.0f, 0.0f, 0.0f) |
| | 3-dimensional float Vector of zeros.
|
| |
|
static const Vector< float, 3 > | kOnes3f (1.0f, 1.0f, 1.0f) |
| | 3-dimensional float Vector of ones.
|
| |
|
static const Vector< float, 3 > | kAxisX3f (1.0f, 0.0f, 0.0f) |
| | 3-dimensional float unit Vector pointing along the X axis.
|
| |
|
static const Vector< float, 3 > | kAxisY3f (0.0f, 1.0f, 0.0f) |
| | 3-dimensional float unit Vector pointing along the Y axis.
|
| |
|
static const Vector< float, 3 > | kAxisZ3f (0.0f, 0.0f, 1.0f) |
| | 3-dimensional float unit Vector pointing along the Z axis.
|
| |
|
static const Vector< float, 4 > | kZeros4f (0.0f, 0.0f, 0.0f, 0.0f) |
| | 4-dimensional float Vector of zeros.
|
| |
|
static const Vector< float, 4 > | kOnes4f (1.0f, 1.0f, 1.0f, 1.0f) |
| | 4-dimensional float Vector of ones.
|
| |
|
static const Vector< float, 4 > | kAxisX4f (1.0f, 0.0f, 0.0f, 0.0f) |
| | 4-dimensional float unit Vector pointing along the X axis.
|
| |
|
static const Vector< float, 4 > | kAxisY4f (0.0f, 1.0f, 0.0f, 0.0f) |
| | 4-dimensional float unit Vector pointing along the Y axis.
|
| |
|
static const Vector< float, 4 > | kAxisZ4f (0.0f, 0.0f, 1.0f, 0.0f) |
| | 4-dimensional float unit Vector pointing along the Z axis.
|
| |
|
static const Vector< float, 4 > | kAxisW4f (0.0f, 0.0f, 0.0f, 1.0f) |
| | 4-dimensional float unit Vector pointing along the W axis.
|
| |
|
static const Vector< double, 2 > | kZeros2d (0.0, 0.0) |
| | 2-dimensional double Vector of zeros.
|
| |
|
static const Vector< double, 2 > | kOnes2d (1.0, 1.0) |
| | 2-dimensional double Vector of ones.
|
| |
|
static const Vector< double, 2 > | kAxisX2d (1.0, 0.0) |
| | 2-dimensional double unit Vector pointing along the X axis.
|
| |
|
static const Vector< double, 2 > | kAxisY2d (0.0, 1.0) |
| | 2-dimensional double unit Vector pointing along the Y axis.
|
| |
|
static const Vector< double, 3 > | kZeros3d (0.0, 0.0, 0.0) |
| | 3-dimensional double Vector of zeros.
|
| |
|
static const Vector< double, 3 > | kOnes3d (1.0, 1.0, 1.0) |
| | 3-dimensional double Vector of ones.
|
| |
|
static const Vector< double, 3 > | kAxisX3d (1.0, 0.0, 0.0) |
| | 3-dimensional double unit Vector pointing along the X axis.
|
| |
|
static const Vector< double, 3 > | kAxisY3d (0.0, 1.0, 0.0) |
| | 3-dimensional double unit Vector pointing along the Y axis.
|
| |
|
static const Vector< double, 3 > | kAxisZ3d (0.0, 0.0, 1.0) |
| | 3-dimensional double unit Vector pointing along the Z axis.
|
| |
|
static const Vector< double, 4 > | kZeros4d (0.0, 0.0, 0.0, 0.0) |
| | 4-dimensional double Vector of zeros.
|
| |
|
static const Vector< double, 4 > | kOnes4d (1.0, 1.0, 1.0, 1.0) |
| | 4-dimensional double Vector of ones.
|
| |
|
static const Vector< double, 4 > | kAxisX4d (1.0, 0.0, 0.0, 0.0) |
| | 4-dimensional double unit Vector pointing along the X axis.
|
| |
|
static const Vector< double, 4 > | kAxisY4d (0.0, 1.0, 0.0, 0.0) |
| | 4-dimensional double unit Vector pointing along the Y axis.
|
| |
|
static const Vector< double, 4 > | kAxisZ4d (0.0, 0.0, 1.0, 0.0) |
| | 4-dimensional double unit Vector pointing along the Z axis.
|
| |
|
static const Vector< double, 4 > | kAxisW4d (0.0, 0.0, 0.0, 1.0) |
| | 4-dimensional double unit Vector pointing along the W axis.
|
| |
|
static const Vector< int, 2 > | kOnes2i (1, 1) |
| | 2-dimensional int Vector of zeros.
|
| |
|
static const Vector< int, 2 > | kZeros2i (0, 0) |
| | 2-dimensional int Vector of ones.
|
| |
|
static const Vector< int, 2 > | kAxisX2i (1, 0) |
| | 2-dimensional int unit Vector pointing along the X axis.
|
| |
|
static const Vector< int, 2 > | kAxisY2i (0, 1) |
| | 2-dimensional int unit Vector pointing along the Y axis.
|
| |
|
static const Vector< int, 3 > | kZeros3i (0, 0, 0) |
| | 3-dimensional int Vector of zeros.
|
| |
|
static const Vector< int, 3 > | kOnes3i (1, 1, 1) |
| | 3-dimensional int Vector of ones.
|
| |
|
static const Vector< int, 3 > | kAxisX3i (1, 0, 0) |
| | 3-dimensional int unit Vector pointing along the X axis.
|
| |
|
static const Vector< int, 3 > | kAxisY3i (0, 1, 0) |
| | 3-dimensional int unit Vector pointing along the Y axis.
|
| |
|
static const Vector< int, 3 > | kAxisZ3i (0, 0, 1) |
| | 3-dimensional int unit Vector pointing along the Z axis.
|
| |
|
static const Vector< int, 4 > | kZeros4i (0, 0, 0, 0) |
| | 4-dimensional int Vector of zeros.
|
| |
|
static const Vector< int, 4 > | kOnes4i (1, 1, 1, 1) |
| | 4-dimensional int Vector of ones.
|
| |
|
static const Vector< int, 4 > | kAxisX4i (1, 0, 0, 0) |
| | 4-dimensional int unit Vector pointing along the X axis.
|
| |
|
static const Vector< int, 4 > | kAxisY4i (0, 1, 0, 0) |
| | 4-dimensional int unit Vector pointing along the Z axis.
|
| |
|
static const Vector< int, 4 > | kAxisZ4i (0, 0, 1, 0) |
| | 4-dimensional int unit Vector pointing along the Y axis.
|
| |
|
static const Vector< int, 4 > | kAxisW4i (0, 0, 0, 1) |
| | 4-dimensional int unit Vector pointing along the W axis.
|
| |
|
static const Quaternion< float > | kQuatIdentityf (1.0f, 0.0f, 0.0f, 0.0f) |
| | Quaternion Identity.
|
| |
|
static const Quaternion< double > | kQuatIdentityd (1.0, 0.0, 0.0, 0.0) |
| | Quaternion Identity.
|
| |
|
static const AffineTransform | kAffineIdentity (1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f) |
| |
| template<class T > |
| Vector< T, 3 > | cross (const Vector< T, 3 > &v1, const Vector< T, 3 > &v2) |
| | Calculate the cross product of two 3-dimensional Vectors. More...
|
| |
| template<class TV > |
| TV::Scalar | dot (const TV &v1, const TV &v2) |
| | Calculate the dot product of two N-dimensional Vectors of any type. More...
|
| |
| template<class TV > |
| TV | normalize (const TV &v1) |
| | Normalize an N-dimensional Vector of an arbitrary type. More...
|
| |
|
static const Vector< float, 4 > | kAffineWColumn (0.0f, 0.0f, 0.0f, 1.0f) |
| |
| template<class T > |
| bool | operator== (const Rect< T > &r1, const Rect< T > &r2) |
| | Check if two rects are identical. More...
|
| |
| template<class T > |
| bool | operator!= (const Rect< T > &r1, const Rect< T > &r2) |
| | Check if two rects are not identical. More...
|
| |
| template<class T > |
| T | Clamp (const T &x, const T &lower, const T &upper) |
| | Clamp x within [lower, upper]. More...
|
| |
| template<class T , class T2 > |
| T | Lerp (const T &range_start, const T &range_end, const T2 &percent) |
| | Linearly interpolate between range_start and range_end, based on percent. More...
|
| |
| template<class T > |
| T | Lerp (const T &range_start, const T &range_end, const T &percent) |
| | Linearly interpolate between range_start and range_end, based on percent. More...
|
| |
| template<class T > |
| bool | InRange (T val, T range_start, T range_end) |
| | Check if val is within [range_start..range_end). More...
|
| |
| template<class T > |
| T | Random () |
| | Generate a random value of type T. More...
|
| |
| template<class T > |
| T | RandomRange (T range) |
| | Generate a random value of type T in the range -range...+range. More...
|
| |
| template<class T > |
| T | RandomInRange (T range_start, T range_end) |
| | Generate a random number between [range_start, range_end]. More...
|
| |
| template<class T > |
| T | RoundUpToPowerOf2 (T x) |
| | Round a value up to the nearest power of 2. More...
|
| |
|
template<> |
| int32_t | RoundUpToPowerOf2 (int32_t x) |
| | Specialized version of RoundUpToPowerOf2 for int32_t.
|
| |
| template<typename T > |
| uint32_t | RoundUpToTypeBoundary (uint32_t v) |
| | Round a value up to the type's size boundary. More...
|
| |
| void * | AllocateAligned (size_t n) |
| | Allocate an aligned block of memory. More...
|
| |
| void | FreeAligned (void *p) |
| | Deallocate a block of memory allocated with AllocateAligned(). More...
|
| |
| template<class T , int d> |
| bool | operator== (const Vector< T, d > &lhs, const Vector< T, d > &rhs) |
| | Compare 2 Vectors of the same size for equality. More...
|
| |
| template<class T , int d> |
| bool | operator!= (const Vector< T, d > &lhs, const Vector< T, d > &rhs) |
| | Compare 2 Vectors of the same size for inequality. More...
|
| |
| template<class T , int d> |
| Vector< T, d > | operator- (const Vector< T, d > &v) |
| | Negate all elements of the Vector. More...
|
| |
| template<class T , int d> |
| Vector< T, d > | operator* (const Vector< T, d > &lhs, const Vector< T, d > &rhs) |
| | Multiply a vector by another Vector. More...
|
| |
| template<class T , int d> |
| Vector< T, d > | operator/ (const Vector< T, d > &lhs, const Vector< T, d > &rhs) |
| | Divide a vector by another Vector. More...
|
| |
| template<class T , int d> |
| Vector< T, d > | operator+ (const Vector< T, d > &lhs, const Vector< T, d > &rhs) |
| | Add a vector with another Vector. More...
|
| |
| template<class T , int d> |
| Vector< T, d > | operator- (const Vector< T, d > &lhs, const Vector< T, d > &rhs) |
| | subtract a vector with another Vector. More...
|
| |
| template<class T , int d> |
| Vector< T, d > | operator* (const Vector< T, d > &v, const T &s) |
| | Multiply a vector with a scalar. More...
|
| |
| template<class T , int d> |
| Vector< T, d > | operator+ (const Vector< T, d > &v, const T &s) |
| | Add a scalar to all elements of a vector. More...
|
| |
| template<class T , int d> |
| Vector< T, d > | operator- (const Vector< T, d > &v, const T &s) |
| | Subtract a scalar from all elements of a vector. More...
|
| |
| template<class T , int d> |
| Vector< T, d > & | operator*= (Vector< T, d > &lhs, const Vector< T, d > &rhs) |
| | Multiply (in-place) a vector with another Vector. More...
|
| |
| template<class T , int d> |
| Vector< T, d > & | operator/= (Vector< T, d > &lhs, const Vector< T, d > &rhs) |
| | Divide (in-place) a vector by another Vector. More...
|
| |
| template<class T , int d> |
| Vector< T, d > & | operator+= (Vector< T, d > &lhs, const Vector< T, d > &rhs) |
| | Add (in-place) a vector with another Vector. More...
|
| |
| template<class T , int d> |
| Vector< T, d > & | operator-= (Vector< T, d > &lhs, const Vector< T, d > &rhs) |
| | Subtract (in-place) another Vector from a vector. More...
|
| |
| template<class T , int d> |
| Vector< T, d > & | operator*= (Vector< T, d > &v, const T &s) |
| | Multiply (in-place) each element of a vector with a scalar. More...
|
| |
| template<class T , int d> |
| Vector< T, d > & | operator/= (Vector< T, d > &v, const T &s) |
| | Divide (in-place) each element of a vector by a scalar. More...
|
| |
| template<class T , int d> |
| Vector< T, d > & | operator+= (Vector< T, d > &v, const T &s) |
| | Add (in-place) a scalar to each element of a vector. More...
|
| |
| template<class T , int d> |
| Vector< T, d > & | operator-= (Vector< T, d > &v, const T &s) |
| | Subtract (in-place) a scalar from each element of a vector. More...
|
| |
| template<class T , int d> |
| Vector< T, d > | HadamardProductHelper (const Vector< T, d > &v1, const Vector< T, d > &v2) |
| | Calculate the hadamard or componentwise product of two vectors. More...
|
| |
| template<class T > |
| Vector< T, 3 > | CrossProductHelper (const Vector< T, 3 > &v1, const Vector< T, 3 > &v2) |
| | Calculate the cross product of two vectors. More...
|
| |
| template<class T , int d> |
| T | LengthSquaredHelper (const Vector< T, d > &v) |
| | Calculate the squared length of a vector. More...
|
| |
| template<class T , int d> |
| T | LengthHelper (const Vector< T, d > &v) |
| | Calculate the length of a vector. More...
|
| |
| template<class T , int d> |
| T | NormalizeHelper (Vector< T, d > &v) |
| | Normalize a vector in-place. More...
|
| |
| template<class T , int d> |
| Vector< T, d > | NormalizedHelper (const Vector< T, d > &v) |
| | Calculate the normalized version of a vector. More...
|
| |
| template<class T , int d> |
| Vector< T, d > | LerpHelper (const Vector< T, d > &v1, const Vector< T, d > &v2, const T percent) |
| | Linearly interpolate two vectors. More...
|
| |
| template<class T , int d> |
| Vector< T, d > | RandomInRangeHelper (const Vector< T, d > &min, const Vector< T, d > &max) |
| | Generates a random vector. More...
|
| |
| template<class T , int d> |
| Vector< T, d > | MaxHelper (const Vector< T, d > &v1, const Vector< T, d > &v2) |
| | Compare each component and returns max values. More...
|
| |
| template<class T , int d> |
| Vector< T, d > | MinHelper (const Vector< T, d > &v1, const Vector< T, d > &v2) |
| | Compare each component and returns min values. More...
|
| |
| template<class T > |
| bool | InRange2D (const mathfu::Vector< T, 2 > &val, const mathfu::Vector< T, 2 > &range_start, const mathfu::Vector< T, 2 > &range_end) |
| | Check if val is within [range_start..range_end), denoting a rectangular area. More...
|
| |
|
template<typename T , int d> |
| Vector< T, d > | RoundUpToPowerOf2 (const Vector< T, d > &v) |
| | Specialized version of RoundUpToPowerOf2 for vector.
|
| |