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

REnemySpecialist Class Reference

#include <REnemySpecialist.h>

Inheritance diagram for REnemySpecialist:

Inheritance graph
[legend]
Collaboration diagram for REnemySpecialist:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 REnemySpecialist (RasterImageProcessor &processor, RasterStrategy &strat)
virtual ~REnemySpecialist ()
void invokeOnPostScan (int x, int y)
 Invokes the specialist in the second scan stage at position (x,y) (this member should be replaced later).

void executePostProcessing ()
 Executes the detection algorithm.

void invokeOnPreScan (int x, int y)
 Invokes the specialist in the first scan stage at position (x,y) (this member should be replaced later).

virtual int getType ()
 getter for the type of specialist

virtual void init ()
 Initializes the specialist before running the detection algorithm.

Vector2< int > calculateFarestPoint (std::list< LinePair > enemyLines)
Vector2< int > calculateFarestPointCOG (int numberOfFootPoints, std::list< LinePair > enemyLines)
Vector2< int > calculateFarestPointFastCOG (std::list< LinePair > enemyLines)
Vector2< int > calculatePointOnFieldFromSegment (std::list< LinePair > enemyLines)

Public Attributes

int maximums [2]
int maxCountSum
int countSum
int max

Private Types

typedef const unsigned char * I_Pin

Private Member Functions

bool isCross (const LinePair &horizontal, const LinePair vertical)

Static Private Member Functions

void sort (int footPointDistance[], Vector2< double > footPoint[], const int &start, const int &end)

Private Attributes

RasterStrategystrategy
std::vector< RasterSpecialist::LinePaircolumns
std::vector< RasterSpecialist::LinePairlines
Vector2< int > tempP
Geometry::Line horizon
 The horizon.

int leftBorderOfNewLp

Member Typedef Documentation

typedef const unsigned char* REnemySpecialist::I_Pin [private]
 

Reimplemented from RasterSpecialist.

Definition at line 21 of file REnemySpecialist.h.


Constructor & Destructor Documentation

REnemySpecialist::REnemySpecialist RasterImageProcessor processor,
RasterStrategy strat
 

Definition at line 19 of file REnemySpecialist.cpp.

REnemySpecialist::~REnemySpecialist  )  [virtual]
 

Definition at line 27 of file REnemySpecialist.cpp.


Member Function Documentation

void REnemySpecialist::invokeOnPostScan int  x,
int  y
[virtual]
 

Invokes the specialist in the second scan stage at position (x,y) (this member should be replaced later).

Parameters:
x The x coordinate.
y The y coordinate.

Reimplemented from RasterSpecialist.

Definition at line 190 of file REnemySpecialist.cpp.

References DOT, RasterStrategy::insidePlayer, LINE, and tempP.

void REnemySpecialist::executePostProcessing  )  [virtual]
 

Executes the detection algorithm.

Reimplemented from RasterSpecialist.

Definition at line 31 of file REnemySpecialist.cpp.

References PlayersPercept::addBluePlayer(), PlayersPercept::addRedPlayer(), calculateFarestPointFastCOG(), RasterSpecialist::createSegmentsFromLines2(), Geometry::distance(), RasterSpecialist::getColor(), SinglePlayerPercept::offset, ImageProcessorInterfaces::playersPercept, SinglePlayerPercept::validity, Vector2< double >::x, Vector2< V >::x, Vector2< double >::y, and Vector2< V >::y.

Referenced by RDefaultStrategy::postProcessing().

Here is the call graph for this function:

void REnemySpecialist::invokeOnPreScan int  x,
int  y
[virtual]
 

Invokes the specialist in the first scan stage at position (x,y) (this member should be replaced later).

Parameters:
x The x coordinate.
y The y coordinate.

Reimplemented from RasterSpecialist.

Definition at line 172 of file REnemySpecialist.cpp.

References DOT, RasterStrategy::insidePlayer, LINE, and tempP.

Referenced by RDefaultStrategy::checkPlayer(), and RDefaultStrategy::preScan().

int REnemySpecialist::getType  )  [virtual]
 

getter for the type of specialist

Returns:
The type of the specialist.

Implements RasterSpecialist.

Definition at line 205 of file REnemySpecialist.cpp.

References __REnemySpecialist.

void REnemySpecialist::init  )  [virtual]
 

Initializes the specialist before running the detection algorithm.

Implements RasterSpecialist.

Definition at line 489 of file REnemySpecialist.cpp.

References columns.

Referenced by RDefaultStrategy::init().

Vector2< int > REnemySpecialist::calculateFarestPoint std::list< LinePair enemyLines  ) 
 

Definition at line 210 of file REnemySpecialist.cpp.

References Geometry::calculatePointOnField(), Image::cameraInfo, ImageProcessorInterfaces::cameraMatrix, Geometry::Line::direction, DOT, Geometry::getDistanceToLine(), RasterImageProcessor::getHorizon(), ImageProcessorInterfaces::image, Vector2< V >::x, Vector2< V >::y, and Vector2< double >::y.

Here is the call graph for this function:

Vector2< int > REnemySpecialist::calculateFarestPointCOG int  numberOfFootPoints,
std::list< LinePair enemyLines
 

Definition at line 381 of file REnemySpecialist.cpp.

References Geometry::calculatePointOnField(), Image::cameraInfo, ImageProcessorInterfaces::cameraMatrix, DOT, Geometry::getDistanceToLine(), RasterImageProcessor::getHorizon(), ImageProcessorInterfaces::image, sort(), Vector2< V >::x, and Vector2< V >::y.

Here is the call graph for this function:

Vector2< int > REnemySpecialist::calculateFarestPointFastCOG std::list< LinePair enemyLines  ) 
 

Definition at line 311 of file REnemySpecialist.cpp.

References Geometry::calculatePointOnField(), Image::cameraInfo, ImageProcessorInterfaces::cameraMatrix, DOT, Geometry::getDistanceToLine(), RasterImageProcessor::getHorizon(), ImageProcessorInterfaces::image, Vector2< V >::x, and Vector2< V >::y.

Referenced by executePostProcessing().

Here is the call graph for this function:

Vector2< int > REnemySpecialist::calculatePointOnFieldFromSegment std::list< LinePair enemyLines  ) 
 

Definition at line 446 of file REnemySpecialist.cpp.

References Geometry::calculatePointOnField(), Image::cameraInfo, ImageProcessorInterfaces::cameraMatrix, DOT, and ImageProcessorInterfaces::image.

Here is the call graph for this function:

void REnemySpecialist::sort int  footPointDistance[],
Vector2< double >  footPoint[],
const int &  start,
const int &  end
[static, private]
 

Definition at line 266 of file REnemySpecialist.cpp.

Referenced by calculateFarestPointCOG().

bool REnemySpecialist::isCross const LinePair horizontal,
const LinePair  vertical
[inline, private]
 

Definition at line 43 of file REnemySpecialist.h.


Member Data Documentation

int REnemySpecialist::maximums[2]
 

Definition at line 36 of file REnemySpecialist.h.

int REnemySpecialist::maxCountSum
 

Definition at line 37 of file REnemySpecialist.h.

int REnemySpecialist::countSum
 

Definition at line 38 of file REnemySpecialist.h.

int REnemySpecialist::max
 

Definition at line 39 of file REnemySpecialist.h.

RasterStrategy* REnemySpecialist::strategy [private]
 

Definition at line 50 of file REnemySpecialist.h.

std::vector<RasterSpecialist::LinePair> REnemySpecialist::columns [private]
 

Definition at line 51 of file REnemySpecialist.h.

Referenced by init().

std::vector<RasterSpecialist::LinePair> REnemySpecialist::lines [private]
 

Definition at line 52 of file REnemySpecialist.h.

Vector2< int> REnemySpecialist::tempP [private]
 

Definition at line 53 of file REnemySpecialist.h.

Referenced by invokeOnPostScan(), and invokeOnPreScan().

Geometry::Line REnemySpecialist::horizon [private]
 

The horizon.

Definition at line 54 of file REnemySpecialist.h.

int REnemySpecialist::leftBorderOfNewLp [private]
 

Definition at line 56 of file REnemySpecialist.h.


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