Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

gbmath::V4 Class Reference

4D Vector class. More...

#include <v4.h>

List of all members.

Public Methods

Constructors
 V4 (float x=0.f, float y=0.f, float z=0.f, float w=1.f)
 .

 V4 (const V4 &v)
 .

 V4 (const V3 &v, float w=0.f)
 .

Initializers
void Set (float x, float y, float z, float w)
 .

void Set (const V4 &v)
 .

void Set (const V3 &v, float w=0.f)
 .

Overloaded operators
V4 operator- () const
 .

V4 operator+ (float d) const
 .

V4 operator+ (const V4 &v) const
 .

V4 operator- (float d) const
 .

V4 operator- (const V4 &v) const
 .

V4 operator * (float d) const
 .

V4 operator * (const V4 &v) const
 .

V4 operator/ (float d) const
 .

V4 operator/ (const V4 &v) const
 .

void operator+= (const V4 &v)
 .

void operator-= (const V4 &v)
 .

void operator *= (float d)
 .

void operator *= (const V4 &v)
 .

void operator *= (const Mat44 &m)
 .

void operator/= (float d)
 .

Operations
float Dot (const V4 &v) const
 Dot product.

float Mag () const
 Vector's magnitude.

float MagSquared () const
 Vector's squared magnitude.

V4 GetNorm () const
 Returns a normalized vector.

V4 & Normalize ()
 Normalizes the vector in place.

bool Equals (const V4 &v, float eps=constants::Eps3) const
 Check equality given a threshold.


Static Public Attributes

V4 Axes [4]
 Cardinal vectors X, Y, Z, W.

V4 O
 Zero vector.

V4 Inf
 Infinity vector.


Detailed Description

4D Vector class.

Union members: float x, y, z, w; float xyzw [4];


Member Data Documentation

V4 gbmath::V4::Axes [static]
 

Initial value:

 { V4 (1.f, 0.f, 0.f, 0.f),
                       V4 (0.f, 1.f, 0.f, 0.f), 
                       V4 (0.f, 0.f, 1.f, 0.f),
                       V4 (0.f, 0.f, 0.f, 1.f) }
Cardinal vectors X, Y, Z, W.


The documentation for this class was generated from the following files:
Generated on Mon Sep 2 14:52:33 2002 for GunBuster Engine by doxygen1.2.17