#include <vector.h>
Public Methods | |
VECTOR (float sx=0, float sy=0, float sz=0) | |
~VECTOR () | |
float | GetMagnitude () |
void | Normalize () |
void | Reset () |
void | Set (float sx, float sy, float sz) |
void | CrossVector (VECTOR vect) |
float | DotProduct (VECTOR vect) |
const bool | nearlyEquals (const VECTOR &v, const SCALAR e) const |
const VECTOR | cross (const VECTOR &v) const |
const SCALAR | dot (const VECTOR &v) const |
const SCALAR | length () const |
const VECTOR | unit () const |
void | normalize () |
SCALAR & | operator[] (const long i) |
const bool | operator== (const VECTOR &v) const |
const bool | operator!= (const VECTOR &v) const |
const VECTOR | operator- () const |
const VECTOR & | operator= (const VECTOR &v) |
const VECTOR & | operator+= (const VECTOR &v) |
const VECTOR & | operator-= (const VECTOR &v) |
const VECTOR & | operator *= (const SCALAR &s) |
const VECTOR & | operator/= (const SCALAR &s) |
const VECTOR | operator+ (const VECTOR &v) const |
const VECTOR | operator- (const VECTOR &v) const |
const VECTOR | operator * (const SCALAR &s) const |
const VECTOR | operator/ (SCALAR s) const |
Public Attributes | |
float | x |
float | y |
float | z |
Friends | |
const VECTOR | operator * (const SCALAR &s, const VECTOR &v) |
|
Definition at line 5 of file vector.cpp. Referenced by cross(), operator *(), operator+(), operator-(), and operator/().
|
|
Definition at line 13 of file vector.cpp.
00014 { 00015 } |
|
Definition at line 29 of file vector.h. References VECTOR(), x, y, and z.
|
|
Definition at line 31 of file vector.cpp. Referenced by CreateDecal(), and QUAT::MultQuat().
|
|
Definition at line 36 of file vector.h. References SCALAR, x, y, and z. Referenced by DotProduct().
|
|
Definition at line 24 of file vector.cpp. References dot(), x, y, and z. Referenced by CheckForParallelVectors(), QUAT::MultQuat(), Spark::SetDefaults(), Bouncy::Update(), Roman::Update(), and Spark::Update().
|
|
Definition at line 39 of file vector.cpp. Referenced by CheckForParallelVectors(), CreateLightmaps(), Normalize(), and UpdateBullets().
|
|
Definition at line 42 of file vector.h. References SCALAR. Referenced by normalize(), and unit().
00043 { 00044 return (SCALAR)sqrt( (double)this->dot(*this) ); 00045 } |
|
Definition at line 23 of file vector.h. References SCALAR, x, y, and z.
|
|
Definition at line 54 of file vector.h. References length(). Referenced by CheckForParticleCollision(), and Spark::SetDefaults().
00055 { 00056 (*this) /= length(); 00057 } |
|
Definition at line 48 of file vector.cpp. References GetMagnitude(), x, y, and z. Referenced by CheckForParallelVectors(), CreateDecal(), CreateLargePortal(), CreateLightmaps(), DrawFire(), DrawHalo(), DrawImpactFlash(), Bouncy::Render(), Roman::Render(), and Spark::Render().
00049 { 00050 float magnitude = this->GetMagnitude(); 00051 x /= magnitude; 00052 y /= magnitude; 00053 z /= magnitude; 00054 } |
|
Definition at line 148 of file vector.h. References SCALAR, VECTOR(), x, y, and z.
|
|
Definition at line 117 of file vector.h. References SCALAR, x, y, and z.
|
|
Definition at line 78 of file vector.h.
00079 { 00080 return !(v == *this); 00081 } |
|
Definition at line 136 of file vector.h. References VECTOR(), x, y, and z.
|
|
Definition at line 99 of file vector.h.
|
|
Definition at line 142 of file vector.h. References VECTOR(), x, y, and z.
|
|
Definition at line 84 of file vector.h. References VECTOR(), x, y, and z.
|
|
Definition at line 108 of file vector.h.
|
|
Definition at line 160 of file vector.h. References SCALAR, VECTOR(), x, y, and z.
|
|
Definition at line 126 of file vector.h. References SCALAR, x, y, and z.
|
|
Definition at line 90 of file vector.h.
|
|
Definition at line 73 of file vector.h.
|
|
Definition at line 67 of file vector.h.
00068 { 00069 return *((&x) + i); 00070 } |
|
Definition at line 17 of file vector.cpp. Referenced by OBJECT::Reset(), CAMERA::Reset(), and BULLET::Reset().
|
|
Definition at line 18 of file vector.h. Referenced by CreateBouncy(), CreateDecal(), CreateRomanCandle(), and LIGHT::Reset().
|
|
Definition at line 48 of file vector.h. References length().
00049 { 00050 return (*this) / length(); 00051 } |
|
Definition at line 154 of file vector.h.
00155 { 00156 return v * s; 00157 } |
|
|
|