|
Rebel Fork Framework
|
Curve of Variant values sampled by scalar values. More...
#include <Urho3D/Core/VariantCurve.h>
Public Member Functions | |
| void | Commit () |
| Variant | Sample (float time, float duration, bool isLooped, unsigned &frameIndex) const |
| Sample value at given time. | |
| Variant | Sample (float time) const |
| Sample value at given time without looping and keyframe hint. | |
| VariantType | GetType () const |
| Return type of animation track. Defined by the type of the first keyframe. | |
| void | SerializeInBlock (Archive &archive) |
| Serialize content from/to archive. May throw ArchiveException. | |
Utility functions | |
| unsigned | ToHash () const |
| bool | operator== (const VariantCurve &rhs) const |
| bool | operator!= (const VariantCurve &rhs) const |
Public Member Functions inherited from Urho3D::KeyFrameSet< VariantCurvePoint > | |
| void | SortKeyFrames () |
| Sort keyframes by time. | |
| void | AddKeyFrame (const KeyFrame &keyFrame) |
| Append keyframe preserving container order. | |
| void | RemoveKeyFrame (unsigned index) |
| Remove a keyframe at index. | |
| void | RemoveAllKeyFrames () |
| Remove all keyframes. | |
| KeyFrame * | GetKeyFrame (unsigned index) |
| Return keyframe at index, or null if not found. | |
| unsigned | GetNumKeyFrames () const |
| void | GetKeyFrames (float time, float duration, bool isLooped, unsigned &frameIndex, unsigned &nextFrameIndex, float &blendFactor) const |
| Return keyframes for interpolation. | |
| bool | GetKeyFrameIndex (float time, unsigned &index) const |
| Return keyframe index based on time and previous index as hint. Return false if animation is empty. | |
Public Attributes | |
| ea::string | name_ |
| Annotated name of the curve. May have special meaning for the user. | |
| StringHash | nameHash_ |
| KeyFrameInterpolation | interpolation_ { KeyFrameInterpolation::Linear } |
| Interpolation mode. | |
| float | splineTension_ { 0.5f } |
| Spline tension for spline interpolation. | |
| ea::vector< Variant > | inTangents_ |
| Tangents for cubic spline. Recalculated on commit for tension spline. | |
| ea::vector< Variant > | outTangents_ |
| VariantType | type_ {} |
| Type of values, deduced from key frames. | |
Public Attributes inherited from Urho3D::KeyFrameSet< VariantCurvePoint > | |
| ea::vector< KeyFrame > | keyFrames_ |
Static Public Attributes | |
| static const VariantCurve | EMPTY |
| Empty curve. Returns empty Variant on sampling. | |
Additional Inherited Members | |
Public Types inherited from Urho3D::KeyFrameSet< VariantCurvePoint > | |
| using | KeyFrame = VariantCurvePoint |
Curve of Variant values sampled by scalar values.
| void Urho3D::VariantCurve::Commit | ( | ) |
Commit changes and recalculate derived members. May change interpolation mode. Sample should be called only on committed curve!