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

Time synchronized interpolation between values. More...

#include <VisualTimeline.h>

List of all members.

Public Member Functions

 VisualTimeline (bool aDebugMode=false)
 The constructor.
 ~VisualTimeline ()
 The destructor.
 VisualTimeline (const VisualTimeline &other)
 Copy constructor.
VisualTimelineoperator= (const VisualTimeline &other)
 Assignment operator.
void setStartValue (double aStartValue)
 Sets the start value of the timeline.
void setStopValue (double aStopValue)
 Sets the stop value of the timeline.
double getMinValue (void) const
 Returns the minimum value of the timeline.
double getMaxValue (void) const
 Returns the maximum value of the timeline.
double getDistance (void) const
 Returns the distance of the start and stop values of the timeline.
void setDurationInMilliseconds (uint32 numberOfMilliseconds)
 Sets the duration of the timeline.
uint32 getDurationInMilliseconds (void) const
 Returns the duration of the timeline.
void setRepeatMode (RepeatMode aRepeatMode)
 Sets the repeat mode of the timeline.
RepeatMode getRepeatMode (void) const
 Returns the current repeat mode of the timeline.
bool setCurrentValue (double newCurrValue)
 Sets the current value of the timeline.
double getCurrentValue (void) const
 Returns the current value of the timeline.
TimelineUpdateResult update (void)
 Updates the current value of the timeline.
void reset (void)
 Resets the timeline.
void start (void)
 Starts the timeline.
void stop (void)
 Stops the timeline.
void resume (void)
 Resumes the timeline at the point in time where it was stopped the last time.
void setInterpolationType (InterpolationType anInterpolationType)
 Sets the type of interpolation.
MovingDirection getMovingDirection (void) const
 Returns the moving direction (running direction) of the timeline.
void toggleMovingDirection (void)
 Toggles the current moving direction of the timeline.
void setDebugMode (bool requestedDebugMode)
 Sets the debug mode.

Static Public Member Functions

static void convertTimelineUpdateResultToString (const TimelineUpdateResult aResult, char *outString)
 Static helper function that converts a TimelineUpdateResult to the string.

Private Member Functions

void copy (const VisualTimeline &other)
 Copy method for assignment operator and copy constructor.

Private Attributes

uint32 durationInMilliseconds
 The duration of the timeline in milliseconds.
double minValue
 The minimum value.
double maxValue
 The maximum value.
double distance
 The calculated distance between start and stop value.
RepeatMode repeatMode
 The repeat mode of the timeline.
VisualItemIdentifierdurationIdentifier
 The internal identifier of the timeline.
MovingDirection movingDirection
 The moving direction of the timeline.
VisualInterpolationvisualInterpolation
 The interpolation model.
uint32 elapsedMilliseconds
 The elapsed milliseconds.
uint32 offsetMilliseconds
 Internally used offset in milliseconds.
double currentValue
 The current value as it has been evaluated the last time.
bool isStopped
 True if the timeline has been stopped, false otherwise.
bool debugMode
 True if in debug mode, false otherwise.

Detailed Description

Time synchronized interpolation between values.

Calculates timed interpolated values.


Constructor & Destructor Documentation

VisualTimeline::VisualTimeline ( bool  aDebugMode = false)

The constructor.

Parameters:
aDebugModeIf true, the timeline is in debug mode.

The destructor.

Copy constructor.

Parameters:
otherReference to another VisualTimeline.

Member Function Documentation

void VisualTimeline::convertTimelineUpdateResultToString ( const TimelineUpdateResult  aResult,
char *  outString 
) [static]

Static helper function that converts a TimelineUpdateResult to the string.

Possibly useful for debugging or tracing purposes.

Parameters:
aResultA timelineUpdateResult.
outStringThe character string value of the TimelineUpdateResult enum value.
void VisualTimeline::copy ( const VisualTimeline other) [private]

Copy method for assignment operator and copy constructor.

Parameters:
otherAnother VisualTimeline.
double VisualTimeline::getCurrentValue ( void  ) const

Returns the current value of the timeline.

Returns:
The current value of the timeline.
double VisualTimeline::getDistance ( void  ) const

Returns the distance of the start and stop values of the timeline.

Returns:
The distance of the start and stop values of the timeline.
Remarks:
The distance is never a positive value.

Returns the duration of the timeline.

Returns:
The duration of the timeline.
double VisualTimeline::getMaxValue ( void  ) const

Returns the maximum value of the timeline.

Returns:
The maximum value of the timeline.
double VisualTimeline::getMinValue ( void  ) const

Returns the minimum value of the timeline.

Returns:
The minimum value of the timeline.

Returns the moving direction (running direction) of the timeline.

Returns:
The currently moving direction (running direction) of the timeline.

Returns the current repeat mode of the timeline.

Returns:
The current repeat mode of the timeline.
VisualTimeline & VisualTimeline::operator= ( const VisualTimeline other)

Assignment operator.

Parameters:
otherReference to another VisualTimeline.
void VisualTimeline::reset ( void  )

Resets the timeline.

The timeline starts anew at start.

void VisualTimeline::resume ( void  )

Resumes the timeline at the point in time where it was stopped the last time.

bool VisualTimeline::setCurrentValue ( double  newCurrValue)

Sets the current value of the timeline.

Parameters:
newCurrValueThe value to which the timeline is supposed to jump.
Returns:
True if the new current value was outside of current min and max value range (and distance and duration were adjusted because of that).
Remarks:
The value of the timeline can be set from the outside (e.g. in case it is created new and should start with a established value).
void VisualTimeline::setDebugMode ( bool  requestedDebugMode)

Sets the debug mode.

Parameters:
requestedDebugModeThe debug mode. True turns debug mode on, false turns it off.
void VisualTimeline::setDurationInMilliseconds ( uint32  numberOfMilliseconds)

Sets the duration of the timeline.

Parameters:
numberOfMillisecondsThe number of milliseconds the timeline spans.

Sets the type of interpolation.

Parameters:
anInterpolationTypeThe requested type of interpolation.

Sets the repeat mode of the timeline.

Parameters:
aRepeatModeThe requested repeat mode.
void VisualTimeline::setStartValue ( double  aStartValue)

Sets the start value of the timeline.

Parameters:
aStartValueA start value.
void VisualTimeline::setStopValue ( double  aStopValue)

Sets the stop value of the timeline.

Parameters:
aStopValueA stop value.
void VisualTimeline::start ( void  )

Starts the timeline.

void VisualTimeline::stop ( void  )

Stops the timeline.

Toggles the current moving direction of the timeline.

Updates the current value of the timeline.

Returns:
The result of the update operation expressed as enum value.
Remarks:
Called on update of the animation.

Member Data Documentation

The current value as it has been evaluated the last time.

True if in debug mode, false otherwise.

The calculated distance between start and stop value.

The internal identifier of the timeline.

The duration of the timeline in milliseconds.

The elapsed milliseconds.

True if the timeline has been stopped, false otherwise.

The maximum value.

The minimum value.

The moving direction of the timeline.

Internally used offset in milliseconds.

The repeat mode of the timeline.

The interpolation model.


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