34 Point4D(
double x,
double y,
double z,
double w = 1.0);
78 double GetX()
const {
return vetCoord[0]; }
79 double GetY()
const {
return vetCoord[1]; }
80 double GetZ()
const {
return vetCoord[2]; }
81 double GetW()
const {
return vetCoord[3]; }
86 const double*
VetXYZW()
const {
return vetCoord; }
112 void SetX(
double x) { vetCoord[0] = x; }
113 void SetY(
double y) { vetCoord[1] = y; }
114 void SetZ(
double z) { vetCoord[2] = z; }
115 void SetW(
double w) { vetCoord[3] = w; }
116 void SetXY(
double x,
double y);
117 void SetXYZ(
double x,
double y,
double z);
118 void SetXYZW(
double x,
double y,
double z,
double w);
166 float WeightedSum()
const;
double AngleTo(const Point4D &p) const
Computes the angle up to p.
bool ZThenXLess(const Point4D &p) const
Points and vectors using homogeneous coordinates.
double Length() const
Returns the vector's length.
static tCompareOper operatorLess
Points to the operator to use within operator<.
static const Point4D & Y()
The Y vector (0,1,0,0).
friend std::ostream & operator<<(std::ostream &output, const Point4D &p)
Output operator.
Point4D operator-() const
Header file for V-ART class "Point".
void operator*=(double escalar)
void Normalize()
Normalizes the point/vector.
static float yWeight
Weight of the Y coordinate for Weighted comparisons.
Point4D operator+(const Point4D &vector) const
Addition for point and vector (or vice versa).
static const Point4D & Z()
The Z vector (0,0,1,0).
bool YThenZLess(const Point4D &p) const
Point4D operator/(double escalar) const
bool LexicographicalLess(const Point4D &p) const
Verifies whether a point is less than other by looking at coordinates in lexicographical (x...
Point4D CrossProduct(const Point4D &p) const
Computes the cross product between "this" and "p".
void SetXYZ(double x, double y, double z)
bool WeightedLess(const Point4D &p) const
static float xWeight
Weight of the X coordinate for Weighted comparisons.
bool operator!=(const Point4D &point) const
bool operator==(const Point4D &point) const
bool XThenZLess(const Point4D &p) const
Verifies whether a point is less then other by looking at coordinates X, then Z only.
void operator=(const Point4D &point)
static const Point4D & X()
The X vector (1,0,0,0).
static float zWeight
Weight of the Z coordinate for Weighted comparisons.
static const Point4D & DOWN()
The (0,-1,0,0) vector.
bool operator<(const Point4D &p) const
Checks whether a point is "less then" other.
static double delta
Maximum difference for equality.
bool AlmostEqual(const Point4D &v) const
Check if vector is almost equal to some other vector.
bool ZThenYLess(const Point4D &p) const
static const Point4D & ORIGIN()
The (0,0,0,1) point.
void SetXYZW(double x, double y, double z, double w)
double DotProduct(const Point4D &p) const
Computes the dot product between "this" and "p".
Abstract class that provides a common base for point and vector classes.
const double * VetXYZW() const
Returns vertex coordinates as a pointer to 4 doubles.
bool YThenXLess(const Point4D &p) const
void operator+=(const Point4D &vector)
Point4D operator*(double escalar) const
Point4D()
Creates the (0,0,0,1) point.
void SetXY(double x, double y)
bool WeightedGreater(const Point4D &p) const
double GenericAngleTo(const Point4D &p) const