Orxonox: orxonox::WaypointController Class Reference

# orxonox::WaypointController Class Reference

`#include <src/orxonox/objects/controllers/WaypointController.h>`

Inheritance diagram for orxonox::WaypointController:

List of all members.

## Public Member Functions

void | addWaypoint (WorldEntity *waypoint)
float | getAccuracy () const
WorldEntity * | getWaypoint (unsigned int index) const
void | setAccuracy (float accuracy)
virtual void | tick (float dt)
| Gets called every frame.
| WaypointController (BaseObject *creator)
virtual void | XMLPort (Element &xmlelement, XMLPort::Mode mode)
| XML loading and saving.
virtual | ~WaypointController ()

## Protected Attributes

size_t | currentWaypoint_
float | squaredaccuracy_
std::vector< WorldEntity * > | waypoints_

## Constructor & Destructor Documentation

orxonox::WaypointController::WaypointController | ( | BaseObject * | creator | ) |

References currentWaypoint_, RegisterObject, and setAccuracy().

orxonox::WaypointController::~WaypointController | ( |  | ) | `[virtual]`

References orxonox::BaseObject::isInitialized(), and waypoints_.

## Member Function Documentation

void orxonox::WaypointController::addWaypoint | ( | WorldEntity * | waypoint | ) |

References waypoints_.

Referenced by XMLPort().

float orxonox::WaypointController::getAccuracy | ( |  | ) | const`[inline]`

Referenced by XMLPort().

WorldEntity * orxonox::WaypointController::getWaypoint | ( | unsigned int | index | ) | const

References waypoints_.

Referenced by XMLPort().

void orxonox::WaypointController::setAccuracy | ( | float | accuracy | ) | `[inline]`

Referenced by WaypointController(), and XMLPort().

void orxonox::WaypointController::tick | ( | float | dt | ) | `[virtual]`

Gets called every frame.

Parameters:

  | dt | The time since the last frame in seconds

Implements orxonox::Tickable.

Reimplemented in orxonox::WaypointPatrolController.

References currentWaypoint_, orxonox::Controller::getControllableEntity(), orxonox::BaseObject::isActive(), orxonox::ArtificialController::moveToPosition(), squaredaccuracy_, and waypoints_.

void orxonox::WaypointController::XMLPort | ( | Element & | xmlelement,
|  | XMLPort::Mode | mode |
| ) |  |  | `[virtual]`

XML loading and saving.

Parameters:

  | xmlelement | The XML-element
  | loading | Loading (true) or saving (false)

Returns:
  The XML-element

Reimplemented from orxonox::BaseObject.

Reimplemented in orxonox::WaypointPatrolController.

References addWaypoint(), getAccuracy(), getWaypoint(), setAccuracy(), SUPER, XMLPortObject, and XMLPortParam.

## Member Data Documentation

size_t orxonox::WaypointController::currentWaypoint_`[protected]`

Referenced by tick(), and WaypointController().

float orxonox::WaypointController::squaredaccuracy_`[protected]`

Referenced by tick().

std::vector<WorldEntity*> orxonox::WaypointController::waypoints_`[protected]`

Referenced by addWaypoint(), getWaypoint(), tick(), and ~WaypointController().

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

- src/orxonox/objects/controllers/WaypointController.h
- src/orxonox/objects/controllers/WaypointController.cc