Main Page   Class Hierarchy   Compound List   File List   Compound Members  

vector3f Class Reference

Three floats in a array, lots of overloaded operators. More...

#include <misc.hpp>

List of all members.

Public Methods

 vector3f ()
 vector3f (float x, float y, float z)
 ~vector3f ()
void print ()
void LoadZero (void)
float Length (void)
float LengthSquared (void)
vector3f & operator= (const vector3f &v1)
vector3f Abs (void)
void Set (float x, float y, float z)

Public Attributes

float vertex [3]

Friends

bool operator== (const vector3f &v1, const vector3f &v2)
bool operator<= (const vector3f &v1, const vector3f &v2)
bool operator>= (const vector3f &v1, const vector3f &v2)
bool operator< (const vector3f &v1, const vector3f &v2)
bool operator> (const vector3f &v1, const vector3f &v2)
vector3f operator+ (const vector3f &v1, const vector3f &v2)
vector3f operator+ (const vector3f &v1, const float scalar)
vector3f operator- (const vector3f &v1, const vector3f &v2)
vector3f operator- (const vector3f &v1, const float scalar)
vector3f operator * (const vector3f &v1, const vector3f &v2)
vector3f operator * (const vector3f &v1, const float scalar)
vector3f operator/ (const vector3f &v1, const vector3f &v2)
vector3f operator/ (const vector3f &v1, const float scalar)
float dot (const vector3f &v1, const vector3f &v2)
vector3f Cross (const vector3f &v1, const vector3f &v2)


Detailed Description

Three floats in a array, lots of overloaded operators.

The basis of every 3D app, I'm sure there are some good standard implementation (like on boost.org?) but it's a good exercise for the initiate to do it themselves so they understand it inside and out (and then promptly forget about it once it works).

I might switch to a standard library, but it's nice to simply add my own additional functions and operators right here.


The documentation for this class was generated from the following files:
Generated on Sat May 10 10:09:38 2003 for volume-src-limited by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002