RioEngine
0.1
My first attempt to create a 3D WYSIWYG Game Engine
|
a 3d vector template class for representing vectors and points in 3d More...
#include <ik_vec3d.h>
Public Member Functions | |
vec3d () | |
vec3d (T nx, T ny, T nz) | |
vec3d (const vec3d< T > &other) | |
vec3d< T > | operator- () const |
constructor creating an irrklang vec3d from an irrlicht vector. More... | |
vec3d< T > & | operator= (const vec3d< T > &other) |
vec3d< T > | operator+ (const vec3d< T > &other) const |
vec3d< T > & | operator+= (const vec3d< T > &other) |
vec3d< T > | operator- (const vec3d< T > &other) const |
vec3d< T > & | operator-= (const vec3d< T > &other) |
vec3d< T > | operator* (const vec3d< T > &other) const |
vec3d< T > & | operator*= (const vec3d< T > &other) |
vec3d< T > | operator* (const T v) const |
vec3d< T > & | operator*= (const T v) |
vec3d< T > | operator/ (const vec3d< T > &other) const |
vec3d< T > & | operator/= (const vec3d< T > &other) |
vec3d< T > | operator/ (const T v) const |
vec3d< T > & | operator/= (const T v) |
bool | operator<= (const vec3d< T > &other) const |
bool | operator>= (const vec3d< T > &other) const |
bool | operator== (const vec3d< T > &other) const |
bool | operator!= (const vec3d< T > &other) const |
bool | equals (const vec3d< T > &other) |
returns if this vector equalsfloat the other one, taking floating point rounding errors into account More... | |
void | set (const T nx, const T ny, const T nz) |
void | set (const vec3d< T > &p) |
ik_f64 | getLength () const |
Returns length of the vector. More... | |
ik_f64 | getLengthSQ () const |
Returns squared length of the vector. More... | |
T | dotProduct (const vec3d< T > &other) const |
Returns the dot product with another vector. More... | |
ik_f64 | getDistanceFrom (const vec3d< T > &other) const |
Returns distance from an other point. More... | |
ik_f32 | getDistanceFromSQ (const vec3d< T > &other) const |
Returns squared distance from an other point. More... | |
vec3d< T > | crossProduct (const vec3d< T > &p) const |
Calculates the cross product with another vector. More... | |
bool | isBetweenPoints (const vec3d< T > &begin, const vec3d< T > &end) const |
Returns if this vector interpreted as a point is on a line between two other points. More... | |
vec3d< T > & | normalize () |
Normalizes the vector. More... | |
void | setLength (T newlength) |
Sets the lenght of the vector to a new value. More... | |
void | invert () |
Inverts the vector. More... | |
void | rotateXZBy (ik_f64 degrees, const vec3d< T > ¢er) |
void | rotateXYBy (ik_f64 degrees, const vec3d< T > ¢er) |
void | rotateYZBy (ik_f64 degrees, const vec3d< T > ¢er) |
vec3d< T > | getInterpolated (const vec3d< T > &other, ik_f32 d) const |
Returns interpolated vector. More... | |
vec3d< T > | getHorizontalAngle () |
Gets the Y and Z rotations of a vector. More... | |
void | getAs4Values (T *array) |
Fills an array of 4 values with the vector data (usually floats). More... | |
Public Attributes | |
T | X |
T | Y |
T | Z |
a 3d vector template class for representing vectors and points in 3d
Definition at line 17 of file ik_vec3d.h.
|
inline |
Definition at line 21 of file ik_vec3d.h.
|
inline |
Definition at line 22 of file ik_vec3d.h.
|
inline |
Definition at line 23 of file ik_vec3d.h.
|
inline |
Calculates the cross product with another vector.
Definition at line 103 of file ik_vec3d.h.
|
inline |
Returns the dot product with another vector.
Definition at line 81 of file ik_vec3d.h.
|
inline |
returns if this vector equalsfloat the other one, taking floating point rounding errors into account
Definition at line 62 of file ik_vec3d.h.
|
inline |
Fills an array of 4 values with the vector data (usually floats).
Useful for setting in shader constants for example. The fourth value will always be 0.
Definition at line 234 of file ik_vec3d.h.
|
inline |
Returns distance from an other point.
Here, the vector is interpreted as point in 3 dimensional space.
Definition at line 88 of file ik_vec3d.h.
|
inline |
Returns squared distance from an other point.
Here, the vector is interpreted as point in 3 dimensional space.
Definition at line 96 of file ik_vec3d.h.
|
inline |
Gets the Y and Z rotations of a vector.
Thanks to Arras on the Irrlicht forums to add this method.
Definition at line 209 of file ik_vec3d.h.
|
inline |
Returns interpolated vector.
other | other vector to interpolate between |
d | value between 0.0f and 1.0f. |
Definition at line 197 of file ik_vec3d.h.
|
inline |
Returns length of the vector.
Definition at line 73 of file ik_vec3d.h.
|
inline |
Returns squared length of the vector.
This is useful because it is much faster then getLength().
Definition at line 78 of file ik_vec3d.h.
|
inline |
Inverts the vector.
Definition at line 139 of file ik_vec3d.h.
|
inline |
Returns if this vector interpreted as a point is on a line between two other points.
It is assumed that the point is on the line.
Definition at line 110 of file ik_vec3d.h.
|
inline |
Normalizes the vector.
Definition at line 118 of file ik_vec3d.h.
|
inline |
Definition at line 57 of file ik_vec3d.h.
|
inline |
Definition at line 43 of file ik_vec3d.h.
|
inline |
Definition at line 45 of file ik_vec3d.h.
|
inline |
Definition at line 44 of file ik_vec3d.h.
|
inline |
Definition at line 46 of file ik_vec3d.h.
|
inline |
Definition at line 37 of file ik_vec3d.h.
|
inline |
Definition at line 38 of file ik_vec3d.h.
|
inline |
constructor creating an irrklang vec3d from an irrlicht vector.
Definition at line 33 of file ik_vec3d.h.
|
inline |
Definition at line 40 of file ik_vec3d.h.
|
inline |
Definition at line 41 of file ik_vec3d.h.
|
inline |
Definition at line 48 of file ik_vec3d.h.
|
inline |
Definition at line 50 of file ik_vec3d.h.
|
inline |
Definition at line 49 of file ik_vec3d.h.
|
inline |
Definition at line 51 of file ik_vec3d.h.
|
inline |
Definition at line 53 of file ik_vec3d.h.
|
inline |
Definition at line 35 of file ik_vec3d.h.
|
inline |
Definition at line 56 of file ik_vec3d.h.
|
inline |
Definition at line 54 of file ik_vec3d.h.
|
inline |
Rotates the vector by a specified number of degrees around the Z axis and the specified center.
degrees | Number of degrees to rotate around the Z axis. |
center | The center of the rotation. |
Definition at line 166 of file ik_vec3d.h.
|
inline |
Rotates the vector by a specified number of degrees around the Y axis and the specified center.
degrees | Number of degrees to rotate around the Y axis. |
center | The center of the rotation. |
Definition at line 150 of file ik_vec3d.h.
|
inline |
Rotates the vector by a specified number of degrees around the X axis and the specified center.
degrees | Number of degrees to rotate around the X axis. |
center | The center of the rotation. |
Definition at line 182 of file ik_vec3d.h.
|
inline |
Definition at line 69 of file ik_vec3d.h.
|
inline |
Definition at line 70 of file ik_vec3d.h.
|
inline |
Sets the lenght of the vector to a new value.
Definition at line 132 of file ik_vec3d.h.
T irrklang::vec3d< T >::X |
Definition at line 245 of file ik_vec3d.h.
T irrklang::vec3d< T >::Y |
Definition at line 245 of file ik_vec3d.h.
T irrklang::vec3d< T >::Z |
Definition at line 245 of file ik_vec3d.h.