#include <vector2.h>
Public Methods | |
| vec2_c () | |
| standard constructor | |
| vec2_c (const vec2_c &) | |
| copy constructor | |
| vec2_c (const vec2_t) | |
| vector from vec2_t | |
| vec2_c (float, float) | |
| vector from floats | |
| virtual | ~vec2_c () |
| destructor | |
| operator const float * () | |
| floats from vector | |
| void | set (float x, float y) |
| set vector coordinates | |
| void | clear () |
| clear vector | |
| float | length () |
| float | length_squared () |
| vec2_c | operator- (const vec2_t) |
| subtract vectors | |
| vec2_c | operator * (float) |
| add vectors | |
| vec2_c | operator * (const vec2_t) |
| scale by vector | |
| vec2_c | operator= (const vec2_t) |
| assignment | |
| bool | operator== (const vec2_t) |
| comparison | |
| vec2_c | ma (const vec_t s, const vec2_t vb) |
| vec2_c | ma_vec (const vec2_t s, const vec2_t vb) |
| add vectors scaled | |
| vec2_c | cross (const vec2_t v) |
| create cross product | |
| float | dot (const vec2_t v) |
| create dot product | |
| vec2_c | rotate (const vec_t angle) |
| rotate a vector | |
| vec2_c | perpendicular () |
Static Public Methods | |
| vec2_c | hermite (const vec2_t p1, const vec2_t t1, const vec2_t p2, const vec2_t t2, const float frac) |
| vec2_c | linear (const vec2_t p1, const vec2_t p2, const float frac) |
Protected Attributes | |
| vec2_t | vec |
| the data | |
|
||||||||||||||||||||||||
|
hermite interpolation Interpolates between two vectors using hermite interpolation.
Definition at line 228 of file m_vector2.cpp. References set_component(), and vec2_t. |
|
|
determine the length of a vector Returns the distance of this vector from the origin / the length of this vector.(|v|) Definition at line 100 of file m_vector2.cpp. |
|
|
determine the length of a vector Returns the distance of this vector from the origin / the length of this vector.(|v|^2) Definition at line 107 of file m_vector2.cpp. |
|
||||||||||||||||
|
linear interpolation Interpolates between two vectors using linear interpolation.
Definition at line 208 of file m_vector2.cpp. References _interpolate_float_linear(), set_component(), and vec2_t. Referenced by brushface_c::cut(), kmf_c::set_frame(), and particle_type_c::update(). |
|
||||||||||||
|
add two vectors scaled Scales vb by s, adds it and returns the result
Definition at line 159 of file m_vector2.cpp. |
|
||||||||||||
|
Definition at line 164 of file m_vector2.cpp. |
|
|
get a perpendicular vector Gets a vector that is perpendicular to the input vector. |
|
|
Definition at line 186 of file m_vector2.cpp. |
|
||||||||||||
|
Definition at line 84 of file m_vector2.cpp. References vec. Referenced by clear(), particle_type_c::particle_type_c(), and vec2_c(). |
1.2.18