![]() |
Murl Engine Lua Addon API
Version 1.0 beta
|
A template class to create an ITimeline object with key animation capabilities.
Murl.Logic.IAppTimeline
Murl.Logic.Timeline
Type definition of the animation key data type.
The Animation shared pointer type.
Create an Animation object.
Murl.SharedPointer.LogicAnimationMathVector new()
Create an Animation object.
Murl.SharedPointer.LogicAnimationMathVector Create()
Add a key to the animation key array with linear interpolation.
Murl.Logic.AnimationKey.MathVector AddKey(Number time, Murl.Math.Vector value)
time | The time for the key in seconds. |
value | The value for the key. |
Add a key to the animation key array.
Murl.Logic.AnimationKey.MathVector AddKey(Number time, Murl.Math.Vector value, Murl.IEnums.Interpolation interpolation)
time | The time for the key in seconds. |
value | The value for the key. |
interpolation | The interpolation type. |
Add a key to the animation key array.
Murl.Logic.AnimationKey.MathVector AddKey(Murl.Logic.AnimationKey.MathVector key)
key | The key to copy and add. |
Set a key in the animation key array with linear interpolation.
Murl.Logic.AnimationKey.MathVector SetKey(Integer index, Number time, Murl.Math.Vector value)
index | The zero-based index of the key to set. |
time | The time for the key in seconds. |
value | The value for the key. |
Set a key in the animation key array.
Murl.Logic.AnimationKey.MathVector SetKey(Integer index, Number time, Murl.Math.Vector value, Murl.IEnums.Interpolation interpolation)
index | The zero-based index of the key to set. |
time | The time for the key in seconds. |
value | The value for the key. |
interpolation | The interpolation type. |
Set a key in the animation key array.
Murl.Logic.AnimationKey.MathVector SetKey(Integer index, Murl.Logic.AnimationKey.MathVector key)
index | The zero-based index of the key to set. |
key | The key to copy and set. |
Insert a key to the animation key array with linear interpolation.
Murl.Logic.AnimationKey.MathVector InsertKey(Integer index, Number time, Murl.Math.Vector value)
index | The zero-based index of the key to insert. |
time | The time for the key in seconds. |
value | The value for the key. |
Insert a key to the animation key array.
Murl.Logic.AnimationKey.MathVector InsertKey(Integer index, Number time, Murl.Math.Vector value, Murl.IEnums.Interpolation interpolation)
index | The zero-based index of the key to insert. |
time | The time for the key in seconds. |
value | The value for the key. |
interpolation | The interpolation type. |
Insert a key to the animation key array.
Murl.Logic.AnimationKey.MathVector InsertKey(Integer index, Murl.Logic.AnimationKey.MathVector key)
index | The zero-based index of the key to insert. |
key | The key to copy and insert. |
Get the number of keys.
Integer GetNumberOfKeys()
Get a key from the animation key array.
Murl.Logic.AnimationKey.MathVector GetKey(Integer index)
index | The zero-based index of the key. |
Modify the time of a key in the animation key array.
Boolean ModifyKeyTime(Integer index, Number time)
index | The zero-based index of the key to modify. |
time | The time for the key in seconds. |
Modify the value of a key in the animation key array.
Boolean ModifyKeyValue(Integer index, Murl.Math.Vector value)
index | The zero-based index of the key to modify. |
value | The value for the key. |
Modify the interpolation of a key in the animation key array.
Boolean ModifyKeyInterpoation(Integer index, Murl.IEnums.Interpolation interpolation)
index | The zero-based index of the key to modify. |
interpolation | The interpolation type. |
Set the number of keys.
Boolean SetNumberOfKeys(Integer n)
n | The number of keys. |
Remove keys at a given position.
Boolean RemoveKey(Integer index, Integer count)
index | The zero-based index from where to remove the keys. |
count | The number of keys to remove. |
Empty the keys, but keep the underlying storage.
EmptyKeys()
Clear the keys and remove the underlying storage.
ClearKeys()
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, Murl.Math.Vector midValue, Number endTime, Murl.Math.Vector endValue, Murl.IEnums.Interpolation interpolation)
midTime | The time between zero and the endTime. |
midValue | The value at mid time. |
endTime | The end time. |
endValue | The value at end time. |
interpolation | The interpolation type. |
Called if the current value is set. This method is empty and can be overwritten.
OnEvaluateAnimation(Murl.Math.Vector currentValue)
currentValue | The current value. |
Get the current value.
Murl.Math.Vector GetCurrentValue()
Start the timeline forward. The first animation array key is the start time, the last animation array key is the end time.
Boolean StartForward()
Start the timeline backward. The last animation array key is the start time, the first animation array key is the end time.
Boolean StartBackward()
Set the timeline start time from a specified key index.
Boolean SetStartTimeFromKey(Integer index)
index | The zero-based index to the mKeys array. |
Set the timeline end time from a specified key index.
Boolean SetEndTimeFromKey(Integer index)
index | The zero-based index to the mKeys array. |
Set the timeline loop start time from a specified key index.
Boolean SetLoopStartTimeFromKey(Integer index)
index | The zero-based index to the mKeys array. |
Set the timeline loop end time from a specified key index.
Boolean SetLoopEndTimeFromKey(Integer index)
index | The zero-based index to the mKeys array. |
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)
index | The zero-based index to the mKeys array. |
Check if the current time is the time from a specified key index.
Boolean IsOnTimeFromKey(Integer index)
index | The zero-based index to the mKeys array. |
Reset the animation.
Reset()