Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Ogre::ControllerFunction Class Reference

Subclasses of this class are responsible for performing a function on an input value for a Controller. More...

#include <OgreController.h>

Inheritance diagram for Ogre::ControllerFunction:

Ogre::AnimationControllerFunction Ogre::ScaleControllerFunction Ogre::WaveformControllerFunction List of all members.

Public Methods

 ControllerFunction (bool deltaInput)
 Constructor. More...

virtual Real calculate (Real sourceValue)=0

Protected Methods

Real getAdjustedInput (Real input)
 Gets the input value as adjusted by any delta. More...


Protected Attributes

bool mDeltaInput
 If true, function will add imput values together and wrap at 1.0 before evaluating. More...

Real mDeltaCount

Detailed Description

Subclasses of this class are responsible for performing a function on an input value for a Controller.

Remarks:
This abstract class provides the interface that needs to be supported for a custom function which can be 'plugged in' to a Controller instance, which controls some object value based on an input value. For example, the WaveControllerFunction class provided by Ogre allows you to use various waveforms to translate an input value to an output value.

You are free to create your own subclasses in order to define any function you wish.


Constructor & Destructor Documentation

Ogre::ControllerFunction::ControllerFunction bool    deltaInput [inline]
 

Constructor.

Parameters:
deltaInput  If true, signifies that the input will be a delta value such that the function should add it to an internal counter before calculating the output.


Member Function Documentation

virtual Real Ogre::ControllerFunction::calculate Real    sourceValue [pure virtual]
 

Implemented in Ogre::AnimationControllerFunction.

Real Ogre::ControllerFunction::getAdjustedInput Real    input [inline, protected]
 

Gets the input value as adjusted by any delta.

Reimplemented in Ogre::WaveformControllerFunction.


Member Data Documentation

Real Ogre::ControllerFunction::mDeltaCount [protected]
 

bool Ogre::ControllerFunction::mDeltaInput [protected]
 

If true, function will add imput values together and wrap at 1.0 before evaluating.

Copyright © 2002 by The OGRE Team