24 #include "hom_point.h"
25 #include "hom_vector.h"
52 :
HomCoord(coord.x, coord.y, 0.0, 1.0)
61 :
HomCoord(coord.x, coord.y, coord.z, 1.0)
73 printf(
"HomPoint(const HomCoord& h): The forth component of a "
74 "homogeneous point has to be 1.0 but is %f\n",
w());
75 throw std::exception();
90 float d = sqrt(
x() *
x() +
y() *
y() +
z() *
z() );
Cartesian coordinates (2D).
virtual float y() const
RO-getter for y.
HomPoint & move(float dx, float dy, float dz)
Move the point by the given coordiantes.
HomVector operator-(const HomPoint &p) const
Compute the vector between two points.
HomPoint & move_to(float x, float y, float z)
Move the point to the given coordiantes.
virtual float z() const
RO-getter for z.
virtual float w() const
RO-getter for w.
Base class for homogeneous primitives (vector and point).
Cartesian coordinates (3D).
float distance() const
Obtain distance from the point to the origin.
virtual ~HomPoint()
Destructor.
virtual float x() const
RO-getter for x.
HomPoint(float x=0.0, float y=0.0, float z=0.0)
Constructor.