Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Class Members

Vec Class Reference
[Core]

#include <lvt/Vec.h>

List of all members.


Detailed Description

3D Homogeneous vector.


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.
Vecoperator *= (const Vec &rhs)
 Performs a component-wise multiply.
Vecoperator *= (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.
Vecoperator+= (const Vec &rhs)
 Vector addition.
Vecoperator-= (const Vec &rhs)
 Vector subtraction.
Vecoperator/= (float rhs)
 float division.
const float & operator[] (int i) const
 Array-style indexing operator.
VecSet (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 & Destructor Documentation

Vec  )  [inline]
 

Constructor.


Member Function Documentation

float AngleBetween const Vec v  )  const [inline]
 

Returns the angle between this vector and another.

Vec Cross const Vec rhs  )  const [inline]
 

Returns the cross-product of this vector with another.

float Distance const class Plane p  )  const [inline]
 

Returns the distance from this vector to the Plane p.

float Distance const Vec v  )  const [inline]
 

Returns this distance between this vector and another.

float Dot const Vec rhs  )  const [inline]
 

Returns the dot product of this vector with another.

float Length  )  const [inline]
 

Returns the length of the vector.

Vec Normalize  )  const [inline]
 

Returns a new unit-length vector in the same direction as this vector.

Vec& operator *= const Vec rhs  )  [inline]
 

Performs a component-wise multiply.

Vec& operator *= float  rhs  )  [inline]
 

float multiplication.

operator const float *  )  const [inline]
 

Conversion to C-style float array.

operator float *  )  [inline]
 

Conversion to C-style float array.

Vec& operator+= const Vec rhs  )  [inline]
 

Vector addition.

Vec operator-  )  const [inline]
 

Reverses the direction of the vector.

Vec& operator-= const Vec rhs  )  [inline]
 

Vector subtraction.

Vec& operator/= float  rhs  )  [inline]
 

float division.

bool operator== const Vec rhs  )  const [inline]
 

Compares two vectors.

const float& operator[] int  i  )  const [inline]
 

Array-style indexing operator.

Vec Projection const class Plane p  )  const [inline]
 

Returns the projection of this vector onto the Plane p.

Vec Projection const Vec v  )  const [inline]
 

Returns the projection of this vector onto another.

Vec& Set float  x,
float  y,
float  z,
float  w = 1.0
[inline]
 

Sets the coordinates of the Vec.

static Vec ZeroVector  )  [inline, static]
 

Returns a new zero vector.


Generated on Thu Feb 17 09:45:48 2005 for liblvt by  doxygen 1.4.1