Documentation
















  Site Hosted by:

SourceForge.net Logo


Support This Project


ad::Vector3 Class Reference

3-Component vector More...

#include <vector3.h>

List of all members.

Public Member Functions

 Vector3 ()
 Initialize to 0,0,0.
 Vector3 (const Vector3 &v)
 Initialize to the values of another vector.
 Vector3 (float x, float y, float z)
 Initialize to x,y,z.
void Set (float x, float y, float z)
 Set to x,y,z.
Vector3operator= (const Vector3 &v)
 Assign to the values of another vector.
Vector3operator+= (const Vector3 &v)
 Add to this vector, the values of another vector.
Vector3operator-= (const Vector3 &v)
 Subtract from this vector the values of another vector.
Vector3operator *= (float f)
 Multiply and store the values of this vector by a scalar.
Vector3operator/= (float f)
 Divide and store the values of this vector by a scalar.
Vector3 operator+ (const Vector3 &v)
 Return the values of this vector plus another.
Vector3 operator- (const Vector3 &v)
 Return the values of this vector minus another.
Vector3 operator * (float f)
 Return the values of this vector times a scalar.
Vector3 operator/ (float f)
 Return the values of this vector divided by a scalar.
float Magnitude ()
 Return the magnitude of this vector.
Vector3Normalize ()
 Make this a unit-vector in the same direction.

Static Public Member Functions

static Vector3 Cross (const Vector3 &v1, const Vector3 &v2)
 Cross Product: returns the vector perpendicular to both v1 and v2.
static float Dot (const Vector3 &v1, const Vector3 &v2)
 Dot Product = | v1 || v2 | cos(a), cosine of the angle between two unit-vectors.

Public Attributes

float x
float y
float z


Detailed Description

3-Component vector

Mathematical structure used to hold 3D points and vectors.

See also:
ad::Matrix, ad::Quaternion


The documentation for this class was generated from the following files:

© Copyright 2005 John Butterfield.
All Rights Reserved.