Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
2.8 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #ifndef ANIMATION_H
  9. #define ANIMATION_H
  10. #define ACTIVITY_NOT_AVAILABLE -1
  11. struct animevent_t;
  12. struct studiohdr_t;
  13. class CStudioHdr;
  14. struct mstudioseqdesc_t;
  15. int ExtractBbox( CStudioHdr *pstudiohdr, int sequence, Vector& mins, Vector& maxs );
  16. void IndexModelSequences( CStudioHdr *pstudiohdr );
  17. void ResetActivityIndexes( CStudioHdr *pstudiohdr );
  18. void VerifySequenceIndex( CStudioHdr *pstudiohdr );
  19. int SelectWeightedSequence( CStudioHdr *pstudiohdr, int activity, int curSequence = -1 );
  20. int SelectHeaviestSequence( CStudioHdr *pstudiohdr, int activity );
  21. void SetEventIndexForSequence( mstudioseqdesc_t &seqdesc );
  22. void BuildAllAnimationEventIndexes( CStudioHdr *pstudiohdr );
  23. void ResetEventIndexes( CStudioHdr *pstudiohdr );
  24. void GetEyePosition( CStudioHdr *pstudiohdr, Vector &vecEyePosition );
  25. int LookupActivity( CStudioHdr *pstudiohdr, const char *label );
  26. int LookupSequence( CStudioHdr *pstudiohdr, const char *label );
  27. #define NOMOTION 99999
  28. void GetSequenceLinearMotion( CStudioHdr *pstudiohdr, int iSequence, const float poseParameter[], Vector *pVec );
  29. const char *GetSequenceName( CStudioHdr *pstudiohdr, int sequence );
  30. const char *GetSequenceActivityName( CStudioHdr *pstudiohdr, int iSequence );
  31. int GetSequenceFlags( CStudioHdr *pstudiohdr, int sequence );
  32. int GetAnimationEvent( CStudioHdr *pstudiohdr, int sequence, animevent_t *pNPCEvent, float flStart, float flEnd, int index );
  33. bool HasAnimationEventOfType( CStudioHdr *pstudiohdr, int sequence, int type );
  34. int FindTransitionSequence( CStudioHdr *pstudiohdr, int iCurrentSequence, int iGoalSequence, int *piDir );
  35. bool GotoSequence( CStudioHdr *pstudiohdr, int iCurrentSequence, float flCurrentCycle, float flCurrentRate, int iGoalSequence, int &nNextSequence, float &flNextCycle, int &iNextDir );
  36. void SetBodygroup( CStudioHdr *pstudiohdr, int& body, int iGroup, int iValue );
  37. int GetBodygroup( CStudioHdr *pstudiohdr, int body, int iGroup );
  38. const char *GetBodygroupName( CStudioHdr *pstudiohdr, int iGroup );
  39. int FindBodygroupByName( CStudioHdr *pstudiohdr, const char *name );
  40. int GetBodygroupCount( CStudioHdr *pstudiohdr, int iGroup );
  41. int GetNumBodyGroups( CStudioHdr *pstudiohdr );
  42. int GetSequenceActivity( CStudioHdr *pstudiohdr, int sequence, int *pweight = NULL );
  43. void GetAttachmentLocalSpace( CStudioHdr *pstudiohdr, int attachIndex, matrix3x4_t &pLocalToWorld );
  44. float SetBlending( CStudioHdr *pstudiohdr, int sequence, int *pblendings, int iBlender, float flValue );
  45. int FindHitboxSetByName( CStudioHdr *pstudiohdr, const char *name );
  46. const char *GetHitboxSetName( CStudioHdr *pstudiohdr, int setnumber );
  47. int GetHitboxSetCount( CStudioHdr *pstudiohdr );
  48. #endif //ANIMATION_H