Murl Engine Lua Addon API  Version 1.0 beta
Murl.Logic.Animation.SInt32

A template class to create an ITimeline object with key animation capabilities.


Table members

Inherited


Murl.Logic.IAppTimeline
Murl.Logic.Timeline

Typedefs


Murl.Logic.Animation.SInt32.Key

Type definition of the animation key data type.

Returns
Murl.Logic.AnimationKey.SInt32

Murl.Logic.Animation.SInt32.Ptr

The Animation shared pointer type.

Returns
Murl.SharedPointer.LogicAnimationSInt32


Functions


Murl.Logic.Animation.SInt32.new()

Create an Animation object.

Murl.SharedPointer.LogicAnimationSInt32 new()

Returns
Murl.SharedPointer.LogicAnimationSInt32 The Animation shared pointer.

Murl.Logic.Animation.SInt32.Create()

Create an Animation object.

Murl.SharedPointer.LogicAnimationSInt32 Create()

Returns
Murl.SharedPointer.LogicAnimationSInt32 The Animation shared pointer.


Methods


AddKey(time, value)

Add a key to the animation key array with linear interpolation.

Murl.Logic.AnimationKey.SInt32 AddKey(Number time, Integer value)

Parameters
timeThe time for the key in seconds.
valueThe value for the key.
Returns
Murl.Logic.AnimationKey.SInt32 The added key.

AddKey(time, value, interpolation)

Add a key to the animation key array.

Murl.Logic.AnimationKey.SInt32 AddKey(Number time, Integer value, Murl.IEnums.Interpolation interpolation)

Parameters
timeThe time for the key in seconds.
valueThe value for the key.
interpolationThe interpolation type.
Returns
Murl.Logic.AnimationKey.SInt32 The added key.

AddKey(key)

Add a key to the animation key array.

Murl.Logic.AnimationKey.SInt32 AddKey(Murl.Logic.AnimationKey.SInt32 key)

Parameters
keyThe key to copy and add.
Returns
Murl.Logic.AnimationKey.SInt32 The added key.

SetKey(index, time, value)

Set a key in the animation key array with linear interpolation.

Murl.Logic.AnimationKey.SInt32 SetKey(Integer index, Number time, Integer value)

Parameters
indexThe zero-based index of the key to set.
timeThe time for the key in seconds.
valueThe value for the key.
Returns
Murl.Logic.AnimationKey.SInt32 The set key.

SetKey(index, time, value, interpolation)

Set a key in the animation key array.

Murl.Logic.AnimationKey.SInt32 SetKey(Integer index, Number time, Integer value, Murl.IEnums.Interpolation interpolation)

Parameters
indexThe zero-based index of the key to set.
timeThe time for the key in seconds.
valueThe value for the key.
interpolationThe interpolation type.
Returns
Murl.Logic.AnimationKey.SInt32 The set key.

SetKey(index, key)

Set a key in the animation key array.

Murl.Logic.AnimationKey.SInt32 SetKey(Integer index, Murl.Logic.AnimationKey.SInt32 key)

Parameters
indexThe zero-based index of the key to set.
keyThe key to copy and set.
Returns
Murl.Logic.AnimationKey.SInt32 The added key.

InsertKey(index, time, value)

Insert a key to the animation key array with linear interpolation.

Murl.Logic.AnimationKey.SInt32 InsertKey(Integer index, Number time, Integer value)

Parameters
indexThe zero-based index of the key to insert.
timeThe time for the key in seconds.
valueThe value for the key.
Returns
Murl.Logic.AnimationKey.SInt32 The inserted key.

InsertKey(index, time, value, interpolation)

Insert a key to the animation key array.

Murl.Logic.AnimationKey.SInt32 InsertKey(Integer index, Number time, Integer value, Murl.IEnums.Interpolation interpolation)

Parameters
indexThe zero-based index of the key to insert.
timeThe time for the key in seconds.
valueThe value for the key.
interpolationThe interpolation type.
Returns
Murl.Logic.AnimationKey.SInt32 The inserted key.

InsertKey(index, key)

Insert a key to the animation key array.

Murl.Logic.AnimationKey.SInt32 InsertKey(Integer index, Murl.Logic.AnimationKey.SInt32 key)

Parameters
indexThe zero-based index of the key to insert.
keyThe key to copy and insert.
Returns
Murl.Logic.AnimationKey.SInt32 The inserted key.

GetNumberOfKeys()

Get the number of keys.

Integer GetNumberOfKeys()

Returns
Integer The number of keys.

GetKey(index)

Get a key from the animation key array.

Murl.Logic.AnimationKey.SInt32 GetKey(Integer index)

Parameters
indexThe zero-based index of the key.
Returns
Murl.Logic.AnimationKey.SInt32 The key at the specified index.

ModifyKeyTime(index, time)

Modify the time of a key in the animation key array.

Boolean ModifyKeyTime(Integer index, Number time)

Parameters
indexThe zero-based index of the key to modify.
timeThe time for the key in seconds.
Returns
Boolean true if successful, false if the index is out of range.

ModifyKeyValue(index, value)

Modify the value of a key in the animation key array.

Boolean ModifyKeyValue(Integer index, Integer value)

Parameters
indexThe zero-based index of the key to modify.
valueThe value for the key.
Returns
Boolean true if successful, false if the index is out of range.

ModifyKeyInterpoation(index, interpolation)

Modify the interpolation of a key in the animation key array.

Boolean ModifyKeyInterpoation(Integer index, Murl.IEnums.Interpolation interpolation)

Parameters
indexThe zero-based index of the key to modify.
interpolationThe interpolation type.
Returns
Boolean true if successful, false if the index is out of range.

SetNumberOfKeys(n)

Set the number of keys.

Boolean SetNumberOfKeys(Integer n)

Parameters
nThe number of keys.
Returns
Boolean true if successful.

RemoveKey(index, count)

Remove keys at a given position.

Boolean RemoveKey(Integer index, Integer count)

Parameters
indexThe zero-based index from where to remove the keys.
countThe number of keys to remove.
Returns
Boolean true if successful.

EmptyKeys()

Empty the keys, but keep the underlying storage.

EmptyKeys()


ClearKeys()

Clear the keys and remove the underlying storage.

ClearKeys()


SetIntermediateKeys(midTime, midValue, endTime, endValue, interpolation)

Set keys for an intermediate time and value. Enter an interpolation curve at a variable time with a specified value.
Setup key 0 with start time zero and key 1 with the given end time; the mid value is the value at mid time using the given interpolation.
The keys are typically used with Start(midTime, endTime).

SetIntermediateKeys(Number midTime, Integer midValue, Number endTime, Integer endValue, Murl.IEnums.Interpolation interpolation)

Parameters
midTimeThe time between zero and the endTime.
midValueThe value at mid time.
endTimeThe end time.
endValueThe value at end time.
interpolationThe interpolation type.

OnEvaluateAnimation(currentValue)

Called if the current value is set. This method is empty and can be overwritten.

OnEvaluateAnimation(Integer currentValue)

Parameters
currentValueThe current value.

GetCurrentValue()

Get the current value.

Integer GetCurrentValue()

Returns
Integer The current value.

StartForward()

Start the timeline forward. The first animation array key is the start time, the last animation array key is the end time.

Boolean StartForward()

Returns
Boolean true if successful.

StartBackward()

Start the timeline backward. The last animation array key is the start time, the first animation array key is the end time.

Boolean StartBackward()

Returns
Boolean true if successful.

SetStartTimeFromKey(index)

Set the timeline start time from a specified key index.

Boolean SetStartTimeFromKey(Integer index)

Parameters
indexThe zero-based index to the mKeys array.
Returns
Boolean true if successful, false if index is out of range.

SetEndTimeFromKey(index)

Set the timeline end time from a specified key index.

Boolean SetEndTimeFromKey(Integer index)

Parameters
indexThe zero-based index to the mKeys array.
Returns
Boolean true if successful, false if index is out of range.

SetLoopStartTimeFromKey(index)

Set the timeline loop start time from a specified key index.

Boolean SetLoopStartTimeFromKey(Integer index)

Parameters
indexThe zero-based index to the mKeys array.
Returns
Boolean true if successful, false if index is out of range.

SetLoopEndTimeFromKey(index)

Set the timeline loop end time from a specified key index.

Boolean SetLoopEndTimeFromKey(Integer index)

Parameters
indexThe zero-based index to the mKeys array.
Returns
Boolean true if successful, false if index is out of range.

HasPassedTimeFromKey(index)

Check if the current time has passed the time from a specified key index. Does not consider loops, for evaluating loops see ITimeline::HasPassedLoop().

Boolean HasPassedTimeFromKey(Integer index)

Parameters
indexThe zero-based index to the mKeys array.
Returns
Boolean true if the current time has passed the key time within the most recent tick.

IsOnTimeFromKey(index)

Check if the current time is the time from a specified key index.

Boolean IsOnTimeFromKey(Integer index)

Parameters
indexThe zero-based index to the mKeys array.
Returns
Boolean true if the current time is the key time.

Reset()

Reset the animation.

Reset()