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

ObstaclesPercept Class Reference

The class represents perceived obstacles on the field. More...

#include <ObstaclesPercept.h>

Collaboration diagram for ObstaclesPercept:

Collaboration graph
[legend]
List of all members.

Public Types

enum  ObstacleType {
  border, goal, teammate,
  opponent, unknown
}
enum  { maxNumberOfPoints = 200 }
enum  { ownGoal = 0, opponentGoal = 1 }

Public Member Functions

 ObstaclesPercept ()
 Constructor.

void reset (unsigned long frameNumber)
 The function empties the obstacle percept.

void add (const Vector2< int > &nearPoint, const Vector2< int > &farPoint, bool farPointIsOnImageBorder)
 The function adds a new pair of points to the obstacle percept.

void add (const Vector2< int > &nearPoint, const Vector2< int > &farPoint, bool farPointIsOnImageBorder, ObstacleType obstacleType)
 The function adds a new pair of points to the obstacle percept.


Public Attributes

Vector2< int > nearPoints [maxNumberOfPoints]
 The nearest green points.

Vector2< int > farPoints [maxNumberOfPoints]
 The most distant green points.

bool farPointIsOnImageBorder [maxNumberOfPoints]
 Indicates if the far point is an obstacle or the image border.

ObstacleType obstacleType [maxNumberOfPoints]
int numberOfPoints
 The number of pairs of points.

bool angleToFreePartOfGoalWasDetermined [2]
double angleToFreePartOfGoal [2]
double distanceToFreePartOfGoal [2]
double widthOfFreePartOfGoal [2]
unsigned long frameNumber
 The frame number when perceived.


Detailed Description

The class represents perceived obstacles on the field.

Definition at line 18 of file ObstaclesPercept.h.


Member Enumeration Documentation

enum ObstaclesPercept::ObstacleType
 

Enumeration values:
border 
goal 
teammate 
opponent 
unknown 

Definition at line 21 of file ObstaclesPercept.h.

anonymous enum
 

Enumeration values:
maxNumberOfPoints 

Definition at line 22 of file ObstaclesPercept.h.

anonymous enum
 

Enumeration values:
ownGoal 
opponentGoal 

Definition at line 31 of file ObstaclesPercept.h.


Constructor & Destructor Documentation

ObstaclesPercept::ObstaclesPercept  )  [inline]
 

Constructor.

Definition at line 39 of file ObstaclesPercept.h.

References reset().

Here is the call graph for this function:


Member Function Documentation

void ObstaclesPercept::reset unsigned long  frameNumber  ) 
 

The function empties the obstacle percept.

Definition at line 10 of file ObstaclesPercept.cpp.

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

void ObstaclesPercept::add const Vector2< int > &  nearPoint,
const Vector2< int > &  farPoint,
bool  farPointIsOnImageBorder
 

The function adds a new pair of points to the obstacle percept.

Parameters:
nearPoint The near point.
farPoint The far point.
farPointIsOnImageBorder Specifies whether farPoint was found on the image border

Definition at line 23 of file ObstaclesPercept.cpp.

References farPointIsOnImageBorder, farPoints, and nearPoints.

Referenced by RasterImageProcessor::addObstaclePoints(), and GT2004ImageProcessor::scan().

void ObstaclesPercept::add const Vector2< int > &  nearPoint,
const Vector2< int > &  farPoint,
bool  farPointIsOnImageBorder,
ObstacleType  obstacleType
 

The function adds a new pair of points to the obstacle percept.

Parameters:
nearPoint The near point.
farPoint The far point.
farPointIsOnImageBorder Specifies whether farPoint was found on the image border
obstacleType The type of the obstacle

Definition at line 33 of file ObstaclesPercept.cpp.

References farPointIsOnImageBorder, farPoints, and nearPoints.


Member Data Documentation

Vector2<int> ObstaclesPercept::nearPoints[maxNumberOfPoints]
 

The nearest green points.

Definition at line 24 of file ObstaclesPercept.h.

Referenced by add(), GT2004ObstaclesLocator::addObstaclesPercept(), operator<<(), and operator>>().

Vector2<int> ObstaclesPercept::farPoints[maxNumberOfPoints]
 

The most distant green points.

Definition at line 25 of file ObstaclesPercept.h.

Referenced by add(), GT2004ObstaclesLocator::addObstaclesPercept(), operator<<(), and operator>>().

bool ObstaclesPercept::farPointIsOnImageBorder[maxNumberOfPoints]
 

Indicates if the far point is an obstacle or the image border.

Definition at line 26 of file ObstaclesPercept.h.

Referenced by add(), GT2004ObstaclesLocator::addObstaclesPercept(), operator<<(), and operator>>().

ObstacleType ObstaclesPercept::obstacleType[maxNumberOfPoints]
 

Definition at line 27 of file ObstaclesPercept.h.

Referenced by GT2004ObstaclesLocator::addObstaclesPercept(), operator<<(), and operator>>().

int ObstaclesPercept::numberOfPoints
 

The number of pairs of points.

Definition at line 29 of file ObstaclesPercept.h.

Referenced by GT2004ObstaclesLocator::addObstaclesPercept(), operator<<(), and operator>>().

bool ObstaclesPercept::angleToFreePartOfGoalWasDetermined[2]
 

Definition at line 32 of file ObstaclesPercept.h.

Referenced by BoxSpecialist::detectFreePartOfGoal(), GT2004ObstaclesLocator::determineFreePartsOfGoals(), operator<<(), and operator>>().

double ObstaclesPercept::angleToFreePartOfGoal[2]
 

Definition at line 33 of file ObstaclesPercept.h.

Referenced by BoxSpecialist::detectFreePartOfGoal(), GT2004ObstaclesLocator::determineFreePartsOfGoals(), operator<<(), and operator>>().

double ObstaclesPercept::distanceToFreePartOfGoal[2]
 

Definition at line 33 of file ObstaclesPercept.h.

Referenced by BoxSpecialist::detectFreePartOfGoal(), GT2004ObstaclesLocator::determineFreePartsOfGoals(), operator<<(), and operator>>().

double ObstaclesPercept::widthOfFreePartOfGoal[2]
 

Definition at line 33 of file ObstaclesPercept.h.

Referenced by BoxSpecialist::detectFreePartOfGoal(), GT2004ObstaclesLocator::determineFreePartsOfGoals(), operator<<(), and operator>>().

unsigned long ObstaclesPercept::frameNumber
 

The frame number when perceived.

Definition at line 64 of file ObstaclesPercept.h.

Referenced by GT2004ObstaclesLocator::execute(), operator<<(), and operator>>().


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