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>

Inheritance diagram for ObstaclesPercept:

Inheritance graph
[legend]
Collaboration diagram for ObstaclesPercept:

Collaboration graph
[legend]
List of all members.

Public Types

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

Public Member Functions

void setFreePartOfGoal (colorClass goalColor, double angleToLeftEndpoint, double angleToRightEndpoint, bool leftEndpointSeen, bool rightEndpointSeen, const Vector2< int > &leftInImage, const Vector2< int > &rightInImage)
 ObstaclesPercept ()
 Constructor.

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

void add (const Segment &segment)
 The function adds a new pair of points to the obstacle percept.


Public Attributes

Segment segments [maxNumberOfSegments]
 The obstacle points.

int numberOfSegments
 The number of pairs of points.

FreePartOfGoal freePartOfGoal [2]
unsigned long frameNumber
 The frame number when perceived.


Private Member Functions

void serialize (In *in, Out *out)

Detailed Description

The class represents perceived obstacles on the field.

Definition at line 20 of file ObstaclesPercept.h.


Member Enumeration Documentation

enum ObstaclesPercept::ObstacleType
 

Enumeration values:
border 
goal 
teammate 
opponent 
unknown 

Definition at line 32 of file ObstaclesPercept.h.

anonymous enum
 

Enumeration values:
maxNumberOfSegments 

Definition at line 33 of file ObstaclesPercept.h.

enum ObstaclesPercept::WhoseGoal
 

Enumeration values:
ownGoal 
opponentGoal 

Definition at line 34 of file ObstaclesPercept.h.

Referenced by setFreePartOfGoal().


Constructor & Destructor Documentation

ObstaclesPercept::ObstaclesPercept  )  [inline]
 

Constructor.

Definition at line 121 of file ObstaclesPercept.h.

References reset().

Here is the call graph for this function:


Member Function Documentation

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

Implements Streamable.

Definition at line 22 of file ObstaclesPercept.h.

References freePartOfGoal, numberOfSegments, segments, STREAM, STREAM_ARRAY, STREAM_DYN_ARRAY, STREAM_REGISTER_BEGIN, and STREAM_REGISTER_FINISH.

void ObstaclesPercept::setFreePartOfGoal colorClass  goalColor,
double  angleToLeftEndpoint,
double  angleToRightEndpoint,
bool  leftEndpointSeen,
bool  rightEndpointSeen,
const Vector2< int > &  leftInImage,
const Vector2< int > &  rightInImage
[inline]
 

Definition at line 100 of file ObstaclesPercept.h.

References ObstaclesPercept::FreePartOfGoal::directionAsAngle, ObstaclesPercept::FreePartOfGoal::distanceOnField, freePartOfGoal, getPlayer(), Player::getTeamColor(), ObstaclesPercept::FreePartOfGoal::leftEndSeen, ObstaclesPercept::FreePartOfGoal::leftInImage, ObstaclesPercept::FreePartOfGoal::rightEndSeen, ObstaclesPercept::FreePartOfGoal::rightInImage, ObstaclesPercept::FreePartOfGoal::wasDetermined, WhoseGoal, and ObstaclesPercept::FreePartOfGoal::widthAsAngle.

Referenced by VLCGoalRecognizer::interpretResults(), and GT2005GoalRecognizer::publishResults().

Here is the call graph for this function:

void ObstaclesPercept::reset unsigned long  frameNumber  ) 
 

The function empties the obstacle percept.

Definition at line 10 of file ObstaclesPercept.cpp.

References freePartOfGoal, numberOfSegments, and ObstaclesPercept::FreePartOfGoal::wasDetermined.

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

void ObstaclesPercept::add const Segment segment  ) 
 

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

Parameters:
segment The pair of points.

Definition at line 17 of file ObstaclesPercept.cpp.

References maxNumberOfSegments, numberOfSegments, and segments.

Referenced by SlamImageProcessor::scan().


Member Data Documentation

Segment ObstaclesPercept::segments[maxNumberOfSegments]
 

The obstacle points.

Definition at line 134 of file ObstaclesPercept.h.

Referenced by add(), GT2005ObstaclesLocator::addObstaclesPercept(), and serialize().

int ObstaclesPercept::numberOfSegments
 

The number of pairs of points.

Definition at line 135 of file ObstaclesPercept.h.

Referenced by add(), GT2005ObstaclesLocator::addObstaclesPercept(), reset(), and serialize().

FreePartOfGoal ObstaclesPercept::freePartOfGoal[2]
 

Definition at line 136 of file ObstaclesPercept.h.

Referenced by GT2005ObstaclesLocator::determineFreePartsOfGoals(), reset(), serialize(), and setFreePartOfGoal().

unsigned long ObstaclesPercept::frameNumber
 

The frame number when perceived.

Definition at line 139 of file ObstaclesPercept.h.

Referenced by GT2005ObstaclesLocator::execute().


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