Counter Strike : Global Offensive Source Code
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.

42 lines
1.5 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Keyframed animation header
  4. // shared between game and tools
  5. //=============================================================================//
  6. #ifndef KEYFRAME_H
  7. #define KEYFRAME_H
  8. #pragma once
  9. class IPositionInterpolator
  10. {
  11. public:
  12. virtual void Release() = 0;
  13. virtual void GetDetails( char **outName, int *outMinKeyReq, int *outMaxKeyReq ) = 0;
  14. virtual void SetKeyPosition( int keyNum, Vector const &vPos ) = 0;
  15. virtual void InterpolatePosition( float time, Vector &vOut ) = 0;
  16. // Returns true if the key causes a change that changes the interpolated positions.
  17. virtual bool ProcessKey( char const *pName, char const *pValue ) = 0;
  18. };
  19. // Time modifiers.
  20. int Motion_GetNumberOfTimeModifiers( void );
  21. bool Motion_GetTimeModifierDetails( int timeInterpNum, char **outName );
  22. bool Motion_CalculateModifiedTime( float time, int timeModifierFuncNum, float *outNewTime );
  23. // Position interpolators.
  24. int Motion_GetNumberOfPositionInterpolators( void );
  25. IPositionInterpolator* Motion_GetPositionInterpolator( int interpNum );
  26. // Rotation interpolators.
  27. int Motion_GetNumberOfRotationInterpolators( void );
  28. bool Motion_GetRotationInterpolatorDetails( int rotInterpNum, char **outName, int *outMinKeyReq, int *outMaxKeyReq );
  29. bool Motion_InterpolateRotation( float time, int interpFuncNum, Quaternion &outQuatRotation );
  30. bool Motion_SetKeyAngles( int keyNum, Quaternion &quatAngles );
  31. #endif // KEYFRAME_H