vec3 Class Reference

#include <vec3.h>

List of all members.

Public Member Functions

float & operator[] (unsigned)
 returns an element of the vector
vec3operator= (const vec3 &)
 assignment operator
vec3operator+= (const vec3 &)
 adds the input vector to this one
vec3operator-= (const vec3 &)
 subtracts the input vector from this one
vec3operator*= (float)
 scales this vector with the scalar
vec3operator/= (float)
 scales this vector with the inverse of the scalar
const vec3 operator+ (const vec3 &) const
 adds two vectors
const vec3 operator- (const vec3 &) const
 subtracts two vectors
const vec3 operator* (float) const
 scales the vector with the scalar
const vec3 operator/ (float) const
 scales the vector with the inverse of the scalar
bool operator== (const vec3 &) const
 returns true if the vectors are equal
bool operator!= (const vec3 &) const
 returns true if the vectors differ in at least one component
vec3operator- ()
 opposite vector
float norm () const
 norm of the vector (length*length)
float length () const
 length of the vector
vec3operator! ()
 normalizes the vector
float dist2 (const vec3 &)
 norm of the vectors' difference (dist*dist)
float dist (const vec3 &)
 length of the vectors' difference
float operator* (const vec3 &) const
 dot product
const vec3 operator^ (const vec3 &) const
 cross product
void print ()
 print the vector components

Public Attributes

float v [3]
 our vector data


Detailed Description

3D vector class.
The documentation for this class was generated from the following files:

Generated on Mon Jan 19 03:19:32 2009 by  doxygen 1.5.6