Orxonox: orxonox::WaypointPatrolController Class Reference

# orxonox::WaypointPatrolController Class Reference

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

Inheritance diagram for orxonox::WaypointPatrolController:

List of all members.

## Public Member Functions

float | getAlertnessRadius () const
int | getTeam () const
void | setAlertnessRadius (float radius)
void | setTeam (int team)
virtual void | tick (float dt)
| Gets called every frame.
| WaypointPatrolController (BaseObject *creator)
virtual void | XMLPort (Element &xmlelement, XMLPort::Mode mode)
| XML loading and saving.
virtual | ~WaypointPatrolController ()

## Protected Member Functions

void | searchEnemy ()

## Protected Attributes

float | alertnessradius_
Timer< WaypointPatrolController > | patrolTimer_
int | team_

## Constructor & Destructor Documentation

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

References alertnessradius_, orxonox::createExecutor(), patrolTimer_, RegisterObject, orxonox::rnd(), searchEnemy(), and team_.

virtual orxonox::WaypointPatrolController::~WaypointPatrolController | ( |  | ) | `[inline, virtual]`

## Member Function Documentation

float orxonox::WaypointPatrolController::getAlertnessRadius | ( |  | ) | const`[inline]`

Referenced by XMLPort().

int orxonox::WaypointPatrolController::getTeam | ( |  | ) | const`[inline]`

Referenced by orxonox::ArtificialController::sameTeam(), and XMLPort().

void orxonox::WaypointPatrolController::searchEnemy | ( |  | ) | `[protected]`

References alertnessradius_, orxonox::Controller::getControllableEntity(), orxonox::BaseObject::getGametype(), orxonox::WorldEntity::getPosition(), patrolTimer_, orxonox::rnd(), orxonox::ArtificialController::sameTeam(), orxonox::ArtificialController::target_, and orxonox::MT_Type::Vector3.

Referenced by WaypointPatrolController().

void orxonox::WaypointPatrolController::setAlertnessRadius | ( | float | radius | ) | `[inline]`

Referenced by XMLPort().

void orxonox::WaypointPatrolController::setTeam | ( | int | team | ) | `[inline]`

Referenced by XMLPort().

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

Gets called every frame.

Parameters:

  | dt | The time since the last frame in seconds

Reimplemented from orxonox::WaypointController.

References orxonox::ArtificialController::aimAtTarget(), orxonox::ArtificialController::bHasTargetPosition_, orxonox::ControllableEntity::fire(), orxonox::Controller::getControllableEntity(), orxonox::BaseObject::isActive(), orxonox::ArtificialController::isCloseAtTarget(), orxonox::ArtificialController::isLookingAtTarget(), orxonox::ArtificialController::moveToTargetPosition(), SUPER, and orxonox::ArtificialController::target_.

void orxonox::WaypointPatrolController::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::WaypointController.

References getAlertnessRadius(), getTeam(), setAlertnessRadius(), setTeam(), SUPER, and XMLPortParam.

## Member Data Documentation

float orxonox::WaypointPatrolController::alertnessradius_`[protected]`

Referenced by searchEnemy(), and WaypointPatrolController().

Timer<WaypointPatrolController> orxonox::WaypointPatrolController::patrolTimer_`[protected]`

Referenced by searchEnemy(), and WaypointPatrolController().

int orxonox::WaypointPatrolController::team_`[protected]`

Referenced by WaypointPatrolController().

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

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