Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

XWalkMC::ParameterTransition Class Reference

#include <XWalkMC.h>

Inheritance diagram for XWalkMC::ParameterTransition:

Detailed Description

Definition at line 114 of file XWalkMC.h.

List of all members.

Public Member Functions

 ParameterTransition (const plist::PrimitiveBase &srcVal, plist::PrimitiveBase &dstVal, std::set< ParameterTransition * > &activeTrans, unsigned int dur)
 constructor, specify source to be monitored, destination to be kept in sync, a collection to be updated when transitions are in progress, and desired duration of transitions
 ~ParameterTransition ()
 destructor
virtual void plistValueChanged (const plist::PrimitiveBase &)
 This will be called whenever a plist you have registered with is changed.
bool update (unsigned int curTime)

Public Attributes

const plist::PrimitiveBasesrc
 the parameter which is being monitored for changes (a member of the superclass of XWalkMC)
plist::PrimitiveBasedst
 the parameter which is updated with smoothly transitioning values based on src
std::set< ParameterTransition * > & active
 collection which ParameterTransition will insert itself when src has been changed and transition is in progress
float curd
 current velocity of parameter (d for derivative)
float cura
 current acceleration of parameter
unsigned int startTime
 time at which src was changed
unsigned int duration
 how much time to use in transitioning (cura is then based on difference between src and dst, and this)
unsigned int lastUpdate
 time of last call to update() or reset()
bool decelerate
 set to true if in the deceleration phase of transitioning

Constructor & Destructor Documentation

XWalkMC::ParameterTransition::ParameterTransition ( const plist::PrimitiveBase srcVal,
plist::PrimitiveBase dstVal,
std::set< ParameterTransition * > &  activeTrans,
unsigned int  dur 
)

constructor, specify source to be monitored, destination to be kept in sync, a collection to be updated when transitions are in progress, and desired duration of transitions

Definition at line 117 of file XWalkMC.h.

XWalkMC::ParameterTransition::~ParameterTransition (  ) 

destructor

Definition at line 124 of file XWalkMC.h.


Member Function Documentation

void XWalkMC::ParameterTransition::plistValueChanged ( const plist::PrimitiveBase pl  )  [virtual]

This will be called whenever a plist you have registered with is changed.

pl is const to help you avoid infinite recursion from an accidental modification of pl's value -- use a const cast if you're sure you know what you're doing

Implements plist::PrimitiveListener.

Definition at line 1126 of file XWalkMC.cc.

bool XWalkMC::ParameterTransition::update ( unsigned int  curTime  ) 

Definition at line 1134 of file XWalkMC.cc.


Member Data Documentation

collection which ParameterTransition will insert itself when src has been changed and transition is in progress

Definition at line 130 of file XWalkMC.h.

Referenced by plistValueChanged().

current acceleration of parameter

Definition at line 132 of file XWalkMC.h.

Referenced by plistValueChanged(), and update().

current velocity of parameter (d for derivative)

Definition at line 131 of file XWalkMC.h.

Referenced by plistValueChanged(), and update().

set to true if in the deceleration phase of transitioning

Definition at line 136 of file XWalkMC.h.

Referenced by plistValueChanged(), and update().

the parameter which is updated with smoothly transitioning values based on src

Definition at line 129 of file XWalkMC.h.

Referenced by ParameterTransition(), plistValueChanged(), and update().

how much time to use in transitioning (cura is then based on difference between src and dst, and this)

Definition at line 134 of file XWalkMC.h.

Referenced by plistValueChanged(), and update().

time of last call to update() or reset()

Definition at line 135 of file XWalkMC.h.

Referenced by plistValueChanged(), and update().

the parameter which is being monitored for changes (a member of the superclass of XWalkMC)

Definition at line 128 of file XWalkMC.h.

Referenced by ParameterTransition(), plistValueChanged(), update(), and ~ParameterTransition().

time at which src was changed

Definition at line 133 of file XWalkMC.h.

Referenced by plistValueChanged(), and update().


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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:19 2016 by Doxygen 1.6.3