sonus::Integrator Class Reference

#include <Integrator.h>

List of all members.

Static Public Member Functions

static void getTransformAndScaleFactor (Level2D *level, Vector2D *destinationOrigin, double maxValue, Vector2D *transformationVector, double *scaleFactor)
static void transform (Vector2D *value, Vector2D *transformationVector, double scaleFactor)
static void reTransform (Vector2D *value, Vector2D *transformationVector, double scaleFactor)
static Vector2DtransformInvertY (Vector2D *value, Vector2D *transformationVector, double scaleFactor)
static Vector2DreTransformInvertY (Vector2D *value, Vector2D *transformationVector, double scaleFactor)
static Vector2DtransformInvertX (Vector2D *value, Vector2D *transformationVector, double scaleFactor)
static Vector2DreTransformInvertX (Vector2D *value, Vector2D *transformationVector, double scaleFactor)
static double getAngleFromUnifiedVector (Vector2D v)
static double getAngleFromVector (Vector2D v)
static double getFixedAngleFromVector (Vector2D v, double threshold)


Detailed Description

sonus::Integrator

Class for integration / migration of level data into single modules. Contains only static methods. The raw data of a level based on a SVG must be transformed so every module can work with the level because the modules have different number workspaces. If a module changes level data it needs to retransform those values. Besides that the class has some other utility functions

filename: Integrator.h

Date:
2008/08/21 12:54
Author:
Alexander Lawrence
Version:
1.0

Member Function Documentation

static void sonus::Integrator::getTransformAndScaleFactor ( Level2D level,
Vector2D destinationOrigin,
double  maxValue,
Vector2D transformationVector,
double *  scaleFactor 
) [inline, static]

Calculates a transformation vector and scale factor to transform level data into module workspace and scaling. It is assumed that the module workspace is cubic. For example your level has its origin at (0, 0) and a max value of 50. So the level workspace goes from (-50, -50) to (50, 50). Assuming your module has its origin at (10, 10) and also a max value at 50. So its workspace goes from (-40, -40) to (60, 60). So the transformation vector will be (10, 10) and the scale factor will be 1.

Parameters:
level the level (data)
destinationOrigin the origin coordinates of the module workspace
maxValue the max value of the workspace
transformationVector the output transformation vector
scaleFactor the output scale factor

static void sonus::Integrator::transform ( Vector2D value,
Vector2D transformationVector,
double  scaleFactor 
) [inline, static]

Transforms a vector by given transformation vector and scale factor.

Parameters:
value the vector which will be transformed
transformationVector the used transformation vector
scaleFactor the used scale factor
See also:
Integrator::getTransformAndScaleFactor()

static void sonus::Integrator::reTransform ( Vector2D value,
Vector2D transformationVector,
double  scaleFactor 
) [inline, static]

Invert transforms a vector by given transformation vector and scale factor.

Parameters:
value the vector which will be retransformed
transformationVector the used transformation vector
scaleFactor the used scale factor
See also:
Integrator::getTransformAndScaleFactor()

static Vector2D* sonus::Integrator::transformInvertY ( Vector2D value,
Vector2D transformationVector,
double  scaleFactor 
) [inline, static]

Transforms a vector into a new vector by given transformation vector and scale factor inverts the y value.

Parameters:
value the original vector
transformationVector the used transformation vector
scaleFactor the used scale factor
Returns:
the transformed vector
See also:
Integrator::getTransformAndScaleFactor()

static Vector2D* sonus::Integrator::reTransformInvertY ( Vector2D value,
Vector2D transformationVector,
double  scaleFactor 
) [inline, static]

Invert transforms a vector into a new vector by given transformation vector and scale factor and inverts the y value.

Parameters:
value the original vector
transformationVector the used transformation vector
scaleFactor the used scale factor
Returns:
the retransformed vector
See also:
Integrator::getTransformAndScaleFactor()

static Vector2D* sonus::Integrator::transformInvertX ( Vector2D value,
Vector2D transformationVector,
double  scaleFactor 
) [inline, static]

Transforms a vector into a new vector by given transformation vector and scale factor and inverts the x value.

Parameters:
value the original vector
transformationVector the used transformation vector
scaleFactor the used scale factor
Returns:
the transformed vector
See also:
Integrator::getTransformAndScaleFactor()

static Vector2D* sonus::Integrator::reTransformInvertX ( Vector2D value,
Vector2D transformationVector,
double  scaleFactor 
) [inline, static]

Invert transforms a vector into a new vector by given transformation vector and scale factor and inverts the x value.

Parameters:
value the original vector
transformationVector the used transformation vector
scaleFactor the used scale factor
Returns:
the retransformed vector
See also:
Integrator::getTransformAndScaleFactor()

static double sonus::Integrator::getAngleFromUnifiedVector ( Vector2D  v  )  [inline, static]

Calculates an angle from an unified vector

Parameters:
v input vector
Returns:
angle in degrees

static double sonus::Integrator::getAngleFromVector ( Vector2D  v  )  [inline, static]

Calculates an angle from a vector. The copied vector will unified.

Parameters:
v input vector
Returns:
angle in degrees
See also:
Integrator::getAngleFromUnifiedVector()

static double sonus::Integrator::getFixedAngleFromVector ( Vector2D  v,
double  threshold 
) [inline, static]

Calculates a fixed angle from a vector. The angle will only contain fixed values depending on the threshold.

Parameters:
v input vector
threshold threshold value for value steps
Returns:
angle in degrees
See also:
Integrator::getAngleFromUnifiedVector()


The documentation for this class was generated from the following file:
Generated on Tue Aug 26 12:26:54 2008 for sonus by  doxygen 1.5.4