24 #include <geometry/hom_coord.h> 25 #include <geometry/hom_transform.h> 26 #include <geometry/vector.h> 252 float w = result.w();
253 result.w() = (w > 1.0) ? 1.0 :
w;
266 this->
w() = (w > 1.0) ? 1.0 :
w;
279 float w = result.w();
280 result.w() = (w > 1.0) ? 1.0 :
w;
293 this->
w() = (w > 1.0) ? 1.0 :
w;
317 return x() * h.
x() +
y() * h.
y() +
z() * h.
z();
329 result.
x() =
x() * s;
330 result.
y() =
y() * s;
331 result.
z() =
z() * s;
379 return stream <<
"[" <<
x() <<
", " <<
y() <<
", " <<
z() <<
", " <<
w() <<
"]T";
390 (*m_vector) = m * (*m_vector);
virtual float y() const
RO-getter for y.
virtual HomCoord & rotate_x(float rad)
Convenience function to rotate the HomCoord around the x-axis.
virtual HomCoord & operator=(const HomCoord &h)
Assignment operator.
Fawkes library namespace.
virtual bool operator!=(const HomCoord &h) const
Inequality operator.
virtual bool operator==(const HomCoord &h) const
Comparison operator.
Vector * m_vector
The internal data container.
float get(unsigned int d) const
Get a certain element.
virtual ~HomCoord()
Destructor.
virtual HomCoord & rotate_y(float rad)
Convenience function to rotate the HomCoord around the y-axis.
virtual HomCoord operator-(const HomCoord &h) const
Subtraction operator.
virtual HomCoord & operator-=(const HomCoord &h)
Substraction-assignment operator.
virtual float z() const
RO-getter for z.
virtual float w() const
RO-getter for w.
Base class for homogeneous primitives (vector and point).
HomCoord(const HomCoord &c)
Copy constructor.
virtual HomCoord & operator+=(const HomCoord &h)
Addition-assignment operator.
HomCoord & transform(const HomTransform &t)
Transform the vector with the given transform.
virtual float operator*(const HomCoord &h) const
Calculates the dot product of two coords.
virtual HomCoord & rotate_z(float rad)
Convenience function to rotate the HomCoord around the z-axis.
virtual std::ostream & print(std::ostream &stream) const
Appends the components of the HomCoord to the ostream.
virtual HomCoord operator+(const HomCoord &h) const
Addition operator.
virtual HomCoord & operator*=(const float s)
Multiplication-assignment operator.
virtual float x() const
RO-getter for x.
void set(unsigned int d, float v)
Set a certain element.