Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# GTCamPlayersLocator Class Reference

This class is a locator for players of the own and the opponentīs team using the worldstate of the GTCam. More...

`#include <GTCamPlayersLocator.h>`

Inheritance diagram for GTCamPlayersLocator:

[legend]
Collaboration diagram for GTCamPlayersLocator:

[legend]
List of all members.

## Public Types
enum | { NUMBER_OF_OWN_PLAYERS_TO_LOCATE = 3, NUMBER_OF_OPPONENT_PLAYERS_TO_LOCATE = 4 }
| Constants for the number of robots in the own and in the opponentīs team. More...
## Public Member Functions
| GTCamPlayersLocator (const PlayersLocatorInterfaces &interfaces)
| Constructor.
virtual void | execute ()
| Executes the module.
virtual bool | handleMessage (InMessage &message)
| Called from a MessageQueue to distribute messages.

## Detailed Description

This class is a locator for players of the own and the opponentīs team using the worldstate of the GTCam.

Author:
  Timo Diekmann

Definition at line 19 of file GTCamPlayersLocator.h.

## Member Enumeration Documentation

anonymous enum

  | Constants for the number of robots in the own and in the opponentīs team. Enumeration values:
  NUMBER_OF_OWN_PLAYERS_TO_LOCATE |
  NUMBER_OF_OPPONENT_PLAYERS_TO_LOCATE |
Definition at line 24 of file GTCamPlayersLocator.h.

## Constructor & Destructor Documentation

GTCamPlayersLocator::GTCamPlayersLocator | ( | const PlayersLocatorInterfaces & | interfaces | ) |

  | Constructor. Parameters:
  interfaces | The paramters of the PlayersLocator module.
Definition at line 39 of file GTCamPlayersLocator.cpp. References NUMBER_OF_OPPONENT_PLAYERS_TO_LOCATE, NUMBER_OF_OWN_PLAYERS_TO_LOCATE, PlayerPoseCollection::numberOfOpponentPlayers, and PlayerPoseCollection::numberOfOwnPlayers.

## Member Function Documentation

void GTCamPlayersLocator::execute | ( |  | ) | `[virtual]`

| Executes the module. Reimplemented from Module. Definition at line 46 of file GTCamPlayersLocator.cpp. References PlayerPoseCollection::getOpponentPlayerPose(), PlayerPoseCollection::getOwnPlayerPose(), getPlayer(), Player::getPlayerNumber(), GTCamWorldState::getPlayerOrientation(), GTCamWorldState::getPlayerPos(), GTCamWorldState::getPlayerSpeed(), Player::getTeamColor(), NUMBER_OF_OPPONENT_PLAYERS_TO_LOCATE, PlayerPose::setCosAngle(), PlayerPoseCollection::setOpponentPlayerPose(), PlayerPoseCollection::setOwnPlayerPose(), PlayerPose::setPlayerNumber(), PlayerPose::setSigmaMaj(), PlayerPose::setSigmaMin(), PlayerPose::setSinAngle(), PlayerPose::setSpeed(), Vector2< V >::x, and Vector2< V >::y.

Here is the call graph for this function:

bool GTCamPlayersLocator::handleMessage | ( | InMessage & | message | ) | `[virtual]`

  | Called from a MessageQueue to distribute messages. Use message.getMessageID to decide if the message is relavant for the MesssageHandler derivate. Use message.bin, message.text or message.config as In streams to get the data from. Parameters:
  message | The message that can be read.
Returns: true if the message was read (handled). Reimplemented from Module. Definition at line 84 of file GTCamPlayersLocator.cpp.

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

- Modules/PlayersLocator/GTCamPlayersLocator.h
- Modules/PlayersLocator/GTCamPlayersLocator.cpp