OGRE: Ogre::LinearControllerFunction Class Reference

| OGRE 14.5 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Ogre::LinearControllerFunction Class Reference
Core » Animation

Predefined controller function based on linear function interpolation. More...

`#include <OgrePredefinedControllers.h>`

Inheritance diagram for Ogre::LinearControllerFunction:
[legend]

## Public Member Functions
| LinearControllerFunction (const std::vector< Real > &keys, const std::vector< Real > &values, Real frequency=1, bool deltaInput=true)
float | calculate (float source) override
Public Member Functions inherited from Ogre::ControllerFunction< float >
| ControllerFunction (bool deltaInput)
| Constructor.
virtual | ~ControllerFunction ()

## Static Public Member Functions
static ControllerFunctionRealPtr | create (const std::vector< Real > &keys, const std::vector< Real > &values, Real frequency=1, bool deltaInput=true)
| Constructor, requires keys and values of the function to interpolate.

## Detailed Description

Predefined controller function based on linear function interpolation.

## Constructor & Destructor Documentation

## ◆ LinearControllerFunction()

Ogre::LinearControllerFunction::LinearControllerFunction | ( | const std::vector< Real > & | keys,
|  | const std::vector< Real > & | values,
|  | Real | frequency = 1,
|  | bool | deltaInput = true )

Deprecated
  use create()

## Member Function Documentation

## ◆ create()

ControllerFunctionRealPtr Ogre::LinearControllerFunction::create | ( | const std::vector< Real > & | keys,
|  | const std::vector< Real > & | values,
|  | Real | frequency = 1,
|  | bool | deltaInput = true )
| inlinestatic

Constructor, requires keys and values of the function to interpolate.

For simplicity and compatibility with the predefined ControllerValue classes the function domain must be [0,1]. However, you can use the frequency parameter to rescale the domain to a different range.

Parameters

  keys | the x-values of the function sampling points. Value range is [0,1]. Must include at least the keys 0 and 1.
  values | the function values f(x) of the function. order must match keys
  frequency | the speed of the evaluation in cycles per second
  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.

Note
  there must be the same amount of keys and values

## ◆ calculate()

float Ogre::LinearControllerFunction::calculate | ( | float | source | ) |
| overridevirtual

Implements Ogre::ControllerFunction< float >.

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

- OgrePredefinedControllers.h