#include <lvt/Vec.h>
Public Member Functions | |
float | AngleBetween (const Vec &v) const |
Returns the angle between this vector and another. | |
Vec | Cross (const Vec &rhs) const |
Returns the cross-product of this vector with another. | |
float | Distance (const class Plane &p) const |
Returns the distance from this vector to the Plane p. | |
float | Distance (const Vec &v) const |
Returns this distance between this vector and another. | |
float | Dot (const Vec &rhs) const |
Returns the dot product of this vector with another. | |
float | Length () const |
Returns the length of the vector. | |
Vec | Normalize () const |
Returns a new unit-length vector in the same direction as this vector. | |
Vec | operator- () const |
Reverses the direction of the vector. | |
Vec | Projection (const class Plane &p) const |
Returns the projection of this vector onto the Plane p. | |
Vec | Projection (const Vec &v) const |
Returns the projection of this vector onto another. | |
Vec & | operator *= (const Vec &rhs) |
Performs a component-wise multiply. | |
Vec & | operator *= (float rhs) |
float multiplication. | |
operator const float * () const | |
Conversion to C-style float array. | |
operator float * () | |
Conversion to C-style float array. | |
bool | operator== (const Vec &rhs) const |
Compares two vectors. | |
Vec & | operator+= (const Vec &rhs) |
Vector addition. | |
Vec & | operator-= (const Vec &rhs) |
Vector subtraction. | |
Vec & | operator/= (float rhs) |
float division. | |
const float & | operator[] (int i) const |
Array-style indexing operator. | |
Vec & | Set (float x, float y, float z, float w=1.0) |
Sets the coordinates of the Vec. | |
Vec () | |
Constructor. | |
Static Public Member Functions | |
static Vec | ZeroVector () |
Returns a new zero vector. |
|
Constructor.
|
|
Returns the angle between this vector and another.
|
|
Returns the cross-product of this vector with another.
|
|
Returns the distance from this vector to the Plane p.
|
|
Returns this distance between this vector and another.
|
|
Returns the dot product of this vector with another.
|
|
Returns the length of the vector.
|
|
Returns a new unit-length vector in the same direction as this vector.
|
|
Performs a component-wise multiply.
|
|
float multiplication.
|
|
Conversion to C-style float array.
|
|
Conversion to C-style float array.
|
|
Vector addition.
|
|
Reverses the direction of the vector.
|
|
Vector subtraction.
|
|
float division.
|
|
Compares two vectors.
|
|
Array-style indexing operator.
|
|
Returns the projection of this vector onto the Plane p.
|
|
Returns the projection of this vector onto another.
|
|
Sets the coordinates of the Vec.
|
|
Returns a new zero vector.
|