CrystalSpace

Public API Reference

Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

iModelDataAction Struct Reference

An action. More...

#include <imesh/mdldata.h>

Inheritance diagram for iModelDataAction:

iBase csModelDataAction List of all members.

Public Member Functions

virtual iObjectQueryObject ()=0
 Query the iObject for this action.
virtual size_t GetFrameCount () const =0
 Return the number of key frames.
virtual float GetTime (size_t Frame) const =0
 Get the time value for a frame.
virtual iObjectGetState (size_t Frame) const =0
 Get the state information for a frame.
virtual void SetTime (size_t Frame, float NewTime)=0
 Set the time value for a frame.
virtual void SetState (size_t 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 (size_t 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:

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.

Definition at line 235 of file mdldata.h.


Member Function Documentation

virtual void iModelDataAction::AddFrame float  Time,
iObject State
[pure virtual]
 

Add a frame.

Implemented in csModelDataAction.

virtual void iModelDataAction::DeleteFrame size_t  Frame  )  [pure virtual]
 

Delete a frame.

Implemented in csModelDataAction.

virtual size_t iModelDataAction::GetFrameCount  )  const [pure virtual]
 

Return the number of key frames.

Implemented in csModelDataAction.

virtual iObject* iModelDataAction::GetState size_t  Frame  )  const [pure virtual]
 

Get the state information for a frame.

Implemented in csModelDataAction.

virtual float iModelDataAction::GetTime size_t  Frame  )  const [pure virtual]
 

Get the time value for a frame.

Implemented in csModelDataAction.

virtual float iModelDataAction::GetTotalTime  )  const [pure virtual]
 

Return the length (in time) of a complete animation cycle.

Implemented in csModelDataAction.

virtual iObject* iModelDataAction::QueryObject  )  [pure virtual]
 

Query the iObject for this action.

virtual void iModelDataAction::SetState size_t  Frame,
iObject State
[pure virtual]
 

Set the state information for a frame.

Implemented in csModelDataAction.

virtual void iModelDataAction::SetTime size_t  Frame,
float  NewTime
[pure virtual]
 

Set the time value for a frame.

Implemented in csModelDataAction.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.3.9.1