Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

iModelDataAction Struct Reference

An action. More...

#include <mdldata.h>

Inheritance diagram for iModelDataAction:

iBase List of all members.

Public Methods

virtual iObjectQueryObject ()=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 iObjectGetState (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.


Detailed Description

An action.

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:

  • It is the end of the whole action
  • It is the length of the action
  • It wraps around to the time value 0.0
Another effect of this is that when you start playing an animation cycle, the animation begins at the *last* frame and moves on to the first frame within the time that is stored with the first frame.

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.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000