#include <spKeyframeSequence.hpp>
List of all members.
Classes |
struct | SKey |
| !!
|
Public Member Functions |
| KeyframeSequence () |
| ~KeyframeSequence () |
void | addKeyPosition (u32 Frame, const dim::vector3df &Position) |
| !!
|
void | addKeyRotation (u32 Frame, const dim::quaternion &Rotation) |
void | addKeyScale (u32 Frame, const dim::vector3df &Scale) |
void | addKeyframe (u32 Frame, s32 _deb_ToBeremoved_, const Transformation &Transform, s32 Flags=KEYFRAME_ALL) |
bool | removeKeyframe (u32 Frame, s32 _deb_ToBeremoved_, s32 Flags=KEYFRAME_ALL) |
bool | updateSequence () |
void | setUpdateImmediate (bool Enable) |
void | addKeyframe (u32 Frame, const Transformation &Transform) |
void | removeKeyframe (u32 Frame) |
| Removes the specified keyframe if this is a 'root' keyframe i.e. you previously added it.
|
const Transformation & | getKeyframe (u32 Frame) const |
Transformation & | getKeyframe (u32 Frame) |
void | interpolate (Transformation &Result, u32 From, u32 To, f32 Interpolation) |
u32 | getKeyframeCount () const |
| Returns the count of final keyframes.
|
u32 | getMinKeyframe () const |
| Returns the minimal frame index. This is not used for the final frame transformations!
|
u32 | getMaxKeyframe () const |
| Returns the maximal frame index. This is not used for the final frame transformations!
|
bool | getUpdateImmediate () const |
| Returns status of immediate sequence updating. By defautl false.
|
bool | modified () const |
Detailed Description
This is the animation keyframe sequence class. It holds all keyframe transformations for a node object which can be a scene node or a bone.
Constructor & Destructor Documentation
sp::scene::KeyframeSequence::KeyframeSequence |
( |
|
) |
|
sp::scene::KeyframeSequence::~KeyframeSequence |
( |
|
) |
|
Member Function Documentation
void sp::scene::KeyframeSequence::addKeyframe |
( |
u32 |
Frame, |
|
|
s32 |
_deb_ToBeremoved_, |
|
|
const Transformation & |
Transform, |
|
|
s32 |
Flags = KEYFRAME_ALL | |
|
) |
| | |
void sp::scene::KeyframeSequence::addKeyframe |
( |
u32 |
Frame, |
|
|
const Transformation & |
Transform | |
|
) |
| | |
Adds a new keyframe transformation.
- Parameters:
-
[in] | Frame | Specifies the frame index. When this index is more 1 greater than the last index the |
[in] | Transform | Specifies the transformation for the new keyframe. keyframes between these values will be interpolated and also be added. But only the keyframes you add manual are so called 'root' keyframes. You can only remove those root keyframes. All the other interpolated keyframes will be removed automatically. |
void sp::scene::KeyframeSequence::addKeyPosition |
( |
u32 |
Frame, |
|
|
const dim::vector3df & |
Position | |
|
) |
| | |
void sp::scene::KeyframeSequence::addKeyRotation |
( |
u32 |
Frame, |
|
|
const dim::quaternion & |
Rotation | |
|
) |
| | |
void sp::scene::KeyframeSequence::addKeyScale |
( |
u32 |
Frame, |
|
|
const dim::vector3df & |
Scale | |
|
) |
| | |
const Transformation& sp::scene::KeyframeSequence::getKeyframe |
( |
u32 |
Frame |
) |
const [inline] |
Returns the specified keyframe as constant reference. This function does not check if the index is out of bounds! Use "getKeyframeCount" to determine the range of keyframes.
Returns the specified keyframe as reference. This function does not check if the index is out of bounds! Use "getKeyframeCount" to determine the range of keyframes.
u32 sp::scene::KeyframeSequence::getKeyframeCount |
( |
|
) |
const [inline] |
Returns the count of final keyframes.
u32 sp::scene::KeyframeSequence::getMaxKeyframe |
( |
|
) |
const [inline] |
Returns the maximal frame index. This is not used for the final frame transformations!
u32 sp::scene::KeyframeSequence::getMinKeyframe |
( |
|
) |
const [inline] |
Returns the minimal frame index. This is not used for the final frame transformations!
bool sp::scene::KeyframeSequence::getUpdateImmediate |
( |
|
) |
const [inline] |
Returns status of immediate sequence updating. By defautl false.
void sp::scene::KeyframeSequence::interpolate |
( |
Transformation & |
Result, |
|
|
u32 |
From, |
|
|
u32 |
To, |
|
|
f32 |
Interpolation | |
|
) |
| | [inline] |
Stores an interpolated transformation between the two given frames in the result parameter.
- Parameters:
-
[out] | Result | Specifies the variable where the result is to be stored. |
[in] | From | Specifies the start frame index. |
[in] | To | Specifies the end frame index. |
[in] | Interpolation | Specifies the interpolation factor [0.0 .. 1.0]. |
bool sp::scene::KeyframeSequence::modified |
( |
|
) |
const [inline] |
Returns true if the sequence has been modified. In this case you have to update the sequence. This happens when a keyframe has been added or removed.
- See also:
- updateSequence
bool sp::scene::KeyframeSequence::removeKeyframe |
( |
u32 |
Frame, |
|
|
s32 |
_deb_ToBeremoved_, |
|
|
s32 |
Flags = KEYFRAME_ALL | |
|
) |
| | |
Removes the specified keyframe. Any keyframe (position, rotation or scale) must have been added previously at the same frame index.
- Parameters:
-
[in] | Frame | Specifies the frame index. |
[in] | Flags | Specifies the keys which are to be removed. Use a combination of KEYFRAME_POSITION, KEYFRAME_ROTATION and KEYFRAME_SCALE. |
- Returns:
- True if a keyframe could be removed. Otherwise the frame index was invalid or the flags bit-mask was zero.
- See also:
- EKeyframeFlags
void sp::scene::KeyframeSequence::removeKeyframe |
( |
u32 |
Frame |
) |
|
Removes the specified keyframe if this is a 'root' keyframe i.e. you previously added it.
void sp::scene::KeyframeSequence::setUpdateImmediate |
( |
bool |
Enable |
) |
|
Enables or disables immediate update mode. Use this to let the engine update the sequence every time you add a new or remove an old keyframe.
- Parameters:
-
[in] | Enable | Specifies whether the immediate update mode is to be enabled or disabled. By default disabled. If this parameter is true and the sequence was modified previously it will be updated with this function call. |
- Note:
- Updating the sequence every time it is modified can be very slow! Only use this for real-time editing purposes.
bool sp::scene::KeyframeSequence::updateSequence |
( |
|
) |
|
Updates or rather finally constructs the transformations out of all added keyframes. This is similar to the "AnimationSkeleton::updateSkeleton" function to finalize the construction.
- Returns:
- True if the sequence has been updated. Otherwise an update was not necessary.
AnimSeq->addKeyframe(0, ...);
AnimSeq->addKeyframe(5, ...);
AnimSeq->addKeyframe(12, ...);
AnimSeq->addKeyframe(27, ...);
AnimSeq->updateSequence();
- See also:
- modified
The documentation for this class was generated from the following files:
- D:/SoftwareEntwicklung/C++/HLC/Tools/SoftPixelEngine/repository/sources/SceneGraph/Animation/spKeyframeSequence.hpp
- D:/SoftwareEntwicklung/C++/HLC/Tools/SoftPixelEngine/repository/sources/SceneGraph/Animation/spKeyframeSequence.cpp