_vector2 Class Reference
[Math Data Types]
#include <_vector2.h>
Detailed Description
Generic vector2 class.(C) 2002 RadonLabs GmbH
Definition at line 16 of file _vector2.h.
Public Member Functions | |
| _vector2 () | |
| constructor 1 | |
| _vector2 (const float _x, const float _y) | |
| constructor 2 | |
| _vector2 (const _vector2 &vec) | |
| constructor 3 | |
| _vector2 (const float *p) | |
| constructor 4 | |
| void | set (const float _x, const float _y) |
| set elements 1 | |
| void | set (const _vector2 &vec) |
| set elements 2 | |
| void | set (const float *p) |
| set elements 3 | |
| float | len () const |
| return length | |
| void | norm () |
| normalize | |
| void | operator+= (const _vector2 &v0) |
| in place add | |
| void | operator-= (const _vector2 &v0) |
| in place sub | |
| void | operator *= (const float s) |
| in place scalar mul | |
| void | operator/= (const float s) |
| in place scalar div | |
| bool | operator== (const _vector2 &v0) |
| true if all elements are equal | |
| bool | operator!= (const _vector2 &v0) |
| true if any of the elements is not equal | |
| bool | isequal (const _vector2 &v, const float tol) const |
| fuzzy compare operator | |
| int | compare (const _vector2 &v, float tol) const |
| fuzzy compare, returns -1, 0, +1 | |
| void | rotate (float angle) |
| rotate around P(0,0) | |
| void | lerp (const _vector2 &v0, float lerpVal) |
| inplace linear interpolation | |
| void | lerp (const _vector2 &v0, const _vector2 &v1, float lerpVal) |
| linear interpolation between v0 and v1 | |
Public Attributes | |
| float | x |
| float | y |
Static Public Attributes | |
| static const _vector2 | zero = _vector2() |
Constructor & Destructor Documentation
|
|
constructor 1
Definition at line 70 of file _vector2.h. |
|
||||||||||||
|
constructor 2
Definition at line 81 of file _vector2.h. |
|
|
constructor 3
Definition at line 92 of file _vector2.h. |
|
|
constructor 4
Definition at line 103 of file _vector2.h. |
Member Function Documentation
|
||||||||||||
|
set elements 1
Definition at line 115 of file _vector2.h. |
|
|
set elements 2
Definition at line 126 of file _vector2.h. |
|
|
set elements 3
Definition at line 137 of file _vector2.h. |
|
|
return length
Definition at line 148 of file _vector2.h. |
|
|
normalize
Definition at line 158 of file _vector2.h. |
|
|
in place add
Definition at line 173 of file _vector2.h. |
|
|
in place sub
Definition at line 184 of file _vector2.h. |
|
|
in place scalar mul
Definition at line 195 of file _vector2.h. |
|
|
in place scalar div
Definition at line 206 of file _vector2.h. |
|
|
true if all elements are equal
Definition at line 217 of file _vector2.h. |
|
|
true if any of the elements is not equal
Definition at line 234 of file _vector2.h. |
|
||||||||||||
|
fuzzy compare operator
Definition at line 251 of file _vector2.h. |
|
||||||||||||
|
fuzzy compare, returns -1, 0, +1
Definition at line 263 of file _vector2.h. |
|
|
rotate around P(0,0)
Definition at line 275 of file _vector2.h. |
|
||||||||||||
|
inplace linear interpolation
Definition at line 335 of file _vector2.h. |
|
||||||||||||||||
|
linear interpolation between v0 and v1
Definition at line 346 of file _vector2.h. |
Member Data Documentation
|
|
Definition at line 3 of file _vector2.cc. |
|
|
Definition at line 63 of file _vector2.h. |
|
|
Definition at line 63 of file _vector2.h. |
The documentation for this class was generated from the following files: