#include <glfxvec.h>
Public Member Functions | |
Vec3 (const float *v) | |
Vec3 (const Vec3 &v) | |
Vec3 (float x, float y, float z) | |
Vec3 (float f) | |
operator float * () | |
operator const float * () const | |
operator Vec2 () const | |
operator Vec4 () const | |
float & | operator[] (int n) |
Vec3 & | operator= (const Vec3 &v) |
Vec3 & | Normalize () |
float | Length () const |
bool | Equal (const Vec3 &v) const |
bool | NotEqual (const Vec3 &v) const |
Vec3 | MakePlanar (const Vec3 &v) const |
Vec3 & | operator *= (const Vec3 &v) |
Vec3 & | operator/= (const Vec3 &v) |
Vec3 & | operator+= (const Vec3 &v) |
Vec3 & | operator-= (const Vec3 &v) |
Public Attributes | |
float | x |
float | y |
float | z |
Friends | |
Vec3 | operator * (const Vec3 &a, const Vec3 &b) |
Vec3 | operator/ (const Vec3 &a, const Vec3 &b) |
Vec3 | operator+ (const Vec3 &a, const Vec3 &b) |
Vec3 | operator+ (const Vec3 &v) |
Vec3 | operator- (const Vec3 &a, const Vec3 &b) |
Vec3 | operator- (const Vec3 &v) |
bool | operator== (const Vec3 &a, const Vec3 &b) |
bool | operator!= (const Vec3 &a, const Vec3 &b) |
bool | operator< (const Vec3 &a, const Vec3 &b) |
Vec3 | Cross (const Vec3 &a, const Vec3 &b) |
float | Dot (const Vec3 &a, const Vec3 &b) |
Vec3 | Normalize (const Vec3 &v) |
Vec3 | Lerp (const Vec3 &a, const Vec3 &b, float f) |
Vec3 | RotateVectorX (const Vec3 &v, float angle) |
Vec3 | RotateVectorY (const Vec3 &v, float angle) |
Vec3 | RotateVectorZ (const Vec3 &v, float angle) |
float | Length (const Vec3 &a) |
GLFX::Vec3::Vec3 | ( | const float * | v | ) | [inline] |
Construct vector from array of floats.
GLFX::Vec3::Vec3 | ( | const Vec3 & | v | ) | [inline] |
Construct vector from another one.
GLFX::Vec3::Vec3 | ( | float | x, | |
float | y, | |||
float | z | |||
) | [inline] |
Construct vector from 3 floats.
GLFX::Vec3::Vec3 | ( | float | f | ) | [inline] |
Construct vector from single float.
GLFX::Vec3::operator float * | ( | ) | [inline] |
Convert to array of floats.
GLFX::Vec3::operator const float * | ( | ) | const [inline] |
Convert to array of floats.
GLFX::Vec3::operator Vec2 | ( | ) | const [inline] |
Convert to 2d vector.
GLFX::Vec3::operator Vec4 | ( | ) | const [inline] |
Convert to 4d vector.
float & GLFX::Vec3::operator[] | ( | int | n | ) | [inline] |
Get vector element.
Vec3 & GLFX::Vec3::Normalize | ( | ) | [inline] |
Normalize vector. This method is not safe for zero-length vectors.
float GLFX::Vec3::Length | ( | ) | const [inline] |
Compute vector length.
bool GLFX::Vec3::Equal | ( | const Vec3 & | v | ) | const [inline] |
Test if (thick) vectors are equal.
bool GLFX::Vec3::NotEqual | ( | const Vec3 & | v | ) | const [inline] |
Test if (thick) vectors are not equal.
Make vector planar. The dot-product of this vector and the produced vector will be 0.
Test if any of vector a element is less than any of vector b element.
float Length | ( | const Vec3 & | a | ) | [friend] |
Compute vector length.
float GLFX::Vec3::x |
X-coordinate.
float GLFX::Vec3::y |
Y-coordinate.
float GLFX::Vec3::z |
Z-coordinate.