]> icculus.org git repositories - icculus/iodoom3.git/blob - neo/game/anim/Anim.h
hello world
[icculus/iodoom3.git] / neo / game / anim / Anim.h
1 /*
2 ===========================================================================
3
4 Doom 3 GPL Source Code
5 Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company. 
6
7 This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).  
8
9 Doom 3 Source Code is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 Doom 3 Source Code is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with Doom 3 Source Code.  If not, see <http://www.gnu.org/licenses/>.
21
22 In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code.  If not, please request a copy in writing from id Software at the address below.
23
24 If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
25
26 ===========================================================================
27 */
28 #ifndef __ANIM_H__
29 #define __ANIM_H__
30
31 //
32 // animation channels
33 // these can be changed by modmakers and licensees to be whatever they need.
34 const int ANIM_NumAnimChannels          = 5;
35 const int ANIM_MaxAnimsPerChannel       = 3;
36 const int ANIM_MaxSyncedAnims           = 3;
37
38 //
39 // animation channels.  make sure to change script/doom_defs.script if you add any channels, or change their order
40 //
41 const int ANIMCHANNEL_ALL                       = 0;
42 const int ANIMCHANNEL_TORSO                     = 1;
43 const int ANIMCHANNEL_LEGS                      = 2;
44 const int ANIMCHANNEL_HEAD                      = 3;
45 const int ANIMCHANNEL_EYELIDS           = 4;
46
47 // for converting from 24 frames per second to milliseconds
48 ID_INLINE int FRAME2MS( int framenum ) {
49         return ( framenum * 1000 ) / 24;
50 }
51
52 class idRenderModel;
53 class idAnimator;
54 class idAnimBlend;
55 class function_t;
56 class idEntity;
57 class idSaveGame;
58 class idRestoreGame;
59
60 typedef struct {
61         int             cycleCount;     // how many times the anim has wrapped to the begining (0 for clamped anims)
62         int             frame1;
63         int             frame2;
64         float   frontlerp;
65         float   backlerp;
66 } frameBlend_t;
67
68 typedef struct {
69         int                                             nameIndex;
70         int                                             parentNum;
71         int                                             animBits;
72         int                                             firstComponent;
73 } jointAnimInfo_t;
74
75 typedef struct {
76         jointHandle_t                   num;
77         jointHandle_t                   parentNum;
78         int                                             channel;
79 } jointInfo_t;
80
81 //
82 // joint modifier modes.  make sure to change script/doom_defs.script if you add any, or change their order.
83 //
84 typedef enum {
85         JOINTMOD_NONE,                          // no modification
86         JOINTMOD_LOCAL,                         // modifies the joint's position or orientation in joint local space
87         JOINTMOD_LOCAL_OVERRIDE,        // sets the joint's position or orientation in joint local space
88         JOINTMOD_WORLD,                         // modifies joint's position or orientation in model space
89         JOINTMOD_WORLD_OVERRIDE         // sets the joint's position or orientation in model space
90 } jointModTransform_t;
91
92 typedef struct {
93         jointHandle_t                   jointnum;
94         idMat3                                  mat;
95         idVec3                                  pos;
96         jointModTransform_t             transform_pos;
97         jointModTransform_t             transform_axis;
98 } jointMod_t;
99
100 #define ANIM_TX                         BIT( 0 )
101 #define ANIM_TY                         BIT( 1 )
102 #define ANIM_TZ                         BIT( 2 )
103 #define ANIM_QX                         BIT( 3 )
104 #define ANIM_QY                         BIT( 4 )
105 #define ANIM_QZ                         BIT( 5 )
106
107 typedef enum {
108         FC_SCRIPTFUNCTION,
109         FC_SCRIPTFUNCTIONOBJECT,
110         FC_EVENTFUNCTION,
111         FC_SOUND,
112         FC_SOUND_VOICE,
113         FC_SOUND_VOICE2,
114         FC_SOUND_BODY,
115         FC_SOUND_BODY2,
116         FC_SOUND_BODY3,
117         FC_SOUND_WEAPON,
118         FC_SOUND_ITEM,
119         FC_SOUND_GLOBAL,
120         FC_SOUND_CHATTER,
121         FC_SKIN,
122         FC_TRIGGER,
123         FC_TRIGGER_SMOKE_PARTICLE,
124         FC_MELEE,
125         FC_DIRECTDAMAGE,
126         FC_BEGINATTACK,
127         FC_ENDATTACK,
128         FC_MUZZLEFLASH,
129         FC_CREATEMISSILE,
130         FC_LAUNCHMISSILE,
131         FC_FIREMISSILEATTARGET,
132         FC_FOOTSTEP,
133         FC_LEFTFOOT,
134         FC_RIGHTFOOT,
135         FC_ENABLE_EYE_FOCUS,
136         FC_DISABLE_EYE_FOCUS,
137         FC_FX,
138         FC_DISABLE_GRAVITY,
139         FC_ENABLE_GRAVITY,
140         FC_JUMP,
141         FC_ENABLE_CLIP,
142         FC_DISABLE_CLIP,
143         FC_ENABLE_WALK_IK,
144         FC_DISABLE_WALK_IK,
145         FC_ENABLE_LEG_IK,
146         FC_DISABLE_LEG_IK,
147         FC_RECORDDEMO,
148         FC_AVIGAME
149 } frameCommandType_t;
150
151 typedef struct {
152         int                                             num;
153         int                                             firstCommand;
154 } frameLookup_t;
155
156 typedef struct {
157         frameCommandType_t              type;
158         idStr                                   *string;
159
160         union {
161                 const idSoundShader     *soundShader;
162                 const function_t        *function;
163                 const idDeclSkin        *skin;
164                 int                                     index;
165         };
166 } frameCommand_t;
167
168 typedef struct {
169         bool                                    prevent_idle_override           : 1;
170         bool                                    random_cycle_start                      : 1;
171         bool                                    ai_no_turn                                      : 1;
172         bool                                    anim_turn                                       : 1;
173 } animFlags_t;
174
175
176 /*
177 ==============================================================================================
178
179         idModelExport
180
181 ==============================================================================================
182 */
183
184 class idModelExport {
185 private:
186         void                                    Reset( void );
187         bool                                    ParseOptions( idLexer &lex );
188         int                                             ParseExportSection( idParser &parser );
189
190         static bool                             CheckMayaInstall( void );
191         static void                             LoadMayaDll( void );
192
193         bool                                    ConvertMayaToMD5( void );
194         static bool                             initialized;
195
196 public:
197         idStr                                   commandLine;
198         idStr                                   src;
199         idStr                                   dest;
200         bool                                    force;
201
202                                                         idModelExport();
203
204         static void                             Shutdown( void );
205
206         int                                             ExportDefFile( const char *filename );
207         bool                                    ExportModel( const char *model );
208         bool                                    ExportAnim( const char *anim );
209         int                                             ExportModels( const char *pathname, const char *extension );
210 };
211
212 /*
213 ==============================================================================================
214
215         idMD5Anim
216
217 ==============================================================================================
218 */
219
220 class idMD5Anim {
221 private:
222         int                                             numFrames;
223         int                                             frameRate;
224         int                                             animLength;
225         int                                             numJoints;
226         int                                             numAnimatedComponents;
227         idList<idBounds>                bounds;
228         idList<jointAnimInfo_t> jointInfo;
229         idList<idJointQuat>             baseFrame;
230         idList<float>                   componentFrames;
231         idStr                                   name;
232         idVec3                                  totaldelta;
233         mutable int                             ref_count;
234
235 public:
236                                                         idMD5Anim();
237                                                         ~idMD5Anim();
238
239         void                                    Free( void );
240         bool                                    Reload( void );
241         size_t                                  Allocated( void ) const;
242         size_t                                  Size( void ) const { return sizeof( *this ) + Allocated(); };
243         bool                                    LoadAnim( const char *filename );
244
245         void                                    IncreaseRefs( void ) const;
246         void                                    DecreaseRefs( void ) const;
247         int                                             NumRefs( void ) const;
248         
249         void                                    CheckModelHierarchy( const idRenderModel *model ) const;
250         void                                    GetInterpolatedFrame( frameBlend_t &frame, idJointQuat *joints, const int *index, int numIndexes ) const;
251         void                                    GetSingleFrame( int framenum, idJointQuat *joints, const int *index, int numIndexes ) const;
252         int                                             Length( void ) const;
253         int                                             NumFrames( void ) const;
254         int                                             NumJoints( void ) const;
255         const idVec3                    &TotalMovementDelta( void ) const;
256         const char                              *Name( void ) const;
257
258         void                                    GetFrameBlend( int framenum, frameBlend_t &frame ) const;       // frame 1 is first frame
259         void                                    ConvertTimeToFrame( int time, int cyclecount, frameBlend_t &frame ) const;
260
261         void                                    GetOrigin( idVec3 &offset, int currentTime, int cyclecount ) const;
262         void                                    GetOriginRotation( idQuat &rotation, int time, int cyclecount ) const;
263         void                                    GetBounds( idBounds &bounds, int currentTime, int cyclecount ) const;
264 };
265
266 /*
267 ==============================================================================================
268
269         idAnim
270
271 ==============================================================================================
272 */
273
274 class idAnim {
275 private:
276         const class idDeclModelDef      *modelDef;
277         const idMD5Anim                         *anims[ ANIM_MaxSyncedAnims ];
278         int                                                     numAnims;
279         idStr                                           name;
280         idStr                                           realname;
281         idList<frameLookup_t>           frameLookup;
282         idList<frameCommand_t>          frameCommands;
283         animFlags_t                                     flags;
284
285 public:
286                                                                 idAnim();
287                                                                 idAnim( const idDeclModelDef *modelDef, const idAnim *anim );
288                                                                 ~idAnim();
289
290         void                                            SetAnim( const idDeclModelDef *modelDef, const char *sourcename, const char *animname, int num, const idMD5Anim *md5anims[ ANIM_MaxSyncedAnims ] );
291         const char                                      *Name( void ) const;
292         const char                                      *FullName( void ) const;
293         const idMD5Anim                         *MD5Anim( int num ) const;
294         const idDeclModelDef            *ModelDef( void ) const;
295         int                                                     Length( void ) const;
296         int                                                     NumFrames( void ) const;
297         int                                                     NumAnims( void ) const;
298         const idVec3                            &TotalMovementDelta( void ) const;
299         bool                                            GetOrigin( idVec3 &offset, int animNum, int time, int cyclecount ) const;
300         bool                                            GetOriginRotation( idQuat &rotation, int animNum, int currentTime, int cyclecount ) const;
301         bool                                            GetBounds( idBounds &bounds, int animNum, int time, int cyclecount ) const;
302         const char                                      *AddFrameCommand( const class idDeclModelDef *modelDef, int framenum, idLexer &src, const idDict *def );
303         void                                            CallFrameCommands( idEntity *ent, int from, int to ) const;
304         bool                                            HasFrameCommands( void ) const;
305
306                                                                 // returns first frame (zero based) that command occurs.  returns -1 if not found.
307         int                                                     FindFrameForFrameCommand( frameCommandType_t framecommand, const frameCommand_t **command ) const;
308         void                                            SetAnimFlags( const animFlags_t &animflags );
309         const animFlags_t                       &GetAnimFlags( void ) const;
310 };
311
312 /*
313 ==============================================================================================
314
315         idDeclModelDef
316
317 ==============================================================================================
318 */
319
320 class idDeclModelDef : public idDecl {
321 public:
322                                                                 idDeclModelDef();
323                                                                 ~idDeclModelDef();
324
325         virtual size_t                          Size( void ) const;
326         virtual const char *            DefaultDefinition( void ) const;
327         virtual bool                            Parse( const char *text, const int textLength );
328         virtual void                            FreeData( void );
329
330         void                                            Touch( void ) const;
331
332         const idDeclSkin *                      GetDefaultSkin( void ) const;
333         const idJointQuat *                     GetDefaultPose( void ) const;
334         void                                            SetupJoints( int *numJoints, idJointMat **jointList, idBounds &frameBounds, bool removeOriginOffset ) const;
335         idRenderModel *                         ModelHandle( void ) const;
336         void                                            GetJointList( const char *jointnames, idList<jointHandle_t> &jointList ) const;
337         const jointInfo_t *                     FindJoint( const char *name ) const;
338
339         int                                                     NumAnims( void ) const;
340         const idAnim *                          GetAnim( int index ) const;
341         int                                                     GetSpecificAnim( const char *name ) const;
342         int                                                     GetAnim( const char *name ) const;
343         bool                                            HasAnim( const char *name ) const;
344         const idDeclSkin *                      GetSkin( void ) const;
345         const char *                            GetModelName( void ) const;
346         const idList<jointInfo_t> &     Joints( void ) const;
347         const int *                                     JointParents( void ) const;
348         int                                                     NumJoints( void ) const;
349         const jointInfo_t *                     GetJoint( int jointHandle ) const;
350         const char *                            GetJointName( int jointHandle ) const;
351         int                                                     NumJointsOnChannel( int channel ) const;
352         const int *                                     GetChannelJoints( int channel ) const;
353
354         const idVec3 &                          GetVisualOffset( void ) const;
355
356 private:
357         void                                            CopyDecl( const idDeclModelDef *decl );
358         bool                                            ParseAnim( idLexer &src, int numDefaultAnims );
359
360 private:
361         idVec3                                          offset;
362         idList<jointInfo_t>                     joints;
363         idList<int>                                     jointParents;
364         idList<int>                                     channelJoints[ ANIM_NumAnimChannels ];
365         idRenderModel *                         modelHandle;
366         idList<idAnim *>                        anims;
367         const idDeclSkin *                      skin;
368 };
369
370 /*
371 ==============================================================================================
372
373         idAnimBlend
374
375 ==============================================================================================
376 */
377
378 class idAnimBlend {
379 private:
380         const class idDeclModelDef      *modelDef;
381         int                                                     starttime;
382         int                                                     endtime;
383         int                                                     timeOffset;
384         float                                           rate;
385
386         int                                                     blendStartTime;
387         int                                                     blendDuration;
388         float                                           blendStartValue;
389         float                                           blendEndValue;
390
391         float                                           animWeights[ ANIM_MaxSyncedAnims ];
392         short                                           cycle;
393         short                                           frame;
394         short                                           animNum;
395         bool                                            allowMove;
396         bool                                            allowFrameCommands;
397
398         friend class                            idAnimator;
399
400         void                                            Reset( const idDeclModelDef *_modelDef );
401         void                                            CallFrameCommands( idEntity *ent, int fromtime, int totime ) const;
402         void                                            SetFrame( const idDeclModelDef *modelDef, int animnum, int frame, int currenttime, int blendtime );
403         void                                            CycleAnim( const idDeclModelDef *modelDef, int animnum, int currenttime, int blendtime );
404         void                                            PlayAnim( const idDeclModelDef *modelDef, int animnum, int currenttime, int blendtime );
405         bool                                            BlendAnim( int currentTime, int channel, int numJoints, idJointQuat *blendFrame, float &blendWeight, bool removeOrigin, bool overrideBlend, bool printInfo ) const;
406         void                                            BlendOrigin( int currentTime, idVec3 &blendPos, float &blendWeight, bool removeOriginOffset ) const;
407         void                                            BlendDelta( int fromtime, int totime, idVec3 &blendDelta, float &blendWeight ) const;
408         void                                            BlendDeltaRotation( int fromtime, int totime, idQuat &blendDelta, float &blendWeight ) const;
409         bool                                            AddBounds( int currentTime, idBounds &bounds, bool removeOriginOffset ) const;
410
411 public:
412                                                                 idAnimBlend();
413         void                                            Save( idSaveGame *savefile ) const;
414         void                                            Restore( idRestoreGame *savefile, const idDeclModelDef *modelDef );
415         const char                                      *AnimName( void ) const;
416         const char                                      *AnimFullName( void ) const;
417         float                                           GetWeight( int currenttime ) const;
418         float                                           GetFinalWeight( void ) const;
419         void                                            SetWeight( float newweight, int currenttime, int blendtime );
420         int                                                     NumSyncedAnims( void ) const;
421         bool                                            SetSyncedAnimWeight( int num, float weight );
422         void                                            Clear( int currentTime, int clearTime );
423         bool                                            IsDone( int currentTime ) const;
424         bool                                            FrameHasChanged( int currentTime ) const;
425         int                                                     GetCycleCount( void ) const;
426         void                                            SetCycleCount( int count );
427         void                                            SetPlaybackRate( int currentTime, float newRate );
428         float                                           GetPlaybackRate( void ) const;
429         void                                            SetStartTime( int startTime );
430         int                                                     GetStartTime( void ) const;
431         int                                                     GetEndTime( void ) const;
432         int                                                     GetFrameNumber( int currenttime ) const;
433         int                                                     AnimTime( int currenttime ) const;
434         int                                                     NumFrames( void ) const;
435         int                                                     Length( void ) const;
436         int                                                     PlayLength( void ) const;
437         void                                            AllowMovement( bool allow );
438         void                                            AllowFrameCommands( bool allow );
439         const idAnim                            *Anim( void ) const;
440         int                                                     AnimNum( void ) const;
441 };
442
443 /*
444 ==============================================================================================
445
446         idAFPoseJointMod
447
448 ==============================================================================================
449 */
450
451 typedef enum {
452         AF_JOINTMOD_AXIS,
453         AF_JOINTMOD_ORIGIN,
454         AF_JOINTMOD_BOTH
455 } AFJointModType_t;
456
457 class idAFPoseJointMod {
458 public:
459                                                                 idAFPoseJointMod( void );
460
461         AFJointModType_t                        mod;
462         idMat3                                          axis;
463         idVec3                                          origin;
464 };
465
466 ID_INLINE idAFPoseJointMod::idAFPoseJointMod( void ) {
467         mod = AF_JOINTMOD_AXIS;
468         axis.Identity();
469         origin.Zero();
470 }
471
472 /*
473 ==============================================================================================
474
475         idAnimator
476
477 ==============================================================================================
478 */
479
480 class idAnimator {
481 public:
482                                                                 idAnimator();
483                                                                 ~idAnimator();
484
485         size_t                                          Allocated( void ) const;
486         size_t                                          Size( void ) const;
487
488         void                                            Save( idSaveGame *savefile ) const;                                     // archives object for save game file
489         void                                            Restore( idRestoreGame *savefile );                                     // unarchives object from save game file
490
491         void                                            SetEntity( idEntity *ent );
492         idEntity                                        *GetEntity( void ) const ;
493         void                                            RemoveOriginOffset( bool remove );
494         bool                                            RemoveOrigin( void ) const;
495
496         void                                            GetJointList( const char *jointnames, idList<jointHandle_t> &jointList ) const;
497
498         int                                                     NumAnims( void ) const;
499         const idAnim                            *GetAnim( int index ) const;
500         int                                                     GetAnim( const char *name ) const;
501         bool                                            HasAnim( const char *name ) const;
502
503         void                                            ServiceAnims( int fromtime, int totime );
504         bool                                            IsAnimating( int currentTime ) const;
505
506         void                                            GetJoints( int *numJoints, idJointMat **jointsPtr );
507         int                                                     NumJoints( void ) const;
508         jointHandle_t                           GetFirstChild( jointHandle_t jointnum ) const;
509         jointHandle_t                           GetFirstChild( const char *name ) const;
510
511         idRenderModel                           *SetModel( const char *modelname );
512         idRenderModel                           *ModelHandle( void ) const;
513         const idDeclModelDef            *ModelDef( void ) const;
514
515         void                                            ForceUpdate( void );
516         void                                            ClearForceUpdate( void );
517         bool                                            CreateFrame( int animtime, bool force );
518         bool                                            FrameHasChanged( int animtime ) const;
519         void                                            GetDelta( int fromtime, int totime, idVec3 &delta ) const;
520         bool                                            GetDeltaRotation( int fromtime, int totime, idMat3 &delta ) const;
521         void                                            GetOrigin( int currentTime, idVec3 &pos ) const;
522         bool                                            GetBounds( int currentTime, idBounds &bounds );
523
524         idAnimBlend                                     *CurrentAnim( int channelNum );
525         void                                            Clear( int channelNum, int currentTime, int cleartime );
526         void                                            SetFrame( int channelNum, int animnum, int frame, int currenttime, int blendtime );
527         void                                            CycleAnim( int channelNum, int animnum, int currenttime, int blendtime );
528         void                                            PlayAnim( int channelNum, int animnum, int currenttime, int blendTime );
529
530                                                                 // copies the current anim from fromChannelNum to channelNum.
531                                                                 // the copied anim will have frame commands disabled to avoid executing them twice.
532         void                                            SyncAnimChannels( int channelNum, int fromChannelNum, int currenttime, int blendTime );
533
534         void                                            SetJointPos( jointHandle_t jointnum, jointModTransform_t transform_type, const idVec3 &pos );
535         void                                            SetJointAxis( jointHandle_t jointnum, jointModTransform_t transform_type, const idMat3 &mat );
536         void                                            ClearJoint( jointHandle_t jointnum );
537         void                                            ClearAllJoints( void );
538
539         void                                            InitAFPose( void );
540         void                                            SetAFPoseJointMod( const jointHandle_t jointNum, const AFJointModType_t mod, const idMat3 &axis, const idVec3 &origin );
541         void                                            FinishAFPose( int animnum, const idBounds &bounds, const int time );
542         void                                            SetAFPoseBlendWeight( float blendWeight );
543         bool                                            BlendAFPose( idJointQuat *blendFrame ) const;
544         void                                            ClearAFPose( void );
545
546         void                                            ClearAllAnims( int currentTime, int cleartime );
547
548         jointHandle_t                           GetJointHandle( const char *name ) const;
549         const char *                            GetJointName( jointHandle_t handle ) const;
550         int                                                     GetChannelForJoint( jointHandle_t joint ) const;
551         bool                                            GetJointTransform( jointHandle_t jointHandle, int currenttime, idVec3 &offset, idMat3 &axis );
552         bool                                            GetJointLocalTransform( jointHandle_t jointHandle, int currentTime, idVec3 &offset, idMat3 &axis );
553
554         const animFlags_t                       GetAnimFlags( int animnum ) const;
555         int                                                     NumFrames( int animnum ) const;
556         int                                                     NumSyncedAnims( int animnum ) const;
557         const char                                      *AnimName( int animnum ) const;
558         const char                                      *AnimFullName( int animnum ) const;
559         int                                                     AnimLength( int animnum ) const;
560         const idVec3                            &TotalMovementDelta( int animnum ) const;
561
562 private:
563         void                                            FreeData( void );
564         void                                            PushAnims( int channel, int currentTime, int blendTime );
565
566 private:
567         const idDeclModelDef *          modelDef;
568         idEntity *                                      entity;
569
570         idAnimBlend                                     channels[ ANIM_NumAnimChannels ][ ANIM_MaxAnimsPerChannel ];
571         idList<jointMod_t *>            jointMods;
572         int                                                     numJoints;
573         idJointMat *                            joints;
574
575         mutable int                                     lastTransformTime;              // mutable because the value is updated in CreateFrame
576         mutable bool                            stoppedAnimatingUpdate;
577         bool                                            removeOriginOffset;
578         bool                                            forceUpdate;
579
580         idBounds                                        frameBounds;
581
582         float                                           AFPoseBlendWeight;
583         idList<int>                                     AFPoseJoints;
584         idList<idAFPoseJointMod>        AFPoseJointMods;
585         idList<idJointQuat>                     AFPoseJointFrame;
586         idBounds                                        AFPoseBounds;
587         int                                                     AFPoseTime;
588 };
589
590 /*
591 ==============================================================================================
592
593         idAnimManager
594
595 ==============================================================================================
596 */
597
598 class idAnimManager {
599 public:
600                                                                 idAnimManager();
601                                                                 ~idAnimManager();
602
603         static bool                                     forceExport;
604
605         void                                            Shutdown( void );
606         idMD5Anim *                                     GetAnim( const char *name );
607         void                                            ReloadAnims( void );
608         void                                            ListAnims( void ) const;
609         int                                                     JointIndex( const char *name );
610         const char *                            JointName( int index ) const;
611
612         void                                            ClearAnimsInUse( void );
613         void                                            FlushUnusedAnims( void );
614
615 private:
616         idHashTable<idMD5Anim *>        animations;
617         idStrList                                       jointnames;
618         idHashIndex                                     jointnamesHash;
619 };
620
621 #endif /* !__ANIM_H__ */