#include <IceHPoint.h>
Public Member Functions | |
inline_ HPoint & | Add (float _x, float _y, float _z, float _w) |
Add a vector. | |
inline_ HPoint & | Add (const float f[4]) |
Add a vector. | |
inline_ | HPoint () |
Empty constructor. | |
inline_ | HPoint (float _x, float _y, float _z, float _w=0.0f) |
Constructor from floats. | |
inline_ | HPoint (const float f[4]) |
Constructor from array. | |
inline_ | HPoint (const Point &p, float _w=0.0f) |
Constructor from a Point. | |
inline_ float | Magnitude () const |
Computes magnitude. | |
float | Max () const |
Returns MAX(x, y, z, w);. | |
HPoint & | Max (const HPoint &p) |
Sets each element to be componentwise maximum. | |
float | Min () const |
Returns MIN(x, y, z, w);. | |
HPoint & | Min (const HPoint &p) |
Sets each element to be componentwise minimum. | |
inline_ HPoint & | Mul (float s) |
Multiplies by a scalar. | |
inline_ HPoint & | Normalize () |
Normalize the vector. | |
inline_ bool | operator!= (const HPoint &p) const |
Operator for "if(HPoint!=HPoint)". | |
inline_ HPoint | operator* (const HPoint &p) const |
Operator for HPoint Mul = HPoint * HPoint;. | |
inline_ HPoint | operator* (float s) const |
Operator for HPoint Scale = HPoint * float;. | |
Point | operator* (const Matrix3x3 &mat) const |
Operator for Point Mul = HPoint * Matrix3x3;. | |
HPoint | operator* (const Matrix4x4 &mat) const |
Operator for HPoint Mul = HPoint * Matrix4x4;. | |
inline_ HPoint & | operator*= (const HPoint &p) |
Operator for HPoint *= HPoint;. | |
inline_ HPoint & | operator*= (float s) |
Operator for HPoint *= float;. | |
HPoint & | operator*= (const Matrix4x4 &mat) |
Operator for HPoint *= Matrix4x4. | |
inline_ HPoint | operator+ (const HPoint &p) const |
Operator for HPoint Plus = HPoint + HPoint;. | |
inline_ HPoint & | operator+= (const HPoint &p) |
Operator for HPoint += HPoint;. | |
inline_ HPoint & | operator+= (float s) |
Operator for HPoint += float;. | |
inline_ HPoint | operator- () const |
Operator for HPoint Negate = - HPoint;. | |
inline_ HPoint | operator- (const HPoint &p) const |
Operator for HPoint Minus = HPoint - HPoint;. | |
inline_ HPoint & | operator-= (const HPoint &p) |
Operator for HPoint -= HPoint;. | |
inline_ HPoint & | operator-= (float s) |
Operator for HPoint -= float;. | |
inline_ HPoint | operator/ (const HPoint &p) const |
Operator for HPoint Div = HPoint / HPoint;. | |
inline_ HPoint | operator/ (float s) const |
Operator for HPoint Scale = HPoint / float;. | |
inline_ HPoint & | operator/= (const HPoint &p) |
Operator for HPoint /= HPoint;. | |
inline_ HPoint & | operator/= (float s) |
Operator for HPoint /= float;. | |
inline_ bool | operator== (const HPoint &p) const |
Operator for "if(HPoint==HPoint)". | |
inline_ float | operator| (const HPoint &p) const |
Operator for float DotProd = HPoint | HPoint;. | |
inline_ HPoint & | Set (float _x, float _y, float _z, float _w) |
Assignment from values. | |
inline_ HPoint & | Set (const float f[4]) |
Assignment from array. | |
inline_ HPoint & | Set (const HPoint &src) |
Assignment from another h-point. | |
inline_ float | SquareMagnitude () const |
Computes square magnitude. | |
inline_ HPoint & | Sub (float _x, float _y, float _z, float _w) |
Subtract a vector. | |
inline_ HPoint & | Sub (const float f[4]) |
Subtract a vector. | |
inline_ HPoint & | Zero () |
Clear the point. | |
inline_ | ~HPoint () |
Destructor. | |
Public Attributes | |
float | w |
Cast a HPoint to a Point. w is discarded. | |
Friends | |
inline_ friend HPoint | operator* (float s, const HPoint &p) |
Operator for HPoint Scale = float * HPoint;. | |
inline_ friend HPoint | operator/ (float s, const HPoint &p) |
Operator for HPoint Scale = float / HPoint;. |
Homogeneous point.
Use it:
Definition at line 15 of file IceHPoint.h.
inline_ HPoint::HPoint | ( | ) | [inline] |
Empty constructor.
Definition at line 20 of file IceHPoint.h.
inline_ HPoint::HPoint | ( | float | _x, |
float | _y, | ||
float | _z, | ||
float | _w = 0.0f |
||
) | [inline] |
Constructor from floats.
Definition at line 22 of file IceHPoint.h.
inline_ HPoint::HPoint | ( | const float | f[4] | ) | [inline] |
Constructor from array.
Definition at line 24 of file IceHPoint.h.
inline_ HPoint::HPoint | ( | const Point & | p, |
float | _w = 0.0f |
||
) | [inline] |
Constructor from a Point.
Definition at line 26 of file IceHPoint.h.
inline_ HPoint::~HPoint | ( | ) | [inline] |
Destructor.
Definition at line 28 of file IceHPoint.h.
inline_ HPoint& HPoint::Add | ( | float | _x, |
float | _y, | ||
float | _z, | ||
float | _w | ||
) | [inline] |
Add a vector.
Definition at line 41 of file IceHPoint.h.
inline_ HPoint& HPoint::Add | ( | const float | f[4] | ) | [inline] |
Add a vector.
Definition at line 43 of file IceHPoint.h.
inline_ float HPoint::Magnitude | ( | ) | const [inline] |
float HPoint::Max | ( | ) | const [inline] |
HPoint& HPoint::Max | ( | const HPoint & | p | ) | [inline] |
Sets each element to be componentwise maximum.
Definition at line 60 of file IceHPoint.h.
float HPoint::Min | ( | ) | const [inline] |
HPoint& HPoint::Min | ( | const HPoint & | p | ) | [inline] |
Sets each element to be componentwise minimum.
Definition at line 58 of file IceHPoint.h.
inline_ HPoint& HPoint::Mul | ( | float | s | ) | [inline] |
Multiplies by a scalar.
Definition at line 51 of file IceHPoint.h.
inline_ HPoint& HPoint::Normalize | ( | ) | [inline] |
Operator for "if(HPoint!=HPoint)".
Definition at line 145 of file IceHPoint.h.
Operator for HPoint Mul = HPoint * HPoint;.
Definition at line 92 of file IceHPoint.h.
Operator for HPoint Scale = HPoint * float;.
Reimplemented from Point.
Definition at line 94 of file IceHPoint.h.
Operator for HPoint *= HPoint;.
Definition at line 120 of file IceHPoint.h.
Operator for HPoint *= float;.
Reimplemented from Point.
Definition at line 122 of file IceHPoint.h.
Operator for HPoint Plus = HPoint + HPoint;.
Definition at line 87 of file IceHPoint.h.
Operator for HPoint += HPoint;.
Definition at line 110 of file IceHPoint.h.
Operator for HPoint += float;.
Reimplemented from Point.
Definition at line 112 of file IceHPoint.h.
Operator for HPoint Negate = - HPoint;.
Reimplemented from Point.
Definition at line 84 of file IceHPoint.h.
Operator for HPoint Minus = HPoint - HPoint;.
Definition at line 89 of file IceHPoint.h.
Operator for HPoint -= HPoint;.
Definition at line 115 of file IceHPoint.h.
Operator for HPoint -= float;.
Reimplemented from Point.
Definition at line 117 of file IceHPoint.h.
Operator for HPoint Div = HPoint / HPoint;.
Definition at line 99 of file IceHPoint.h.
Operator for HPoint Scale = HPoint / float;.
Reimplemented from Point.
Definition at line 101 of file IceHPoint.h.
Operator for HPoint /= HPoint;.
Definition at line 125 of file IceHPoint.h.
Operator for HPoint /= float;.
Reimplemented from Point.
Definition at line 127 of file IceHPoint.h.
Operator for "if(HPoint==HPoint)".
Definition at line 143 of file IceHPoint.h.
Operator for float DotProd = HPoint | HPoint;.
Definition at line 106 of file IceHPoint.h.
inline_ HPoint& HPoint::Set | ( | float | _x, |
float | _y, | ||
float | _z, | ||
float | _w | ||
) | [inline] |
Assignment from values.
Definition at line 34 of file IceHPoint.h.
inline_ HPoint& HPoint::Set | ( | const float | f[4] | ) | [inline] |
Assignment from array.
Definition at line 36 of file IceHPoint.h.
inline_ HPoint& HPoint::Set | ( | const HPoint & | src | ) | [inline] |
Assignment from another h-point.
Definition at line 38 of file IceHPoint.h.
inline_ float HPoint::SquareMagnitude | ( | ) | const [inline] |
inline_ HPoint& HPoint::Sub | ( | float | _x, |
float | _y, | ||
float | _z, | ||
float | _w | ||
) | [inline] |
Subtract a vector.
Definition at line 46 of file IceHPoint.h.
inline_ HPoint& HPoint::Sub | ( | const float | f[4] | ) | [inline] |
Subtract a vector.
Definition at line 48 of file IceHPoint.h.
inline_ HPoint& HPoint::Zero | ( | ) | [inline] |
Operator for HPoint Scale = float * HPoint;.
Definition at line 96 of file IceHPoint.h.
Operator for HPoint Scale = float / HPoint;.
Definition at line 103 of file IceHPoint.h.
float HPoint::w |
Cast a HPoint to a Point. w is discarded.
Definition at line 156 of file IceHPoint.h.