Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
fawkes::HomPoint Class Reference

A homogeneous point. More...

#include <geometry/hom_point.h>

Inheritance diagram for fawkes::HomPoint:

List of all members.

Public Member Functions

 HomPoint (float x=0.0, float y=0.0, float z=0.0)
 Constructor.
 HomPoint (cart_coord_2d_t coord)
 Constructor.
 HomPoint (cart_coord_3d_t coord)
 Constructor.
 HomPoint (const HomCoord &h)
 Constructor.
virtual ~HomPoint ()
 Destructor.
float distance () const
 Obtain distance from the point to the origin.
HomPointmove (float dx, float dy, float dz)
 Move the point by the given coordiantes.
HomPointmove_to (float x, float y, float z)
 Move the point to the given coordiantes.
HomVector operator- (const HomPoint &p) const
 Compute the vector between two points.
- 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 HomCoordx (float x)
 Setter function for x.
virtual float y () const
 RO-getter for y.
virtual float & y ()
 RW-getter for y.
virtual HomCoordy (float y)
 Setter function for y.
virtual float z () const
 RO-getter for z.
virtual float & z ()
 RW-getter for z.
virtual HomCoordz (float z)
 Setter function for z.
virtual float w () const
 RO-getter for w.
virtual float & w ()
 RW-getter for w.
virtual HomCoordw (float w)
 Setter function for w.
virtual HomCoordrotate_x (float rad)
 Convenience function to rotate the HomCoord around the x-axis.
virtual HomCoordrotate_y (float rad)
 Convenience function to rotate the HomCoord around the y-axis.
virtual HomCoordrotate_z (float rad)
 Convenience function to rotate the HomCoord around the z-axis.
HomCoordtransform (const HomTransform &t)
 Transform the vector with the given transform.
virtual HomCoord operator- (const HomCoord &h) const
 Subtraction operator.
virtual HomCoordoperator-= (const HomCoord &h)
 Substraction-assignment operator.
virtual HomCoord operator+ (const HomCoord &h) const
 Addition operator.
virtual HomCoordoperator+= (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 HomCoordoperator*= (const float s)
 Multiplication-assignment operator.
virtual HomCoordoperator= (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
Vectorm_vector
 The internal data container.

Detailed Description

A homogeneous point.

Author:
Daniel Beck

Definition at line 33 of file hom_point.h.


Constructor & Destructor Documentation

fawkes::HomPoint::HomPoint ( float  x = 0.0,
float  y = 0.0,
float  z = 0.0 
)

Constructor.

Parameters:
xthe x-coordinate
ythe y-coordinate
zthe 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.

Parameters:
coorda 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.

Parameters:
coorda structure for a 3-dimensional coordinate

Definition at line 60 of file hom_point.cpp.

fawkes::HomPoint::HomPoint ( const HomCoord h)

Constructor.

Parameters:
ha HomCoord

Definition at line 68 of file hom_point.cpp.

References fawkes::HomCoord::w().

fawkes::HomPoint::~HomPoint ( )
virtual

Destructor.

Definition at line 80 of file hom_point.cpp.


Member Function Documentation

float fawkes::HomPoint::distance ( ) const

Obtain distance from the point to the origin.

Returns:
distance to 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.

Parameters:
dxx-offset
dyy-offset
dzz-offset
Returns:
reference to the moved point

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.

Parameters:
xnew x-coordinate
ynew y-coordinate
znew z-coordinate
Returns:
reference to the moved point

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().

HomVector fawkes::HomPoint::operator- ( const HomPoint p) const

Compute the vector between two points.

Parameters:
pthe other point
Returns:
the vector between the two points

Definition at line 131 of file hom_point.cpp.

References fawkes::HomCoord::x(), fawkes::HomCoord::y(), and fawkes::HomCoord::z().


The documentation for this class was generated from the following files: