PolygonTester Class Reference

Runs the tests for different polygon filler implementations. More...

#include <PolygonTester.h>

List of all members.

Public Member Functions

 PolygonTester ()
 Constructor.
bool init (VectorGraphic **aVectorGraphics, char **aVectorGraphicNames, int aVectorGraphicCount, Renderer **aFillers, char **aFillerNames, int aFillerCount)
 Initializer.
 ~PolygonTester ()
 Destructor.
int getIterationCount ()
 Returns the iteration count of the tester.
void setIterationCount (int aIterationCount)
 Sets the iteration count for each test. The default value is 1000.
void setPivot (const VECTOR2D &aPivot)
 Sets the pivot (rotation center) for the polygon tester.
void setMovement (const VECTOR2D &aMovement)
 Sets the movement, i.e. the change of translation per tick for the tester.
void setRotationSpeed (RATIONAL aRotationSpeed)
 Sets the rotation speed, i.e. the change of rotation per tick for the tester.
void setScale (RATIONAL aScale)
 Sets the scale for the transformations.
void setScale (RATIONAL aScale, int aVectorGraphic)
 Sets the scale for the transformation of the given graphic.
void runTest (RenderTargetWrapper *aTarget)
 Runs one iteration of the test. This renders the graphic to aTarget.
int getTestCount ()
 Returns the amount of tests done.
int getFillerCount ()
 Returns the total amount of fillers.
int getVectorGraphicCount ()
 Returns the total amount of vector graphics.
int getTiming (int aIndex)
 Returns the timing for a test at given index.
int getCount (int aIndex)
 Returns the count for a test at given index.
bool isReady ()
 Returns true if the test is finsihed.
const char * getVectorGraphicName (int aIndex)
 Returns the vector graphic name for a test at given index.
const char * getFillerName (int aIndex)
 Returns the filler name for a test at given index.
VectorGraphicgetVectorGraphic (int aIndex)
 Returns the vector graphic for a test at given index.
RenderergetFiller (int aIndex)
 Returns the filler for a test at given index.
bool saveResults (const char *aFileName)
 Writes the results of the tests to a file with given name.
void restart ()
 Restarts the tests.

Protected Member Functions

void updateTransformation (MATRIX2D &aTransformation)
 Updates the transformation and calculates it to a matrix.
void beginTest (int aTestIndex)
 Begins a new test.

Protected Attributes

VectorGraphic ** mVectorGraphics
 The vector graphics to be used in the test.
char ** mVectorGraphicNames
 The names for the vector graphics.
int mVectorGraphicCount
 Amount of vector graphics.
Renderer ** mFillers
 The polygon fillers being tested.
char ** mFillerNames
 The names of the fillers.
int mFillerCount
 Amount of fillers.
int mIterationCount
 Amount of iterations per test.
int * mTestTimings
 Test result array.
int * mTestCounts
 Count of ticks per test.
int mCurrentTest
 Current test number.
int mCurrentIteration
 Current iteration count.
VECTOR2D mPivot
 Pivot for the rotations.
VECTOR2D mMovement
 Movement, i.e. the change of rotation per tick for the tester.
RATIONAL mRotationSpeed
 Rotation speed, i.e. the change of rotation per tick for the tester.
VECTOR2D mCurrentTranslation
 Current translation.
RATIONAL mCurrentRotation
 Current rotation.
RATIONAL mScale
 Global scale factor.
RATIONAL * mScales
 Scale factors for the vector graphics.


Detailed Description

Runs the tests for different polygon filler implementations.


Constructor & Destructor Documentation

PolygonTester::PolygonTester  ) 
 

Constructor.

PolygonTester::~PolygonTester  ) 
 

Destructor.


Member Function Documentation

void PolygonTester::beginTest int  aTestIndex  )  [protected]
 

Begins a new test.

int PolygonTester::getCount int  aIndex  ) 
 

Returns the count for a test at given index.

Renderer * PolygonTester::getFiller int  aIndex  ) 
 

Returns the filler for a test at given index.

int PolygonTester::getFillerCount  )  [inline]
 

Returns the total amount of fillers.

const char * PolygonTester::getFillerName int  aIndex  ) 
 

Returns the filler name for a test at given index.

int PolygonTester::getIterationCount  )  [inline]
 

Returns the iteration count of the tester.

int PolygonTester::getTestCount  ) 
 

Returns the amount of tests done.

int PolygonTester::getTiming int  aIndex  ) 
 

Returns the timing for a test at given index.

VectorGraphic * PolygonTester::getVectorGraphic int  aIndex  ) 
 

Returns the vector graphic for a test at given index.

int PolygonTester::getVectorGraphicCount  )  [inline]
 

Returns the total amount of vector graphics.

const char * PolygonTester::getVectorGraphicName int  aIndex  ) 
 

Returns the vector graphic name for a test at given index.

bool PolygonTester::init VectorGraphic **  aVectorGraphics,
char **  aVectorGraphicNames,
int  aVectorGraphicCount,
Renderer **  aFillers,
char **  aFillerNames,
int  aFillerCount
 

Initializer.

Note that the ownership of aVectorGraphics, aFillers, aVectorGraphicNames and aFillerNames is transferred.

bool PolygonTester::isReady  ) 
 

Returns true if the test is finsihed.

void PolygonTester::restart  ) 
 

Restarts the tests.

void PolygonTester::runTest RenderTargetWrapper aTarget  ) 
 

Runs one iteration of the test. This renders the graphic to aTarget.

bool PolygonTester::saveResults const char *  aFileName  ) 
 

Writes the results of the tests to a file with given name.

void PolygonTester::setIterationCount int  aIterationCount  ) 
 

Sets the iteration count for each test. The default value is 1000.

void PolygonTester::setMovement const VECTOR2D &  aMovement  ) 
 

Sets the movement, i.e. the change of translation per tick for the tester.

void PolygonTester::setPivot const VECTOR2D &  aPivot  ) 
 

Sets the pivot (rotation center) for the polygon tester.

void PolygonTester::setRotationSpeed RATIONAL  aRotationSpeed  ) 
 

Sets the rotation speed, i.e. the change of rotation per tick for the tester.

void PolygonTester::setScale RATIONAL  aScale,
int  aVectorGraphic
 

Sets the scale for the transformation of the given graphic.

void PolygonTester::setScale RATIONAL  aScale  ) 
 

Sets the scale for the transformations.

void PolygonTester::updateTransformation MATRIX2D &  aTransformation  )  [protected]
 

Updates the transformation and calculates it to a matrix.


Member Data Documentation

int PolygonTester::mCurrentIteration [protected]
 

Current iteration count.

RATIONAL PolygonTester::mCurrentRotation [protected]
 

Current rotation.

int PolygonTester::mCurrentTest [protected]
 

Current test number.

VECTOR2D PolygonTester::mCurrentTranslation [protected]
 

Current translation.

int PolygonTester::mFillerCount [protected]
 

Amount of fillers.

char** PolygonTester::mFillerNames [protected]
 

The names of the fillers.

Renderer** PolygonTester::mFillers [protected]
 

The polygon fillers being tested.

int PolygonTester::mIterationCount [protected]
 

Amount of iterations per test.

VECTOR2D PolygonTester::mMovement [protected]
 

Movement, i.e. the change of rotation per tick for the tester.

VECTOR2D PolygonTester::mPivot [protected]
 

Pivot for the rotations.

RATIONAL PolygonTester::mRotationSpeed [protected]
 

Rotation speed, i.e. the change of rotation per tick for the tester.

RATIONAL PolygonTester::mScale [protected]
 

Global scale factor.

RATIONAL* PolygonTester::mScales [protected]
 

Scale factors for the vector graphics.

int* PolygonTester::mTestCounts [protected]
 

Count of ticks per test.

int* PolygonTester::mTestTimings [protected]
 

Test result array.

int PolygonTester::mVectorGraphicCount [protected]
 

Amount of vector graphics.

char** PolygonTester::mVectorGraphicNames [protected]
 

The names for the vector graphics.

VectorGraphic** PolygonTester::mVectorGraphics [protected]
 

The vector graphics to be used in the test.


The documentation for this class was generated from the following files:
Generated on Fri Aug 3 00:44:39 2007 for Scanline edge-flag algorithm for antialiasing by  doxygen 1.4.6-NO