random_racer::ControlPointGenerator Class Reference

This Class generates random Control Points with a Height between 0-1 and X- and Z- Coordiantes between 0 and Number of ControlPoints-1. More...

#include <ControlPointGenerator.h>

Inheritance diagram for random_racer::ControlPointGenerator:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 ControlPointGenerator (unsigned int numControlPoints)
 Ctor.
virtual ~ControlPointGenerator ()
 Dtor.
void generateControlPoints (std::vector< VRS::Vector > *target)
 This is the Callback for the ControlPointContainer to generate random Values for the ControlPoints.
VRS::SO< VRS::Callback1< std::vector<
VRS::Vector > * > > 
getCallback ()
 Returns the callback.

Private Member Functions

void terGenrateLowRoundsCommand (const std::string &lowRounds)
 Sets the lowRounds.
void terGenrateUpRoundsCommand (const std::string &upRounds)
 Sets the upRounds.
void terGenrateMidHeightCommand (const std::string &midHeight)
 Sets the midHeight.

Private Attributes

unsigned int m_numControlPoints
 Stores the Number of ControlPoints.
unsigned int m_lowRounds
 Stores the rounds, who long the algorithm runs.
unsigned int m_upRounds
double m_midHeight
 Stores the midHeight.
VRS::SO< VRS::Callback1< std::vector<
VRS::Vector > * > > 
m_callback
 Stores the Callback.

Detailed Description

This Class generates random Control Points with a Height between 0-1 and X- and Z- Coordiantes between 0 and Number of ControlPoints-1.

To use the generate function use the callback an specify a target (see the generateControlPoints function)

Definition at line 20 of file ControlPointGenerator.h.


Constructor & Destructor Documentation

random_racer::ControlPointGenerator::ControlPointGenerator ( unsigned int  numControlPoints  ) 

Ctor.

Definition at line 12 of file ControlPointGenerator.cpp.

References generateControlPoints(), random_racer::Console::get(), m_callback, m_lowRounds, m_midHeight, m_numControlPoints, m_upRounds, terGenrateLowRoundsCommand(), terGenrateMidHeightCommand(), and terGenrateUpRoundsCommand().

Here is the call graph for this function:

random_racer::ControlPointGenerator::~ControlPointGenerator (  )  [virtual]

Dtor.

Definition at line 38 of file ControlPointGenerator.cpp.


Member Function Documentation

void random_racer::ControlPointGenerator::terGenrateLowRoundsCommand ( const std::string &  lowRounds  )  [private]

Sets the lowRounds.

Definition at line 76 of file ControlPointGenerator.cpp.

References random_racer::Console::get().

Referenced by ControlPointGenerator().

Here is the call graph for this function:

Here is the caller graph for this function:

void random_racer::ControlPointGenerator::terGenrateUpRoundsCommand ( const std::string &  upRounds  )  [private]

Sets the upRounds.

Definition at line 98 of file ControlPointGenerator.cpp.

References random_racer::Console::get().

Referenced by ControlPointGenerator().

Here is the call graph for this function:

Here is the caller graph for this function:

void random_racer::ControlPointGenerator::terGenrateMidHeightCommand ( const std::string &  midHeight  )  [private]

Sets the midHeight.

Definition at line 119 of file ControlPointGenerator.cpp.

References random_racer::Console::get(), and m_midHeight.

Referenced by ControlPointGenerator().

Here is the call graph for this function:

Here is the caller graph for this function:

void random_racer::ControlPointGenerator::generateControlPoints ( std::vector< VRS::Vector > *  target  ) 

This is the Callback for the ControlPointContainer to generate random Values for the ControlPoints.

Parameters:
target Specifies the traget where we stores the generated values

Referenced by ControlPointGenerator().

Here is the caller graph for this function:

VRS::SO<VRS::Callback1<std::vector<VRS::Vector>* > > random_racer::ControlPointGenerator::getCallback (  )  [inline]

Returns the callback.

Definition at line 82 of file ControlPointGenerator.h.

References m_callback.


Member Data Documentation

unsigned int random_racer::ControlPointGenerator::m_numControlPoints [private]

Stores the Number of ControlPoints.

Definition at line 25 of file ControlPointGenerator.h.

Referenced by ControlPointGenerator().

unsigned int random_racer::ControlPointGenerator::m_lowRounds [private]

Stores the rounds, who long the algorithm runs.

It exists two different loops to create more points with a lower height (0 - midHeight) and a loop that create fewer points with a height between midHeight and 1.

Definition at line 32 of file ControlPointGenerator.h.

Referenced by ControlPointGenerator().

unsigned int random_racer::ControlPointGenerator::m_upRounds [private]

Definition at line 32 of file ControlPointGenerator.h.

Referenced by ControlPointGenerator().

double random_racer::ControlPointGenerator::m_midHeight [private]

Stores the midHeight.

Definition at line 37 of file ControlPointGenerator.h.

Referenced by ControlPointGenerator(), and terGenrateMidHeightCommand().

VRS::SO<VRS::Callback1<std::vector<VRS::Vector>* > > random_racer::ControlPointGenerator::m_callback [private]

Stores the Callback.

Definition at line 42 of file ControlPointGenerator.h.

Referenced by ControlPointGenerator(), and getCallback().


The documentation for this class was generated from the following files:
Generated on Fri May 11 21:02:07 2007 for Random Racer by  doxygen 1.5.1