Main Page   Class Hierarchy   Compound List   Header Files   Compound Members  

ddgVector2 Class Reference

Two dimensional vector class. More...

#include <ddgvec.h>

List of all members.


Public Members

 operator float * ()
return the value of the vector as a float array.

float operator[] (int n) const
Get value of one dimension of the vector.

float& operator[] (int n)
Returns n-th component of the vector.

bool operator== (ddgVector2 u)
Test for equivalence.

bool operator!= (ddgVector2 u)
Test for inequivalence.

void assign ( float *a)
Assign the value of a float array to this vector.

 ddgVector2 (void )
Create undefine vector.

 ddgVector2 (float *a )
 ddgVector2 (float a, float b )
 ddgVector2 ( const ddgVector2* u )
Construct with initial values from another vector.

ddgVector2& operator= (const ddgVector2& s)
Assign to another vector.

void zero ( void )
Initialize vector to zero.

void set (float a, float b )
Set vector components.

void set ( const ddgVector2 *u )
Set vector equal to another.

void get (float *a, float *b)
Return vector components.

void add ( const ddgVector2 *u )
ddgVector2& operator+= ( const ddgVector2& u)
Add two vectors.

ddgVector2& operator-= ( const ddgVector2& u)
Subtract two vectors.

ddgVector2& operator *= ( const ddgVector2& u)
Multiply two vectors.

ddgVector2& operator *= ( const float d)
Multiply vector by scalar.

ddgVector2& operator/= ( const ddgVector2& u)
Divide two vectors.

ddgVector2& operator/= ( const float d)
Divide vector by scalar.

void subtract ( ddgVector2 *u )
Subtract u from this vector.

void multiply ( float s )
Scale vector.

void multiply ( const ddgVector2 *u )
Multiply this and a vector.

void divide ( float s )
Divide each component of vector by s.

void divide ( const ddgVector2* u )
float sizesq ( void )
float size ( void )
bool null ( void )
void normalize ( void )
float angle ( const ddgVector2 *u )
Returns the angle between 2 normalized vectors.

float dot ( const ddgVector2 *u )
Calculate the dot product of this and u.

void inverse ()
Reverse direction of vector.

void minimum (ddgVector2* m )
Adjust this object to minimum values of given vector.

void maximum (ddgVector2* m )
float v [2]
Two floating point values.


Friends

bool operator== (const ddgVector2& u, const ddgVector2& v)
Test for equivalence.

bool operator!= (const ddgVector2& u, const ddgVector2& v)
Test for inequivalence.

ddgVector2 operator+ ( const ddgVector2& u, const ddgVector2& w)
Add two vectors.

ddgVector2 operator- ( const ddgVector2& u, const ddgVector2& w)
Subtract two vectors.

ddgVector2 operator * ( const ddgVector2& u, const ddgVector2& w)
Multiply two vectors.

ddgVector2 operator/ ( const ddgVector2& u, const ddgVector2& w)
Divide two vectors.

float operator| ( const ddgVector2& u, const ddgVector2& w)
Dot product of two vectors.

ddgVector2 operator * ( const float d, const ddgVector2& u)
Scale a vector by a constant and assign result.

ddgVector2 operator * ( const ddgVector2& u, const float d)
Scale a vector by a constant and assign result.

ddgVector2 operator/ ( const ddgVector2& u, const float d)
Divide a vector by a constant and assign result.


Detailed Description

Two dimensional vector class.


The documentation for this class was generated from the following file:
Generated at Sun Sep 17 19:27:58 2000 for Digital Dawn Graphics Toolkit by doxygen 0.49-991205 written by Dimitri van Heesch, © 1997-1999