#include <mdldata.h>
Inheritance diagram for iModelDataAction:
Public Methods | |
virtual iObject* | QueryObject ()=0 |
Query the iObject for this action. | |
virtual int | GetFrameCount () const=0 |
Return the number of key frames. | |
virtual float | GetTime (int Frame) const=0 |
Get the time value for a frame. | |
virtual iObject* | GetState (int Frame) const=0 |
Get the state information for a frame. | |
virtual void | SetTime (int Frame, float NewTime)=0 |
Set the time value for a frame. | |
virtual void | SetState (int Frame, iObject *State)=0 |
Set the state information for a frame. | |
virtual void | AddFrame (float Time, iObject *State)=0 |
Add a frame. | |
virtual void | DeleteFrame (int Frame)=0 |
Delete a frame. | |
virtual float | GetTotalTime () const=0 |
Return the length (in time) of a complete animation cycle. |
This is mainly a list of key frames. Note that the key frames are not added as sub-objects, but instead they are added directly through the iModelDataAction interface. The reason is that together with every frame a time value has to be stored.
The idea of time values is the following: Every frame comes with the point in time when the frame *ends*, measured in seconds. For example, if your frames last 100msec, 200msec, 50msec and 250msec, the time values are: 0.1, 0.3, 0.35, 0.6. As this is the ending time for each frame, the last time value has three meanings:
Note that the frames are automatically sorted by time.
There are different types of frames. One could imagine vertex states, skeleton states and transformation states (or other types?). Currently only vertex states (iModelDataVertices) are used.