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

TemplateTable< TEMPLATES_MAX > Class Template Reference

The class realizes a table of template poses. More...

#include <LinesTables2004.h>

Inheritance diagram for TemplateTable< TEMPLATES_MAX >:

Inheritance graph
[legend]
Collaboration diagram for TemplateTable< TEMPLATES_MAX >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void create (const Field &field, LinesPercept::LineType type)
 The function creates the table.

Pose2D sample (double realDist) const
 The function draws a pose from the templates for a certain distance.

void write (Out &stream) const
 The function writes the contents of an object to a stream.

void read (In &stream)
 The function reads the contents of an object from a stream.


Private Types

enum  { DISTANCE_MAX = 500 }

Static Private Member Functions

int compare (const Temp *t1, const Temp *t2)
 The function is required for sorting the template poses.


Private Attributes

char templates [TEMPLATES_MAX][3]
 The template poses sorted by distance.

unsigned short distance [DISTANCE_MAX+1]
 Indices into the template table depending on the distance.


Detailed Description

template<int TEMPLATES_MAX>
class TemplateTable< TEMPLATES_MAX >

The class realizes a table of template poses.

Definition at line 169 of file LinesTables2004.h.


Member Enumeration Documentation

template<int TEMPLATES_MAX>
anonymous enum [private]
 

Enumeration values:
DISTANCE_MAX  The number of distances.

Definition at line 181 of file LinesTables2004.h.


Member Function Documentation

template<int TEMPLATES_MAX>
int TemplateTable< TEMPLATES_MAX >::compare const Temp t1,
const Temp t2
[inline, static, private]
 

The function is required for sorting the template poses.

It is used as compare function for qsort.

Parameters:
t1 The first element to compare.
t2 The second element to compare.
Returns:
-1, 0, or 1 according to the specification required by qsort.

Definition at line 196 of file LinesTables2004.h.

template<int TEMPLATES_MAX>
void TemplateTable< TEMPLATES_MAX >::create const Field field,
LinesPercept::LineType  type
[inline]
 

The function creates the table.

It must be called for construction.

Parameters:
field The field.
type The line type the table will be constructed for.

Definition at line 208 of file LinesTables2004.h.

template<int TEMPLATES_MAX>
Pose2D TemplateTable< TEMPLATES_MAX >::sample double  realDist  )  const [inline]
 

The function draws a pose from the templates for a certain distance.

Parameters:
realDist The distance in which a line starting from the pose should cut the closest field line.
Returns:
A pose drawn from the table.

Definition at line 256 of file LinesTables2004.h.

template<int TEMPLATES_MAX>
void TemplateTable< TEMPLATES_MAX >::write Out stream  )  const [inline, virtual]
 

The function writes the contents of an object to a stream.

Parameters:
stream The stream the data is written to.

Implements TemplateTableBase.

Definition at line 270 of file LinesTables2004.h.

template<int TEMPLATES_MAX>
void TemplateTable< TEMPLATES_MAX >::read In stream  )  [inline, virtual]
 

The function reads the contents of an object from a stream.

Parameters:
stream The stream the data is read from.

Implements TemplateTableBase.

Definition at line 276 of file LinesTables2004.h.


Member Data Documentation

template<int TEMPLATES_MAX>
char TemplateTable< TEMPLATES_MAX >::templates[TEMPLATES_MAX][3] [private]
 

The template poses sorted by distance.

Definition at line 186 of file LinesTables2004.h.

template<int TEMPLATES_MAX>
unsigned short TemplateTable< TEMPLATES_MAX >::distance[DISTANCE_MAX + 1] [private]
 

Indices into the template table depending on the distance.

Definition at line 187 of file LinesTables2004.h.


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