Fawkes API  Fawkes Development Version
fawkes::HomPose2d Class Reference

A 2-dimensional pose, i.e. More...

#include <>>

Inheritance diagram for fawkes::HomPose2d:

List of all members.

Public Member Functions

 HomPose2d (const HomPoint &pos, const HomVector &orientation)
 Constructor.
 HomPose2d (float x=0.0, float y=0.0, float yaw=0.0)
 Constructor.
 HomPose2d (const HomPose2d &p)
 Copy constructor.
 ~HomPose2d ()
 Destructor.
const HomPose2doperator= (const HomPose2d &p)
 Assignment operator.
float x () const
 Get the x-coordinate of the position.
void x (float x)
 Set the x-coordinate of the position.
float y () const
 Get the y-coordinate of the position.
void y (float y)
 Set the y-coordinate of the position.
float yaw () const
 Get the angle of the current orientation [0...2pi].
void yaw (float yaw)
 Set the angle of the orientation.
const HomPointposition () const
 Get the position.
const HomVectororientation () const
 Get the orientation vector.
void set_position (const HomPoint &p)
 Set the positional part of the pose.

Protected Member Functions

void register_primitives ()
 Here, a derived class should register its primitives (HomPoints and HomVectors) by calling add_primitive for each of those.
void post_transform ()
 This method is called after the primitives are transformed.

Detailed Description

A 2-dimensional pose, i.e.

a combination of position and orientation.

Author:
Daniel Beck

Constructor & Destructor Documentation

fawkes::HomPose2d::HomPose2d ( const HomPoint position,
const HomVector orientation 
)

Constructor.

Parameters:
positionthe posititon
orientationthe orientation

Definition at line 41 of file hom_pose_2d.cpp.

References fawkes::HomVector::unit(), fawkes::HomCoord::y(), fawkes::HomCoord::x(), and register_primitives().

fawkes::HomPose2d::HomPose2d ( float  x = 0.0,
float  y = 0.0,
float  yaw = 0.0 
)

Constructor.

Parameters:
xthe x-coordinate of the position
ythe y-coordinate of the position
yawthe angle of the orientation wrt. the current frame

Definition at line 57 of file hom_pose_2d.cpp.

References fawkes::HomCoord::rotate_z(), yaw(), and register_primitives().

fawkes::HomPose2d::HomPose2d ( const HomPose2d p)

Copy constructor.

Parameters:
pthe other pose

Definition at line 71 of file hom_pose_2d.cpp.

References register_primitives().

fawkes::HomPose2d::~HomPose2d ( )

Destructor.

Definition at line 82 of file hom_pose_2d.cpp.


Member Function Documentation

const HomPose2d & fawkes::HomPose2d::operator= ( const HomPose2d p)

Assignment operator.

Parameters:
pthe rhs pose
Returns:
reference to the assigned pose

Definition at line 93 of file hom_pose_2d.cpp.

const HomVector & fawkes::HomPose2d::orientation ( ) const

Get the orientation vector.

Returns:
the orientation vector

Definition at line 189 of file hom_pose_2d.cpp.

const HomPoint & fawkes::HomPose2d::position ( ) const

Get the position.

Returns:
the position

Definition at line 171 of file hom_pose_2d.cpp.

void fawkes::HomPose2d::post_transform ( ) [protected, virtual]

This method is called after the primitives are transformed.

Any additional updates that need to be done should be done here.

Implements fawkes::Transformable.

Definition at line 202 of file hom_pose_2d.cpp.

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

void fawkes::HomPose2d::register_primitives ( ) [protected, virtual]

Here, a derived class should register its primitives (HomPoints and HomVectors) by calling add_primitive for each of those.

Implements fawkes::Transformable.

Definition at line 195 of file hom_pose_2d.cpp.

References fawkes::Transformable::add_primitive().

Referenced by HomPose2d().

void fawkes::HomPose2d::set_position ( const HomPoint p)

Set the positional part of the pose.

Parameters:
pthe new position

Definition at line 180 of file hom_pose_2d.cpp.

float fawkes::HomPose2d::x ( ) const

Get the x-coordinate of the position.

Returns:
the x-coordinate of the position.

Definition at line 107 of file hom_pose_2d.cpp.

References fawkes::HomCoord::x().

Referenced by fawkes::WorldInfoDataContainer::get_ball_pos_global(), and FieldView::on_expose_event().

void fawkes::HomPose2d::x ( float  x)

Set the x-coordinate of the position.

Parameters:
xthe new x-coordinate of the position.

Definition at line 116 of file hom_pose_2d.cpp.

References fawkes::HomCoord::x().

float fawkes::HomPose2d::y ( ) const

Get the y-coordinate of the position.

Returns:
the y-coordinate of the position.

Definition at line 125 of file hom_pose_2d.cpp.

References fawkes::HomCoord::y().

Referenced by fawkes::WorldInfoDataContainer::get_ball_pos_global(), and FieldView::on_expose_event().

void fawkes::HomPose2d::y ( float  y)

Set the y-coordinate of the position.

Parameters:
ythe new x-coordinate of the position.

Definition at line 134 of file hom_pose_2d.cpp.

References fawkes::HomCoord::y().

float fawkes::HomPose2d::yaw ( ) const

Get the angle of the current orientation [0...2pi].

Returns:
the angle of the current orientation

Definition at line 143 of file hom_pose_2d.cpp.

Referenced by HomPose2d(), yaw(), fawkes::WorldInfoDataContainer::get_ball_pos_global(), and FieldView::on_expose_event().

void fawkes::HomPose2d::yaw ( float  yaw)

Set the angle of the orientation.

Parameters:
yawthe new angle of the orientation

Definition at line 152 of file hom_pose_2d.cpp.

References yaw(), and fawkes::HomCoord::rotate_z().


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