VizKit  3.3.7
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
VizKit::VisualInterpolation Class Reference

Interpolation between values 0.0 and 1.0. More...

#include <VisualInterpolation.h>

List of all members.

Public Member Functions

 VisualInterpolation (InterpolationType anInterpolationType=kLinearInterpolation)
 The constructor.
 ~VisualInterpolation ()
 The destructor.
 VisualInterpolation (const VisualInterpolation &other)
 Copy constructor.
VisualInterpolationoperator= (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.

Detailed Description

Interpolation between values 0.0 and 1.0.


Constructor & Destructor Documentation

The constructor.

Parameters:
anInterpolationTypeDefault interpolation is linear.

The destructor.

Copy constructor.

Parameters:
otherAnother VisualInterpolation.

Member Function Documentation

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.

Parameters:
otherAnother VisualInterpolation.
double VisualInterpolation::getRandomValue ( void  ) [static]

Returns a random value between 0.0 and 1.0.

Returns:
A random value between 0.0 and 1.0.
double VisualInterpolation::getValueAtPosition ( double  position) const

Returns the computed value at a specific position.

Parameters:
positionThe position of the interpolation. Position can be between 0.0 and 1.0.
Returns:
The interpolated value.
VisualInterpolation & VisualInterpolation::operator= ( const VisualInterpolation other)

Assignment operator.

Parameters:
otherAnother VisualInterpolation.
void VisualInterpolation::setType ( InterpolationType  anInterpolationType)

Sets the type of interpolation.

Parameters:
anInterpolationTypeThe type of interpolation.
Remarks:
Linear and sinusoidal interpolation are possible.

Member Data Documentation

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.


The documentation for this class was generated from the following files:

Generated on Sun May 3 2015 20:26:31 for VizKit by doxygen 1.8.0