|
Developer Documentation |
|
Centre for Vision, Speech & Signal Processing |
|
PUBLIC |
Point4dC::Point4dC(istream &)
Point4dC::Point4dC(void)
Point4dC::Point4dC(CoordT,CoordT,CoordT,CoordT)
Point4dC::Point4dC(const Point4dC &)
Point4dC::operator=(const Point4dC &)
Point4dC::N(void) const
Point4dC::operator[](IndexT) const
Point4dC::operator[](IndexT)
Point4dC::X(void)
Point4dC::Y(void)
Point4dC::Z(void)
Point4dC::T(void)
Point4dC::X(void) const
Point4dC::Y(void) const
Point4dC::Z(void) const
Point4dC::T(void) const
Point4dC::Point4d(void) const
Point4dC::Point4d(void)
Point4dC::operator==(const Point4dC &) const
Point4dC::operator!=(const Point4dC &) const
Point4dC::operator>(const Point4dC &) const
Point4dC::OneBigger(const Point4dC &) const
Point4dC::SetZero(void)
Point4dC::Set(const Point4dC &)
Point4dC::Set(const CoordT,const CoordT,const CoordT,const CoordT)
Point4dC::SetMinimum(const Point4dC &)
Point4dC::SetMaximum(const Point4dC &)
Point4dC::MinIndex(void) const
Point4dC::MaxIndex(void) const
Point4dC::AbsMinIndex(void) const
Point4dC::AbsMaxIndex(void) const
Point4dC::Min(void) const
Point4dC::Max(void) const
Point4dC::operator+=(const Point4dC &)
Point4dC::operator-=(const Point4dC &)
Point4dC::operator*=(const Point4dC &)
Point4dC::operator/=(const Point4dC &)
Point4dC::operator*=(const RealT)
Point4dC::operator/=(const RealT)
Point4dC::operator+(const Point4dC &) const
Point4dC::operator-(const Point4dC &) const
Point4dC::operator*(const Point4dC &) const
Point4dC::operator/(const Point4dC &) const
Point4dC::operator*(const RealT) const
Point4dC::operator/(const RealT) const
Point4dC::operator+(const Vector4dC &) const
Point4dC::operator&(const Point4dC &) const
Point4dC::Translation(const Point4dC &) const
Point4dC::SqrEuclidDistance(const Point4dC &) const
Point4dC::EuclidDistance(const Point4dC &) const
Point4dC::EDistanceFromOrigin(void) const
Point4dC::CosAngle(const Point4dC &,const Point4dC &) const
Point4dC::Angle(const Point4dC &,const Point4dC &) const
Point4dC::AngleOrigin(const Point4dC &) const
Point4dC::MidPoint(const Point4dC &) const
Point4dC::Center(const Point4dC &) const
Point4dC::AbsDistance(const Point4dC &) const
Point4dC::MahalanobisDistance(const Point4dC &,const Matrix4d4C &)
Point4dC::Sum(void) const
Point4dC::SumAbs(void) const
Point4dC::Sqrt(void)
Point4dC::Abs(void)
Point4dC::Normalize(void)
Point4dC::NormalizeSum(void)
Point4dC::OrthoProjectionInto(const Line4dPVC &) const
Point4dC::OrthoProjectionInto(const PlanePVV4dC &) const
Point4dC::FixAlmostZero(void)
Point4dC::SetZeroDistance(RealT)
Point4dC::IsAlmostZero(RealT)
Point4dC::SetRelZero(RealT)
Point4dC::IsRelZero(RealT)
Point4dC::RAbs(RealT)
Point4dC::operator*(RealT,const Point4dC &)
Point4dC::operator/(RealT,const Point4dC &)
Point4dC::operator<<(ostream &,const Point4dC &)
Point4dC::operator>>(istream &,Point4dC &)
Point4dC::Set(const Point4dC::CoordT,const Point4dC::CoordT,const Point4dC::CoordT,const Point4dC::CoordT)
|
Comments:
The class Point4dC represents a geometrical entity point in 4 dimensional
Euclidian space. A point is represented by a quadruple of coordinates.
The index of a coordinate can be 0 for x, 1 for y, 2 for z, 3 for t.
Derived Classes:
Enumerated types:
- enum anon_enum?16 { dim = 4 } ;
-
number of coordinates
Typedefs:
- typedef StdTypeC::RealT CoordT;
-
An coordinate.
- typedef StdTypeC::RealT DistanceT;
-
Distance of points.
- typedef StdTypeC::RealT AngleT;
-
An angle in rad.
- typedef StdTypeC::RealT CosAngleT;
-
The cosinus of an angle of three points.
Variables:
- const RealT defRelZero;
-
default value of 'relZero'
- RealT relZero;
-
small relative error
- const RealT defZeroDistance;
-
default value of 'zeroDistance'
- RealT zeroDistance;
-
distance of 2 points smaller than
'zeroDistance' is treated as zero.
- RealT sqrZeroDistance;
-
square of 'zeroDistance'.
- CoordT a[];
-
Methods:
- Point4dC(istream & inS)
-
Reads and creates the point from the input stream.
- Point4dC()
-
Creates the point (0.0, 0.0, 0.0, 0.0).
- Point4dC(CoordT xCoor,CoordT yCoor,CoordT zCoor,CoordT tCoor)
-
Creates the point (xCoor, yCoor, zCoor, tCoor).
- Point4dC(const Point4dC & point)
-
Copy constructor.
- const Point4dC & operator=(const Point4dC & p)
-
Assigment.
Access to the object
--------------------
- IndexT N() const
-
Returns the number of coordinates.
- const CoordT & operator[](IndexT i) const
-
Access to the i-th constant coordinate.
- CoordT & operator[](IndexT i)
-
Access to the i-th coordinate.
- CoordT & X()
-
Access to the first coordinate.
- CoordT & Y()
-
Access to the second coordinate.
- CoordT & Z()
-
Access to the third coordinate.
- CoordT & T()
-
Access to the fourth coordinate.
- const CoordT & X() const
-
Access to the first constant coordinate.
- const CoordT & Y() const
-
Access to the second constant coordinate.
- const CoordT & Z() const
-
Access to the third constant coordinate.
- const CoordT & T() const
-
Access to the fourth constant coordinate.
- const Point4dC & Point4d() const
-
Access to the constant point.
- Point4dC & Point4d()
-
Access to the point.
Logical operators with points
-----------------------------
- BooleanT operator==(const Point4dC & point) const
-
Returns TRUE if 2 points are the same point. Two points
are claimed to be same iff their relative distance error
is small (under 'relZero' threshold). If both points
are close to the origin of the coordinate system, their
absolute distance error is compared to 'zeroDistance'.
- BooleanT operator!=(const Point4dC & point) const
-
Returns TRUE if 2 points are different. 2 points are different
iff they are not equal in the sense of the operator '=='.
- BooleanT operator>(const Point4dC & point) const
-
Returns TRUE if all coordinates are bigger then the coordinates
of the point.
- BooleanT OneBigger(const Point4dC & point) const
-
Returns TRUE if one coordinate is bigger then the related one
of the point.
Setting of the point
--------------------
- Point4dC & SetZero()
-
Sets all coordinates to be 0.0.
- void Set(const Point4dC & point)
-
Sets coordinates according to the values of 'point'.
- void Set(const CoordT xCoor,const CoordT yCoor,const CoordT zCoor,const CoordT tCoor)
-
Sets the point to the new coordinates.
- Point4dC & SetMinimum(const Point4dC & point)
-
Sets the point coordinates to minimal value from both points.
- Point4dC & SetMaximum(const Point4dC & point)
-
Sets the point coordinates to maximal value from both points.
Information about extrems
-------------------------
- IndexT MinIndex() const
-
Returns the index of the minimum value.
- IndexT MaxIndex() const
-
Returns the index of the maximum value.
- IndexT AbsMinIndex() const
-
Returns the index of the minimum coordinate in absolute value.
- IndexT AbsMaxIndex() const
-
Returns the index of the maximum coordinate in absolute value.
- CoordT Min() const
-
Returns the minimum coordinate.
- CoordT Max() const
-
Returns the maximum coordinate.
Arithmetical operations
-----------------------
- const Point4dC & operator+=(const Point4dC & point)
-
Adds the point.
- const Point4dC & operator-=(const Point4dC & point)
-
Subtracts the point.
- const Point4dC & operator*=(const Point4dC & point)
-
Multiplies items by point items.
- const Point4dC & operator/=(const Point4dC & point)
-
Divides items by point items.
- const Point4dC & operator*=(const RealT alpha)
-
Multiplies items by 'alpha'.
- const Point4dC & operator/=(const RealT alpha)
-
Divides items by 'alpha'.
- Point4dC operator+(const Point4dC & v) const
-
Adds 2 points.
- Vector4dC operator-(const Point4dC & v) const
-
Returns the difference between 2 points.
- Point4dC operator*(const Point4dC & v) const
-
Returns the points which coordinates are results of multiplication
of this point and 'v' points item by item.
- Point4dC operator/(const Point4dC & v) const
-
Returns the points which coordinates are results of division
of this point and 'v' points item by item.
- Point4dC operator*(const RealT alpha) const
-
Returns the points which coordinates are these coordinates
multiplied by 'alpha'.
- Point4dC operator/(const RealT alpha) const
-
Returns the points which coordinates are these coordinates
divided by 'alpha'.
- Point4dC operator+(const Vector4dC & v) const
-
Returns the point = 'this point' + v;
- RealT operator&(const Point4dC & p) const
-
Returns the sum X()*p.X() + Y()*p.Y() + Z()*p.Z().
In 3 dimensional Euclidian vector space the result is
equivalent to dot product of 2 vectors.
Euclidian geometry
------------------
- Point4dC Translation(const Point4dC & newOrigin) const
-
Returns the point with coordinates related to the new origin
'newOrigin'.
- RealT SqrEuclidDistance(const Point4dC & point) const
-
Returns the square of Euclid distance between this point
and 'point'.
- RealT EuclidDistance(const Point4dC & point) const
-
Returns the Euclid distance between this point and point.
- RealT EDistanceFromOrigin() const
-
Returns the Euclid distance of this point from the coordinate origin.
- CosAngleT CosAngle(const Point4dC & m,const Point4dC & b) const
-
Returns the cosinus of the angle (this point, m, b).
- AngleT Angle(const Point4dC & m,const Point4dC & b) const
-
Returns the angle (this point, m, b). The angle range in rad is 0 to PI
and the angle is not oriented.
- AngleT AngleOrigin(const Point4dC & p) const
-
Returns the angle in rad between points 'this point', (0,0,0), and
the point 'p'. The angle range is 0 to PI
and the angle is not oriented.
- Point4dC MidPoint(const Point4dC & p) const
-
Returns the point which is in the middle of this point
and the point 'p'.
- Point4dC Center(const Point4dC & point) const
-
Returns the point which is in the middle of both points.
Useful functions with points
----------------------------
- RealT AbsDistance(const Point4dC & point) const
-
Returns the block distance between this point and 'point'.
- RealT MahalanobisDistance(const Point4dC & mean,const Matrix4d4C & invCov)
-
Returns the Mahalanobis distance from the 'mean'. The 'invCov'
is the inversion of the covariance matrix.
- CoordT Sum() const
-
Returns the sum of coordinates.
- CoordT SumAbs() const
-
Returns the sum of absolute value of coordinates.
- Point4dC & Sqrt()
-
Changes all coordinates into their square root values.
- Point4dC & Abs()
-
Changes all coordinates into their absolute values.
- Point4dC & Normalize()
-
Scales the coordinates of the point to have the distance
from the origin equal to 1. The point is supposed to be different
from the origin.
- Point4dC & NormalizeSum()
-
Scales the coordinates of the point to have unit sum.
The point is supposed to be different from the origin.
Relationship with a line
------------------------
- Point4dC OrthoProjectionInto(const Line4dPVC & l) const
-
Returns the orthogonal projection of the point into the line 'l'.
Relationship with a plane
-------------------------
- Point4dC OrthoProjectionInto(const PlanePVV4dC & plane) const
-
Returnss the orthogonal projection of the point into the plane.
Computational precision
-----------------------
- void FixAlmostZero()
-
If the absolute value of a coordinate is smaller than zoroDistance
the function sets the coordinate to be zero.
- RealT SetZeroDistance(RealT zero)
-
Sets the precision of test of zero distance of points.
The function returns the previous value.
- BooleanT IsAlmostZero(RealT a)
-
Returns TRUE if 'a' is smaller or equal to zeroDistance.
- RealT SetRelZero(RealT zero)
-
Sets the precision of the relative error test.
The function returns the previous value.
- BooleanT IsRelZero(RealT a)
-
Returns TRUE if 'a' is smaller than or equal to 'relZero'.
- RealT RAbs(RealT t)
-
Returns the absolute value of the parameter t.
- Point4dC operator*(RealT alpha,const Point4dC & point)
-
- Point4dC operator/(RealT alpha,const Point4dC & point)
-
- ostream & operator<<(ostream & outS,const Point4dC & point)
-
- istream & operator>>(istream & inS,Point4dC & point)
-
- void Set(const Point4dC::CoordT xCoor,const Point4dC::CoordT yCoor,const Point4dC::CoordT zCoor,const Point4dC::CoordT tCoor)
-
|
Programmer:Radek Marik, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001
|