THuiAverageMappingFunction Class Reference

class THuiAverageMappingFunction : public MHuiMappingFunction

Weighted average function between two other mapping functions. By default calculates the average of the two functions.

Inherits from

Constructor & Destructor Documentation

THuiAverageMappingFunction(MHuiMappingFunction *, MHuiMappingFunction *)

IMPORT_CTHuiAverageMappingFunction(MHuiMappingFunction *aFunc1 = 0,
MHuiMappingFunction *aFunc2 = 0
)

Constructor.

Parameters

MHuiMappingFunction * aFunc1 = 0Function 1.
MHuiMappingFunction * aFunc2 = 0Function 2.

Member Functions Documentation

MapValue(TReal32, TInt)

IMPORT_C TReal32MapValue(TReal32aValue,
TIntaMode
)const [virtual]

Perform the mapping. Defines a function y = f(x, mode).

Implement this method that calculates a output value for a timed value based on the input value and a component/mode parameter.

For example the aValue input could be an angle, and the aMode could be a X or Y component enumeration, then the MapValue could calculate return a x or y position on a curve path.

Parameters

TReal32 aValueUnmapped value.
TInt aModeMapping mode used for mapping this value.

MappingFunctionChanged()

IMPORT_C TBoolMappingFunctionChanged()const [virtual]

Determines whether the mapping function has changed since the last call to MHuiMappingFunction::MappingFunctionClearChanged().

By default, mapping functions themselves are assumed to be constant (not changing over time).

MappingFunctionClearChanged()

IMPORT_C voidMappingFunctionClearChanged()[virtual]

Clears the change flags of the mapping function. This is called by the refresh loop after a frame has been fully drawn.

Member Data Documentation

THuiTimedValue iFactor

THuiTimedValue iFactor

Defaults to 0.5. Applied to the sum of the functions 1 and 2.

MHuiMappingFunction * iFunc1

MHuiMappingFunction *iFunc1

First mapping function to average with.

MHuiMappingFunction * iFunc2

MHuiMappingFunction *iFunc2

Second mapping function to average with.

THuiTimedValue iWeight

THuiTimedValue iWeight

Weight. 0.0 means function 2 does not contribute to the result, 1.0 means that function 1 does not contribute to the result. The default is 0.5, which means both functions contribute equally.