#include <ControlPointGenerator.h>
Inheritance diagram for random_racer::ControlPointGenerator:

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. | |
To use the generate function use the callback an specify a target (see the generateControlPoints function)
Definition at line 20 of file ControlPointGenerator.h.
| 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] |
| 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.
| 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] |
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] |
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().
1.5.1