#include <glfxvec.h>
Public Member Functions | |
Vec4 (const float *v) | |
Vec4 (const Vec4 &v) | |
Vec4 (const Vec3 &v, float w) | |
Vec4 (float x, float y, float z, float w) | |
Vec4 (float f) | |
operator float * () | |
operator const float * () const | |
operator Vec3 () const | |
operator const Vec3 & () const | |
float & | operator[] (int n) |
Vec4 & | operator= (const Vec4 &v) |
Vec4 & | operator *= (const Vec4 &v) |
Vec4 & | operator/= (const Vec4 &v) |
Vec4 & | operator+= (const Vec4 &v) |
Vec4 & | operator-= (const Vec4 &v) |
Vec3 & | N () |
const Vec3 & | N () const |
bool | Equal (const Vec4 &v) const |
bool | NotEqual (const Vec4 &v) const |
float | Eval (const Vec3 &point) const |
bool | Coplanar (const Vec4 &v) const |
bool | RayIntersect (Vec3 &out, const Vec3 &org, const Vec3 &dir) const |
bool | LineIntersect (Vec3 &out, const Vec3 &beg, const Vec3 &end) const |
Vec3 | MirrorPoint (const Vec3 &point) const |
Vec3 | MirrorVector (const Vec3 &point) const |
Vec4 | MirrorPlane (const Vec4 &plane) const |
Vec3 | ProjectPoint (const Vec3 &point) const |
bool | PointOnPlane (const Vec3 &point) const |
Public Attributes | |
float | x |
float | y |
float | z |
float | w |
Friends | |
Vec4 | operator * (const Vec4 &a, const Vec4 &b) |
Vec4 | operator/ (const Vec4 &a, const Vec4 &b) |
Vec4 | operator+ (const Vec4 &a, const Vec4 &b) |
Vec4 | operator+ (const Vec4 &v) |
Vec4 | operator- (const Vec4 &a, const Vec4 &b) |
Vec4 | operator- (const Vec4 &v) |
bool | operator== (const Vec4 &a, const Vec4 &b) |
bool | operator!= (const Vec4 &a, const Vec4 &b) |
bool | PlanesIntersect (Vec3 &out, const Vec4 &a, const Vec4 &b, const Vec4 &c) |
Vec4 | PlaneFromPoint (const Vec3 &point, const Vec3 &normal) |
Vec4 | PlaneFromPoints (const Vec3 &a, const Vec3 &b, const Vec3 &c) |
Vec4 | PlaneFromEdge (const Vec3 &begin, const Vec3 &end, const Vec3 &normal) |
Vec4 | Lerp (const Vec4 &a, const Vec4 &b, float f) |
GLFX::Vec4::Vec4 | ( | const float * | v | ) | [inline] |
Construct from array of floats.
GLFX::Vec4::Vec4 | ( | const Vec4 & | v | ) | [inline] |
Construct from other vector.
GLFX::Vec4::Vec4 | ( | const Vec3 & | v, | |
float | w | |||
) | [inline] |
Construct from vector and scalar.
GLFX::Vec4::Vec4 | ( | float | x, | |
float | y, | |||
float | z, | |||
float | w | |||
) | [inline] |
Construct from four float values.
GLFX::Vec4::Vec4 | ( | float | f | ) | [inline] |
Construct from single float value.
GLFX::Vec4::operator float * | ( | ) | [inline] |
Convert to array of floats.
GLFX::Vec4::operator const float * | ( | ) | const [inline] |
Convert to array of floats.
GLFX::Vec4::operator Vec3 | ( | ) | const [inline] |
Convert to 3d vector.
GLFX::Vec4::operator const Vec3 & | ( | ) | const [inline] |
Convert to 3d vector.
float & GLFX::Vec4::operator[] | ( | int | n | ) | [inline] |
Get plane element.
Vec3 & GLFX::Vec4::N | ( | ) | [inline] |
Plane normal.
const Vec3 & GLFX::Vec4::N | ( | ) | const [inline] |
Plane normal.
bool GLFX::Vec4::Equal | ( | const Vec4 & | v | ) | const [inline] |
Test if plane are equal (with epsilon).
bool GLFX::Vec4::NotEqual | ( | const Vec4 & | v | ) | const [inline] |
Test if planes are not equal (with epsilon).
float GLFX::Vec4::Eval | ( | const Vec3 & | point | ) | const [inline] |
Evaluate point against plane.
bool GLFX::Vec4::Coplanar | ( | const Vec4 & | v | ) | const [inline] |
Test if planes are coplanar.
Find intersectio between plane and a ray.
Find intersection between plane and a line.
Project point onto plane (smallest distance).
bool GLFX::Vec4::PointOnPlane | ( | const Vec3 & | point | ) | const [inline] |
Test if point is on (thick) plane.
Find intersection of three planes (if exists).
Construct plane from point and normal.
Construct plane from three points.
Construct plane from line and normal.
Linear interpolation between to vectors.
float GLFX::Vec4::x |
X-coordinate.
float GLFX::Vec4::y |
Y-coordinate.
float GLFX::Vec4::z |
Z-coordinate.
float GLFX::Vec4::w |
W-coordinate.