VizKit
3.3.7
|
Interpolation between values 0.0 and 1.0. More...
#include <VisualInterpolation.h>
Public Member Functions | |
VisualInterpolation (InterpolationType anInterpolationType=kLinearInterpolation) | |
The constructor. | |
~VisualInterpolation () | |
The destructor. | |
VisualInterpolation (const VisualInterpolation &other) | |
Copy constructor. | |
VisualInterpolation & | operator= (const VisualInterpolation &other) |
Assignment operator. | |
double | getValueAtPosition (double position) const |
Returns the computed value at a specific position. | |
void | setType (InterpolationType anInterpolationType) |
Sets the type of interpolation. | |
Static Public Member Functions | |
static double | getRandomValue (void) |
Returns a random value between 0.0 and 1.0. | |
Private Member Functions | |
void | copy (const VisualInterpolation &other) |
Copy method for assignment operator and copy constructor. | |
void | calcDistance () |
Internal method to compute the distance between start and end value. | |
Private Attributes | |
double | distance |
The calculated distance between start and end value. | |
InterpolationType | interpolationType |
The type of interpolation used (linear, sinusoidal). | |
Static Private Attributes | |
static const double | startValue = 0.0 |
The start value. | |
static const double | endValue = 1.0 |
The end value. |
Interpolation between values 0.0 and 1.0.
VisualInterpolation::VisualInterpolation | ( | InterpolationType | anInterpolationType = kLinearInterpolation | ) |
The constructor.
anInterpolationType | Default interpolation is linear. |
The destructor.
VisualInterpolation::VisualInterpolation | ( | const VisualInterpolation & | other | ) |
Copy constructor.
other | Another VisualInterpolation. |
void VisualInterpolation::calcDistance | ( | ) | [private] |
Internal method to compute the distance between start and end value.
void VisualInterpolation::copy | ( | const VisualInterpolation & | other | ) | [private] |
Copy method for assignment operator and copy constructor.
other | Another VisualInterpolation. |
double VisualInterpolation::getRandomValue | ( | void | ) | [static] |
Returns a random value between 0.0 and 1.0.
double VisualInterpolation::getValueAtPosition | ( | double | position | ) | const |
Returns the computed value at a specific position.
position | The position of the interpolation. Position can be between 0.0 and 1.0. |
VisualInterpolation & VisualInterpolation::operator= | ( | const VisualInterpolation & | other | ) |
Assignment operator.
other | Another VisualInterpolation. |
void VisualInterpolation::setType | ( | InterpolationType | anInterpolationType | ) |
Sets the type of interpolation.
anInterpolationType | The type of interpolation. |
double VizKit::VisualInterpolation::distance [private] |
The calculated distance between start and end value.
const double VisualInterpolation::endValue = 1.0 [static, private] |
The end value.
The type of interpolation used (linear, sinusoidal).
const double VisualInterpolation::startValue = 0.0 [static, private] |
The start value.