Vector Class Reference

#include <Vector.h>

List of all members.

Public Member Functions

 Vector (void)
 Vector (float X, float Y, float Z)
 Vector (const Vector &v)
 Vector (float rgfl[3])
 Vector (Vector spitze, Vector schaft)
Vector operator- (void) const
int operator== (const Vector &v) const
int operator!= (const Vector &v) const
Vector operator+ (const Vector &v) const
Vector operator- (const Vector &v) const
Vector operator * (float fl) const
Vector operator/ (float fl) const
void copyToArray (float *rgfl) const
float length (void) const
Vector normalize (void) const
float dotProduct (const Vector &b)
Vector crossProduct (const Vector &b)
void rotateX (float angle)
void rotateY (float angle)
void rotateZ (float angle)
 Vector (float X, float Y, float Z)
 Vector (const Vector &v)
 Vector (float rgfl[3])
 Vector (Vector spitze, Vector schaft)
Vector operator- (void) const
int operator== (const Vector &v) const
int operator!= (const Vector &v) const
Vector operator+ (const Vector &v) const
Vector operator- (const Vector &v) const
Vector operator * (float fl) const
Vector operator/ (float fl) const
void copyToArray (float *rgfl) const
float length (void) const
Vector normalize (void) const
float dotProduct (const Vector &b)
Vector crossProduct (const Vector &b)
void rotateX (float angle)
void rotateY (float angle)
void rotateZ (float angle)

Static Public Member Functions

static float clampTo (float min, float max, float Val)
static float clampTo (float min, float max, float Val)

Public Attributes

float x
float y
float z


Detailed Description

A class for defining Vectors with three entries, so that mathematical operations like +, -, ... can be evaluated.


Constructor & Destructor Documentation

Vector::Vector void   )  [inline]
 

creates a zero vector

Vector::Vector float  X,
float  Y,
float  Z
[inline]
 

creates a vector containing the given values

Vector::Vector const Vector v  )  [inline]
 

creates a new vector from a given vector

Vector::Vector float  rgfl[3]  )  [inline]
 

creates a vector containing the values of the array

Vector::Vector Vector  spitze,
Vector  schaft
[inline]
 

calculates the deviation of two vectors


Member Function Documentation

static float Vector::clampTo float  min,
float  max,
float  Val
[inline, static]
 

rotates a vector by its Z-coordinate

void Vector::copyToArray float *  rgfl  )  const [inline]
 

copies the values of a vector into a given array

Vector Vector::crossProduct const Vector b  )  [inline]
 

calculates the dot product of a vector

float Vector::dotProduct const Vector b  )  [inline]
 

normalizes a vector

float Vector::length void   )  const [inline]
 

returns the length of a vector

Vector Vector::operator * float  fl  )  const [inline]
 

multiplies each value of a vector by the value of f1

int Vector::operator!= const Vector v  )  const [inline]
 

checks if two vectors are not equal

Vector Vector::operator+ const Vector v  )  const [inline]
 

adds two vectors

Vector Vector::operator- const Vector v  )  const [inline]
 

subtracts two vectors

Vector Vector::operator- void   )  const [inline]
 

multiplies every value by -1

Vector Vector::operator/ float  fl  )  const [inline]
 

divides each value of a vector by the value of f1

int Vector::operator== const Vector v  )  const [inline]
 

checks if two vectors are equal

void Vector::rotateX float  angle  )  [inline]
 

calculates the cross product of a vector

void Vector::rotateY float  angle  )  [inline]
 

rotates a vector by its X-coordinate

void Vector::rotateZ float  angle  )  [inline]
 

rotates a vector by its Y-coordinate


Member Data Documentation

float Vector::x
 

X-coordinate

float Vector::y
 

Y-coordinate

float Vector::z
 

Z-coordinate


The documentation for this class was generated from the following files:
Generated on Wed Dec 7 14:42:12 2005 for VisUE by  doxygen 1.4.5