0ad/source/graphics/SkeletonAnim.h
Ykkrosh bdbb2bcb16 # Updated unit animation code.
Added UnitAnimation class, to act as the interface between the entity
and actor. (Currently doesn't work very well, but it does make
animations loop smoothly and sometimes kind of makes them stay
synchronised.)
Fixed corpse animation - it now plays the final frame of the death
animation before turning static.
Fixed update/interpolate timings.
Added JS function saveProfileData.
Updated ffmpeg library.

This was SVN commit r4880.
2007-02-10 03:09:52 +00:00

39 lines
1.1 KiB
C++

///////////////////////////////////////////////////////////////////////////////
//
// Name: SkeletonAnim.h
// Author: Rich Cross
// Contact: rich@wildfiregames.com
//
///////////////////////////////////////////////////////////////////////////////
#ifndef _SKELETONANIM_H
#define _SKELETONANIM_H
#include "maths/Bound.h"
class CSkeletonAnimDef;
////////////////////////////////////////////////////////////////////////////////////////
// CSkeletonAnim: an instance of a CSkeletonAnimDef, for application onto a model
class CSkeletonAnim
{
public:
// the name of the action which uses this animation (e.g. "idle")
CStr m_Name;
// the raw animation frame data
CSkeletonAnimDef* m_AnimDef;
// speed at which this animation runs
float m_Speed;
// Times during the animation at which the interesting bits happen. Measured
// as fractions (0..1) of the total animation length.
// ActionPos is used for melee hits, projectile launches, etc.
// ActionPos2 is used for loading projectile ammunition.
float m_ActionPos;
float m_ActionPos2;
// object space bounds of the model when this animation is applied to it
CBound m_ObjectBounds;
};
#endif