Describes a curve defined by keyframes. More...
Classes | |
| struct | Keyframe |
| Key frame data use to determine Bezier points. More... | |
Public Types | |
| enum class | WrapModes : byte { First = 0 , Last = 1 , Loop = 2 , PingPong = 3 } |
| Affects how the curve is evaluated when the time falls outside the curve duration. More... | |
| enum class | EvalModes { Curve , Linear , Constant } |
| Affects how the keyframes are used when evaluating a curve. More... | |
Public Member Functions | |
| void | Clear () |
| Removes all keyframes from the curve. More... | |
| int | AddKeyframe (Keyframe keyframe) |
| Adds a keyframe to the curve. More... | |
| void | RemoveKeyframe (int index) |
| Removes a keyframe from the curve. More... | |
| float | Evaluate (float time, EvalModes evalMode=EvalModes.Curve) |
| Gets the curve value at a specific time. More... | |
Properties | |
| WrapModes | PreWrapMode [get, set] |
| Gets/Sets the wrap mode to use when evaluating times before the start of the curve. More... | |
| WrapModes | PostWrapMode [get, set] |
| Gets/Sets the wrap mode to use when evaluating times past the duration of the curve. More... | |
| float | Duration [get] |
| Returns the duration of the curve. Sum of all keyframe times. More... | |
| float | StartTime [get] |
| Gets the time this curve starts. More... | |
| float | EndTime [get] |
| Gets the time this curve ends. More... | |
| int | KeyFrameCount [get] |
| Returns the number of keyframes in the curve. More... | |
Describes a curve defined by keyframes.
Each key frame contains information to create two points of a cubic Bezier curve. For a given segement between keyframe k0 and k1 the bezier points are defined to be 0, k0.Value), (k0.OutWeight, k0.OutTangent * t * k0.OutWeight + k0.Value), (1 - k1.InWeight, -k1.InTangent * t * k1.InWeight + k0.Value), (1, k1.Value) where t is k1.time - k0.time
|
strong |
Affects how the keyframes are used when evaluating a curve.
|
strong |
| int KS.Reactor.ksCurve.AddKeyframe | ( | Keyframe | keyframe | ) |
Adds a keyframe to the curve.
Places keyframe at correct position in the keyframe list based on time.
| keyframe | Keyframe. |
| void KS.Reactor.ksCurve.Clear | ( | ) |
Removes all keyframes from the curve.
| float KS.Reactor.ksCurve.Evaluate | ( | float | time, |
| EvalModes | evalMode = EvalModes.Curve |
||
| ) |
Gets the curve value at a specific time.
| time | Time. |
| evalMode | Evaluation mode (Default EvalModes.Curve). |
| void KS.Reactor.ksCurve.RemoveKeyframe | ( | int | index | ) |
Removes a keyframe from the curve.
| index | Keyframe index. |
|
get |
Returns the duration of the curve. Sum of all keyframe times.
|
get |
Gets the time this curve ends.
|
get |
Returns the number of keyframes in the curve.
|
getset |
Gets/Sets the wrap mode to use when evaluating times past the duration of the curve.
|
getset |
Gets/Sets the wrap mode to use when evaluating times before the start of the curve.
|
get |
Gets the time this curve starts.