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>

Inheritance diagram for PlayersPercept:

Inheritance graph
[legend]
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.

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.

void serialize (In *in, Out *out)

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 54 of file PlayersPercept.h.


Member Enumeration Documentation

anonymous enum
 

Constants.

Enumeration values:
maxNumberOfRedPlayerPercepts 
maxNumberOfBluePlayerPercepts 
maxNumberOfOneRobotsPercepts 
maxNumberOfPercepts 

Definition at line 58 of file PlayersPercept.h.


Constructor & Destructor Documentation

PlayersPercept::PlayersPercept  )  [inline]
 

Constructor.

Definition at line 66 of file PlayersPercept.h.

References numberOfBluePlayers, numberOfRedPlayers, and reset().

Here is the call graph for this function:


Member Function Documentation

void PlayersPercept::reset unsigned long  frameNumber  ) 
 

Initializes the percept.

Definition at line 10 of file PlayersPercept.cpp.

References numberOfBluePlayers, and numberOfRedPlayers.

Referenced by VLCImageProcessor::execute(), SlamImageProcessor::execute(), GT2005ImageProcessor::execute(), and PlayersPercept().

void PlayersPercept::addRedPlayer const SinglePlayerPercept percept  ) 
 

The function adds a red player percept.

Parameters:
percept The percept to add.

Definition at line 18 of file PlayersPercept.cpp.

References maxNumberOfRedPlayerPercepts, numberOfRedPlayers, and redPlayers.

Referenced by VLCRobotSpecialist::addPercept(), GT2005RobotSpecialist::addPercept(), VLCImageProcessor::clusterRobots(), SlamImageProcessor::clusterRobots(), GT2005PlayerSpecialist::detectRedRobots(), and GuideDogRobotSpecialist::scanParallelToHorizon().

void PlayersPercept::addBluePlayer const SinglePlayerPercept percept  ) 
 

The function adds a blue player percept.

Parameters:
percept The percept to add.

Definition at line 25 of file PlayersPercept.cpp.

References bluePlayers, maxNumberOfBluePlayerPercepts, numberOfBluePlayers, and numberOfRedPlayers.

Referenced by VLCRobotSpecialist::addPercept(), GT2005RobotSpecialist::addPercept(), VLCImageProcessor::clusterRobots(), SlamImageProcessor::clusterRobots(), and GT2005PlayerSpecialist::detectBlueRobots().

void PlayersPercept::serialize In in,
Out out
[inline, virtual]
 

Implements Streamable.

Definition at line 99 of file PlayersPercept.h.

References bluePlayers, numberOfBluePlayers, numberOfRedPlayers, redPlayers, STREAM, STREAM_DYN_ARRAY, STREAM_REGISTER_BEGIN, and STREAM_REGISTER_FINISH.


Member Data Documentation

SinglePlayerPercept PlayersPercept::redPlayers[maxNumberOfRedPlayerPercepts]
 

List of perceived red robots.

Definition at line 85 of file PlayersPercept.h.

Referenced by addRedPlayer(), VLCImageProcessor::filterPercepts(), SlamImageProcessor::filterPercepts(), operator<<(), operator>>(), and serialize().

SinglePlayerPercept PlayersPercept::bluePlayers[maxNumberOfBluePlayerPercepts]
 

List of perceived blue robots.

Definition at line 88 of file PlayersPercept.h.

Referenced by addBluePlayer(), VLCImageProcessor::filterPercepts(), SlamImageProcessor::filterPercepts(), operator<<(), operator>>(), and serialize().

int PlayersPercept::numberOfRedPlayers
 

Number of perceived red robots.

Definition at line 91 of file PlayersPercept.h.

Referenced by addBluePlayer(), addRedPlayer(), VLCImageProcessor::filterPercepts(), SlamImageProcessor::filterPercepts(), operator<<(), operator>>(), PlayersPercept(), reset(), and serialize().

int PlayersPercept::numberOfBluePlayers
 

Number of perceived blue robots.

Definition at line 94 of file PlayersPercept.h.

Referenced by addBluePlayer(), VLCImageProcessor::filterPercepts(), SlamImageProcessor::filterPercepts(), operator<<(), operator>>(), PlayersPercept(), reset(), and serialize().

unsigned long PlayersPercept::frameNumber
 

The frame number when perceived.

Definition at line 97 of file PlayersPercept.h.

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


The documentation for this class was generated from the following files:
Generated on Mon Mar 20 22:19:19 2006 for GT2005 by doxygen 1.3.6