Jolt Physics
A multi core friendly Game Physics Engine
|
Templatized vector class. More...
#include <Vector.h>
Public Member Functions | |
Vector ()=default | |
Constructor. More... | |
Vector (const Vector &)=default | |
uint | GetRows () const |
Dimensions. More... | |
void | SetZero () |
Vector with all zeros. More... | |
template<class OtherVector > | |
void | CopyPart (const OtherVector &inV, uint inSourceRow, uint inNumRows, uint inDestRow) |
Copy a (part) of another vector into this vector. More... | |
float | operator[] (uint inCoordinate) const |
Get float component by index. More... | |
float & | operator[] (uint inCoordinate) |
bool | operator== (const Vector &inV2) const |
Comparison. More... | |
bool | operator!= (const Vector &inV2) const |
bool | IsZero () const |
Test if vector consists of all zeros. More... | |
bool | IsClose (const Vector &inV2, float inMaxDistSq=1.0e-12f) |
Test if two vectors are close to each other. More... | |
Vector & | operator= (const Vector &)=default |
Assignment. More... | |
Vector | operator* (const float inV2) const |
Multiply vector with float. More... | |
Vector & | operator*= (const float inV2) |
Vector | operator/ (float inV2) const |
Divide vector by float. More... | |
Vector & | operator/= (float inV2) |
Vector | operator+ (const Vector &inV2) const |
Add two float vectors (component wise) More... | |
Vector & | operator+= (const Vector &inV2) |
Vector | operator- () const |
Negate. More... | |
Vector | operator- (const Vector &inV2) const |
Subtract two float vectors (component wise) More... | |
Vector & | operator-= (const Vector &inV2) |
float | Dot (const Vector &inV2) const |
Dot product. More... | |
float | LengthSq () const |
Squared length of vector. More... | |
float | Length () const |
Length of vector. More... | |
bool | IsNormalized (float inToleranceSq=1.0e-6f) |
Check if vector is normalized. More... | |
Vector | Normalized () const |
Normalize vector. More... | |
Static Public Member Functions | |
static Vector | sZero () |
Public Attributes | |
float | mF32 [Rows] |
Friends | |
Vector | operator* (const float inV1, const Vector &inV2) |
Multiply vector with float. More... | |
ostream & | operator<< (ostream &inStream, const Vector &inV) |
To String. More... | |
Templatized vector class.
|
inline |
Copy a (part) of another vector into this vector.
Dot product.
|
inline |
Test if two vectors are close to each other.
Check if vector is normalized.
Test if vector consists of all zeros.
Multiply vector with float.
Add two float vectors (component wise)
Subtract two float vectors (component wise)
Divide vector by float.
Assignment.
Comparison.
Get float component by index.
Multiply vector with float.
To String.