Fawkes API
Fawkes Development Version
|
A homogeneous point. More...
#include <geometry/hom_point.h>
Public Member Functions | |
HomPoint (float x=0.0, float y=0.0, float z=0.0) | |
Constructor. More... | |
HomPoint (cart_coord_2d_t coord) | |
Constructor. More... | |
HomPoint (cart_coord_3d_t coord) | |
Constructor. More... | |
HomPoint (const HomCoord &h) | |
Constructor. More... | |
virtual | ~HomPoint () |
Destructor. More... | |
float | distance () const |
Obtain distance from the point to the origin. More... | |
HomPoint & | move (float dx, float dy, float dz) |
Move the point by the given coordiantes. More... | |
HomPoint & | move_to (float x, float y, float z) |
Move the point to the given coordiantes. More... | |
HomVector | operator- (const HomPoint &p) const |
Compute the vector between two points. More... | |
![]() | |
HomCoord (const HomCoord &c) | |
Copy constructor. More... | |
virtual | ~HomCoord () |
Destructor. More... | |
virtual float | x () const |
RO-getter for x. More... | |
virtual float & | x () |
RW-getter for x. More... | |
virtual HomCoord & | x (float x) |
Setter function for x. More... | |
virtual float | y () const |
RO-getter for y. More... | |
virtual float & | y () |
RW-getter for y. More... | |
virtual HomCoord & | y (float y) |
Setter function for y. More... | |
virtual float | z () const |
RO-getter for z. More... | |
virtual float & | z () |
RW-getter for z. More... | |
virtual HomCoord & | z (float z) |
Setter function for z. More... | |
virtual float | w () const |
RO-getter for w. More... | |
virtual float & | w () |
RW-getter for w. More... | |
virtual HomCoord & | w (float w) |
Setter function for w. More... | |
virtual HomCoord & | rotate_x (float rad) |
Convenience function to rotate the HomCoord around the x-axis. More... | |
virtual HomCoord & | rotate_y (float rad) |
Convenience function to rotate the HomCoord around the y-axis. More... | |
virtual HomCoord & | rotate_z (float rad) |
Convenience function to rotate the HomCoord around the z-axis. More... | |
HomCoord & | transform (const HomTransform &t) |
Transform the vector with the given transform. More... | |
virtual HomCoord | operator- (const HomCoord &h) const |
Subtraction operator. More... | |
virtual HomCoord & | operator-= (const HomCoord &h) |
Substraction-assignment operator. More... | |
virtual HomCoord | operator+ (const HomCoord &h) const |
Addition operator. More... | |
virtual HomCoord & | operator+= (const HomCoord &h) |
Addition-assignment operator. More... | |
virtual float | operator* (const HomCoord &h) const |
Calculates the dot product of two coords. More... | |
virtual HomCoord | operator* (const float s) const |
Mulitplication operator. More... | |
virtual HomCoord & | operator*= (const float s) |
Multiplication-assignment operator. More... | |
virtual HomCoord & | operator= (const HomCoord &h) |
Assignment operator. More... | |
virtual bool | operator== (const HomCoord &h) const |
Comparison operator. More... | |
virtual bool | operator!= (const HomCoord &h) const |
Inequality operator. More... | |
![]() | |
Printable () | |
Constructor. More... | |
virtual | ~Printable () |
Destructor. More... | |
Additional Inherited Members | |
![]() | |
HomCoord (float x=0.0, float y=0.0, float z=0.0, float w=0.0) | |
Constructor. More... | |
HomCoord (const Vector &v) | |
Constructor. More... | |
virtual std::ostream & | print (std::ostream &stream) const |
Appends the components of the HomCoord to the ostream. More... | |
![]() | |
Vector * | m_vector |
The internal data container. More... | |
A homogeneous point.
Definition at line 33 of file hom_point.h.
fawkes::HomPoint::HomPoint | ( | float | x = 0.0 , |
float | y = 0.0 , |
||
float | z = 0.0 |
||
) |
Constructor.
x | the x-coordinate |
y | the y-coordinate |
z | the z-coordinate |
Definition at line 42 of file hom_point.cpp.
fawkes::HomPoint::HomPoint | ( | cart_coord_2d_t | coord | ) |
Constructor.
Constructs a 2-dimensional vector from a cart_coord_2d_t struct.
coord | a structure for a 2-dimensional coordinate |
Definition at line 51 of file hom_point.cpp.
fawkes::HomPoint::HomPoint | ( | cart_coord_3d_t | coord | ) |
Constructor.
Constructs a 3-dimensional vector from a cart_coord_3d_t struct.
coord | a structure for a 3-dimensional coordinate |
Definition at line 60 of file hom_point.cpp.
fawkes::HomPoint::HomPoint | ( | const HomCoord & | h | ) |
Constructor.
h | a HomCoord |
Definition at line 68 of file hom_point.cpp.
References fawkes::HomCoord::w().
|
virtual |
Destructor.
Definition at line 80 of file hom_point.cpp.
float fawkes::HomPoint::distance | ( | ) | const |
Obtain distance from the point to the origin.
Definition at line 88 of file hom_point.cpp.
References fawkes::HomCoord::x(), fawkes::HomCoord::y(), and fawkes::HomCoord::z().
HomPoint & fawkes::HomPoint::move | ( | float | dx, |
float | dy, | ||
float | dz | ||
) |
Move the point by the given coordiantes.
dx | x-offset |
dy | y-offset |
dz | z-offset |
Definition at line 101 of file hom_point.cpp.
References fawkes::HomCoord::x(), fawkes::HomCoord::y(), and fawkes::HomCoord::z().
HomPoint & fawkes::HomPoint::move_to | ( | float | x, |
float | y, | ||
float | z | ||
) |
Move the point to the given coordiantes.
x | new x-coordinate |
y | new y-coordinate |
z | new z-coordinate |
Definition at line 117 of file hom_point.cpp.
References fawkes::HomCoord::x(), fawkes::HomCoord::y(), and fawkes::HomCoord::z().
Referenced by fawkes::HomVectorDrawer::draw().
Compute the vector between two points.
p | the other point |
Definition at line 131 of file hom_point.cpp.
References fawkes::HomCoord::x(), fawkes::HomCoord::y(), and fawkes::HomCoord::z().