_vector3 Class Reference
[Math Data Types]
#include <_vector3.h>
Detailed Description
Generic vector3 class. Uses 16 Byte of mem instead of 12 (!)(C) 2002 RadonLabs GmbH
Definition at line 16 of file _vector3.h.
Public Member Functions | |
| _vector3 () | |
| constructor 1 | |
| _vector3 (const float _x, const float _y, const float _z) | |
| constructor 2 | |
| _vector3 (const _vector3 &vec) | |
| constructor 3 | |
| void | set (const float _x, const float _y, const float _z) |
| set elements 1 | |
| void | set (const _vector3 &vec) |
| set elements 2 | |
| float | len () const |
| return length | |
| float | lensquared () const |
| return length squared | |
| void | norm () |
| normalize | |
| void | operator+= (const _vector3 &v0) |
| inplace add | |
| void | operator-= (const _vector3 &v0) |
| inplace sub | |
| void | operator *= (float s) |
| inplace scalar multiplication | |
| bool | operator> (const _vector3 &rhs) |
| true if any of the elements are greater | |
| bool | operator< (const _vector3 &rhs) |
| true if any of the elements are smaller | |
| bool | operator== (const _vector3 &v0) |
| true if all elements are equal | |
| bool | operator!= (const _vector3 &v0) |
| true if any of the elements is not equal | |
| bool | isequal (const _vector3 &v, float tol) const |
| fuzzy compare, return true/false | |
| int | compare (const _vector3 &v, float tol) const |
| fuzzy compare, returns -1, 0, +1 | |
| void | rotate (const _vector3 &axis, float angle) |
| rotate around axis | |
| void | lerp (const _vector3 &v0, float lerpVal) |
| inplace linear interpolation | |
| void | lerp (const _vector3 &v0, const _vector3 &v1, float lerpVal) |
| set this vector to the linear interpolation between v0 and v1 | |
| _vector3 | findortho () const |
| returns a vector orthogonal to self, not normalized | |
| void | saturate () |
| saturate components between 0 and 1 | |
| float | dot (const _vector3 &v0) const |
| dot product | |
Static Public Member Functions | |
| static float | distance (const _vector3 &v0, const _vector3 &v1) |
| distance between 2 vector3's | |
| static float | angle (const _vector3 &v0, const _vector3 &v1) |
| returns the angle between 2 vectors | |
Public Attributes | |
| float | x |
| float | y |
| float | z |
Static Public Attributes | |
| static const _vector3 | zero = _vector3() |
Constructor & Destructor Documentation
|
|
constructor 1
Definition at line 80 of file _vector3.h. |
|
||||||||||||||||
|
constructor 2
Definition at line 92 of file _vector3.h. |
|
|
constructor 3
Definition at line 104 of file _vector3.h. |
Member Function Documentation
|
||||||||||||||||
|
set elements 1
Definition at line 117 of file _vector3.h. |
|
|
set elements 2
Definition at line 129 of file _vector3.h. |
|
|
return length
Definition at line 141 of file _vector3.h. |
|
|
return length squared
Definition at line 151 of file _vector3.h. |
|
|
normalize
Definition at line 161 of file _vector3.h. |
|
|
inplace add
Definition at line 177 of file _vector3.h. |
|
|
inplace sub
Definition at line 189 of file _vector3.h. |
|
|
inplace scalar multiplication
Definition at line 201 of file _vector3.h. |
|
|
true if any of the elements are greater
Definition at line 455 of file _vector3.h. |
|
|
true if any of the elements are smaller
Definition at line 472 of file _vector3.h. |
|
|
true if all elements are equal
Definition at line 421 of file _vector3.h. |
|
|
true if any of the elements is not equal
Definition at line 438 of file _vector3.h. |
|
||||||||||||
|
fuzzy compare, return true/false
Definition at line 213 of file _vector3.h. |
|
||||||||||||
|
fuzzy compare, returns -1, 0, +1
Definition at line 226 of file _vector3.h. |
|
||||||||||||
|
rotate around axis
Definition at line 239 of file _vector3.h. |
|
||||||||||||
|
inplace linear interpolation
Definition at line 347 of file _vector3.h. |
|
||||||||||||||||
|
set this vector to the linear interpolation between v0 and v1
Definition at line 359 of file _vector3.h. |
|
|
returns a vector orthogonal to self, not normalized Find a vector that is orthogonal to self. Self should not be (0,0,0). Return value is not normalized. Definition at line 385 of file _vector3.h. |
|
|
saturate components between 0 and 1
Definition at line 371 of file _vector3.h. |
|
|
dot product Dot product for vector3 Definition at line 411 of file _vector3.h. |
|
||||||||||||
|
distance between 2 vector3's
Definition at line 489 of file _vector3.h. |
|
||||||||||||
|
returns the angle between 2 vectors
Definition at line 500 of file _vector3.h. |
Member Data Documentation
|
|
Definition at line 3 of file _vector3.cc. |
|
|
Definition at line 73 of file _vector3.h. |
|
|
Definition at line 73 of file _vector3.h. |
|
|
Definition at line 73 of file _vector3.h. |
The documentation for this class was generated from the following files: