|
Fawkes API
Fawkes Development Version
|
A homogeneous vector. More...
#include <geometry/hom_vector.h>

Public Member Functions | |
| HomVector (float x=0, float y=0, float z=0) | |
| Constructor. | |
| HomVector (const HomCoord &h) | |
| Constructor. | |
| virtual | ~HomVector () |
| Destructor. | |
| float | length () const |
| Calculates the length of the vector. | |
| float | length_square () const |
| Calculates the squared length length of the vector (faster than length. | |
| HomVector & | set_length (float length) |
| Scales the vector such that it has the given length. | |
| HomVector & | unit () |
| Brings the vector to unit-length. | |
| float | angle_xy (const HomVector &h) const |
| Compute the angle between two vectors. | |
Public Member Functions inherited from fawkes::HomCoord | |
| HomCoord (const HomCoord &c) | |
| Copy constructor. | |
| virtual | ~HomCoord () |
| Destructor. | |
| virtual float | x () const |
| RO-getter for x. | |
| virtual float & | x () |
| RW-getter for x. | |
| virtual HomCoord & | x (float x) |
| Setter function for x. | |
| virtual float | y () const |
| RO-getter for y. | |
| virtual float & | y () |
| RW-getter for y. | |
| virtual HomCoord & | y (float y) |
| Setter function for y. | |
| virtual float | z () const |
| RO-getter for z. | |
| virtual float & | z () |
| RW-getter for z. | |
| virtual HomCoord & | z (float z) |
| Setter function for z. | |
| virtual float | w () const |
| RO-getter for w. | |
| virtual float & | w () |
| RW-getter for w. | |
| virtual HomCoord & | w (float w) |
| Setter function for w. | |
| virtual HomCoord & | rotate_x (float rad) |
| Convenience function to rotate the HomCoord around the x-axis. | |
| virtual HomCoord & | rotate_y (float rad) |
| Convenience function to rotate the HomCoord around the y-axis. | |
| virtual HomCoord & | rotate_z (float rad) |
| Convenience function to rotate the HomCoord around the z-axis. | |
| HomCoord & | transform (const HomTransform &t) |
| Transform the vector with the given transform. | |
| virtual HomCoord | operator- (const HomCoord &h) const |
| Subtraction operator. | |
| virtual HomCoord & | operator-= (const HomCoord &h) |
| Substraction-assignment operator. | |
| virtual HomCoord | operator+ (const HomCoord &h) const |
| Addition operator. | |
| virtual HomCoord & | operator+= (const HomCoord &h) |
| Addition-assignment operator. | |
| virtual float | operator* (const HomCoord &h) const |
| Calculates the dot product of two coords. | |
| virtual HomCoord | operator* (const float s) const |
| Mulitplication operator. | |
| virtual HomCoord & | operator*= (const float s) |
| Multiplication-assignment operator. | |
| virtual HomCoord & | operator= (const HomCoord &h) |
| Assignment operator. | |
| virtual bool | operator== (const HomCoord &h) const |
| Comparison operator. | |
| virtual bool | operator!= (const HomCoord &h) const |
| Inequality operator. | |
Public Member Functions inherited from fawkes::Printable | |
| Printable () | |
| Constructor. | |
| virtual | ~Printable () |
| Destructor. | |
Additional Inherited Members | |
Protected Member Functions inherited from fawkes::HomCoord | |
| HomCoord (float x=0.0, float y=0.0, float z=0.0, float w=0.0) | |
| Constructor. | |
| HomCoord (const Vector &v) | |
| Constructor. | |
| virtual std::ostream & | print (std::ostream &stream) const |
| Appends the components of the HomCoord to the ostream. | |
Protected Attributes inherited from fawkes::HomCoord | |
| Vector * | m_vector |
| The internal data container. | |
A homogeneous vector.
Definition at line 31 of file hom_vector.h.
| fawkes::HomVector::HomVector | ( | float | x = 0, |
| float | y = 0, |
||
| float | z = 0 |
||
| ) |
Constructor.
| x | the x-coordinate |
| y | the y-coordinate |
| z | the z-coordinate |
Definition at line 41 of file hom_vector.cpp.
| fawkes::HomVector::HomVector | ( | const HomCoord & | h | ) |
Constructor.
| h | a HomCoord |
Definition at line 49 of file hom_vector.cpp.
References fawkes::HomCoord::w().
|
virtual |
Destructor.
Definition at line 61 of file hom_vector.cpp.
| float fawkes::HomVector::angle_xy | ( | const HomVector & | v | ) | const |
Compute the angle between two vectors.
| v | the other vector |
Definition at line 117 of file hom_vector.cpp.
References length(), fawkes::HomCoord::x(), and fawkes::HomCoord::y().
| float fawkes::HomVector::length | ( | ) | const |
Calculates the length of the vector.
Definition at line 69 of file hom_vector.cpp.
References length_square().
Referenced by angle_xy(), fawkes::LineSegment::length(), and set_length().
| float fawkes::HomVector::length_square | ( | ) | const |
Calculates the squared length length of the vector (faster than length.
Definition at line 78 of file hom_vector.cpp.
References fawkes::HomCoord::x(), fawkes::HomCoord::y(), and fawkes::HomCoord::z().
Referenced by length().
| HomVector & fawkes::HomVector::set_length | ( | float | length | ) |
Scales the vector such that it has the given length.
| length | the new length |
Definition at line 99 of file hom_vector.cpp.
References length(), fawkes::HomCoord::x(), fawkes::HomCoord::y(), and fawkes::HomCoord::z().
Referenced by fawkes::HomPolar::r(), and unit().
| HomVector & fawkes::HomVector::unit | ( | ) |
Brings the vector to unit-length.
Definition at line 87 of file hom_vector.cpp.
References set_length().
Referenced by fawkes::HomPose2d::HomPose2d().