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

PlayersPercept Class Reference

This is a collection of SinglePlayerPercept for red and blue dressed robots. More...

#include <PlayersPercept.h>

Collaboration diagram for PlayersPercept:

Collaboration graph
[legend]
List of all members.

Public Types

enum  {
  maxNumberOfRedPlayerPercepts = 13, maxNumberOfBluePlayerPercepts = 17, maxNumberOfOneRobotsPercepts = 17,
  maxNumberOfPercepts = 34
}
 Constants. More...


Public Member Functions

 PlayersPercept ()
 Constructor.

 ~PlayersPercept ()
 Destructor.

void reset (unsigned long frameNumber)
 Initializes the percept.

void addRedPlayer (const SinglePlayerPercept &percept)
 The function adds a red player percept.

void addBluePlayer (const SinglePlayerPercept &percept)
 The function adds a blue player percept.


Public Attributes

SinglePlayerPercept redPlayers [maxNumberOfRedPlayerPercepts]
 List of perceived red robots.

SinglePlayerPercept bluePlayers [maxNumberOfBluePlayerPercepts]
 List of perceived blue robots.

int numberOfRedPlayers
 Number of perceived red robots.

int numberOfBluePlayers
 Number of perceived blue robots.

unsigned long frameNumber
 The frame number when perceived.


Detailed Description

This is a collection of SinglePlayerPercept for red and blue dressed robots.

Definition at line 42 of file PlayersPercept.h.


Member Enumeration Documentation

anonymous enum
 

Constants.

Enumeration values:
maxNumberOfRedPlayerPercepts 
maxNumberOfBluePlayerPercepts 
maxNumberOfOneRobotsPercepts 
maxNumberOfPercepts 

Definition at line 46 of file PlayersPercept.h.


Constructor & Destructor Documentation

PlayersPercept::PlayersPercept  ) 
 

Constructor.

Definition at line 10 of file PlayersPercept.cpp.

References reset().

Here is the call graph for this function:

PlayersPercept::~PlayersPercept  ) 
 

Destructor.

Definition at line 16 of file PlayersPercept.cpp.


Member Function Documentation

void PlayersPercept::reset unsigned long  frameNumber  ) 
 

Initializes the percept.

Definition at line 21 of file PlayersPercept.cpp.

References numberOfBluePlayers, and numberOfRedPlayers.

Referenced by GT2004ImageProcessor::execute(), RasterImageProcessor::init(), and PlayersPercept().

void PlayersPercept::addRedPlayer const SinglePlayerPercept percept  ) 
 

The function adds a red player percept.

Parameters:
percept The percept to add.

Definition at line 29 of file PlayersPercept.cpp.

References maxNumberOfRedPlayerPercepts, numberOfRedPlayers, and redPlayers.

Referenced by GT2004ImageProcessor::clusterRobots(), and REnemySpecialist::executePostProcessing().

void PlayersPercept::addBluePlayer const SinglePlayerPercept percept  ) 
 

The function adds a blue player percept.

Parameters:
percept The percept to add.

Definition at line 36 of file PlayersPercept.cpp.

References bluePlayers, maxNumberOfBluePlayerPercepts, numberOfBluePlayers, and numberOfRedPlayers.

Referenced by GT2004ImageProcessor::clusterRobots(), and REnemySpecialist::executePostProcessing().


Member Data Documentation

SinglePlayerPercept PlayersPercept::redPlayers[maxNumberOfRedPlayerPercepts]
 

List of perceived red robots.

Definition at line 75 of file PlayersPercept.h.

Referenced by addRedPlayer(), GT2004PlayersLocator::execute(), GT2004ImageProcessor::filterPercepts(), operator<<(), and operator>>().

SinglePlayerPercept PlayersPercept::bluePlayers[maxNumberOfBluePlayerPercepts]
 

List of perceived blue robots.

Definition at line 78 of file PlayersPercept.h.

Referenced by addBluePlayer(), GT2004PlayersLocator::execute(), GT2004ImageProcessor::filterPercepts(), operator<<(), and operator>>().

int PlayersPercept::numberOfRedPlayers
 

Number of perceived red robots.

Definition at line 81 of file PlayersPercept.h.

Referenced by addBluePlayer(), addRedPlayer(), GT2004PlayersLocator::execute(), GT2004ImageProcessor::filterPercepts(), operator<<(), operator>>(), and reset().

int PlayersPercept::numberOfBluePlayers
 

Number of perceived blue robots.

Definition at line 84 of file PlayersPercept.h.

Referenced by addBluePlayer(), GT2004PlayersLocator::execute(), GT2004ImageProcessor::filterPercepts(), operator<<(), operator>>(), and reset().

unsigned long PlayersPercept::frameNumber
 

The frame number when perceived.

Definition at line 87 of file PlayersPercept.h.

Referenced by operator<<(), and operator>>().


The documentation for this class was generated from the following files:
Generated on Thu Sep 23 20:10:41 2004 for GT2004 by doxygen 1.3.6