Main Page   Class Hierarchy   Compound List   File List   Compound Members  

Vector Class Reference

Vector class definition. More...

#include <Vector.h>

Inheritance diagram for Vector::

Normal List of all members.

Public Methods

 Vector (const float x=0.0, const float y=0.0, const float z=0.0, const float w=1.0)
 Constructor. More...

float x () const
 Getter for the x value.

float y () const
 Getter for the y value.

float z () const
 Getter for the z velue.

float w () const
 Getter for the vector's space.

float & x ()
 Reference to the x value.

float & y ()
 Reference to the y value.

float & z ()
 Reference to the z value.

float & w ()
 Reference to the vector's space.

float magnitude () const
 Returns the magnitude of the vector.

void normalize ()
 Normalizes the vector (brings to the 1 space).

void set (float nx, float ny, float nz)
 Set all values.

std::string toString ()
 Returns a string showing the vector's values.


Vector operator+ (const Vector &v1, const Vector &v2)

Vector operator- (const Vector &v1, const Vector &v2)

float dot (const Vector &v1, const Vector &v2)
 Dot product.

Vector cross (const Vector &v1, const Vector &v2)
 Cross product.

Detailed Description

Vector class definition.

Constructor & Destructor Documentation

Vector::Vector const float    x = 0.0,
const float    y = 0.0,
const float    z = 0.0,
const float    w = 1.0


x  x value of the vector.
y  y value of the vector.
z  z value of the vector.
w  Space the vector exists in.

The documentation for this class was generated from the following files:
Generated on Fri Dec 21 00:16:49 2001 for Mesh Decimation by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001