Murl Engine Lua Addon API  Version 1.0 beta
Murl.Graph.ITimeController

The ITimeController interface.

This interface provides a way to automatically manipulate individual properties of a given Graph::INode by via individual Graph::ITimeEvaluator objects created upon initialization.

The Graph::TimeController class implementing this interface provides a default implementation that can be used to add individual custom Graph::ITimeEvaluator objects for the purpose of manipulating different node properties.

The Graph::AnimationTimeController class is a specialized implementation that acts on a given Resource::IAnimation object, with different evaluators for each individual type of key frame defined in the animation.

See Graph::Node for details on creating controllers via an XML scene graph description.


Table members

Methods


SetTimeShift(timeShift)

Set the time shift value used for evaluation.

Boolean SetTimeShift(Number timeShift)

Parameters
timeShiftThe time shift value.
Returns
Boolean true if successful.

GetTimeShift()

Get the time shift value used for evaluation.

Number GetTimeShift()

Returns
Number The time shift value.

SetTimeOffset(timeOffset)

Set the time offset value used for evaluation. A positive value represents an actual controller start time after the given input time t, which results in an already started animation for t=0. Negative values result in a delay before the animation is started (at t=0 the controller's shifted time is still negative and has has not reached its actual start time). By default, the time shift value is 0.

Boolean SetTimeOffset(Number timeOffset)

Parameters
timeOffsetThe time offset value.
Returns
Boolean true if successful.

GetTimeOffset()

Get the time offset value used for evaluation.

Number GetTimeOffset()

Returns
Number The time offset value.

SetTimeScale(timeScale)

Set the time scale value used for evaluation. By default, the time scale value equals 1.0. Values less than 1.0 result in a reduced animation time, for values higher than 1.0 the animation is running faster than normal. Time scaling is applied before shifting, so the time scale value does not affect a given time shift value.

Boolean SetTimeScale(Number timeScale)

Parameters
timeScaleThe time scale value.
Returns
Boolean true if successful.

GetTimeScale()

Get the time scale value used for evaluation.

Number GetTimeScale()

Returns
Number The time scale value.

SetTimelineUnitEnabled(unit, enabled)

Activate/deactivate processing of a timeline at a given unit.

Boolean SetTimelineUnitEnabled(Integer unit, Boolean enabled)

Parameters
unitThe timeline unit.
enabledIf true, a timeline at the given unit is processed.
Returns
Boolean true if successful.

IsTimelineUnitEnabled(unit)

Check if a given timeline unit is used.

Boolean IsTimelineUnitEnabled(Integer unit)

Parameters
unitThe timeline unit.
Returns
Boolean true if used.

SetBlendFactorNormalizationEnabled(enabled)

Enable/disable blend factor normalization. If set to true, the blend factors of all currently relevant timelines are summed up, and each of them is divided by that sum so that the total sum of the blend factors equals 1.

Boolean SetBlendFactorNormalizationEnabled(Boolean enabled)

Parameters
enabledIf true, normalization is enabled.
Returns
Boolean true if successful.

IsBlendFactorNormalizationEnabled()

Check if blend factor normalization is enabled.

Boolean IsBlendFactorNormalizationEnabled()

Returns
Boolean true if enabled.

SetResponseGroupMask(mask)

Set the active response groups for this controller. An active controller can be configured to only react on timelines belonging to one or more specific groups. Group assignment is done via a UInt32 bit mask, allowing up to 32 individual groups. The controller processes a given timeline only if at least one specific group bit is set both in the timeline's trigger mask and the controller's response mask. By default, a controller reacts on all trigger groups (the mask is set to 0xffffffff). See Graph::ITimeline::SetTriggerGroupMask().

Boolean SetResponseGroupMask(Integer mask)

Parameters
maskThe response group bit mask.
Returns
Boolean true if successful.

GetResponseGroupMask()

Get the active response groups for this controller.

Integer GetResponseGroupMask()

Returns
Integer The bit mask specifying active response groups.