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.

94 lines
2.8 KiB

  1. //====== Copyright � 1996-2007, Valve Corporation, All rights reserved. =======
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef MDLLIB_COMMON_H
  7. #define MDLLIB_COMMON_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "mdllib/mdllib.h"
  12. #include "platform.h"
  13. #pragma warning( disable : 4018 )
  14. #pragma warning( disable : 4389 )
  15. DECLARE_LOGGING_CHANNEL( LOG_ModelLib );
  16. //-----------------------------------------------------------------------------
  17. // Purpose: Interface to accessing P4 commands
  18. //-----------------------------------------------------------------------------
  19. class CMdlLib : public CBaseAppSystem< IMdlLib >
  20. {
  21. public:
  22. // Destructor
  23. virtual ~CMdlLib();
  24. //////////////////////////////////////////////////////////////////////////
  25. //
  26. // Methods of IAppSystem
  27. //
  28. //////////////////////////////////////////////////////////////////////////
  29. public:
  30. virtual bool Connect( CreateInterfaceFn factory );
  31. virtual InitReturnVal_t Init();
  32. virtual void *QueryInterface( const char *pInterfaceName );
  33. virtual void Shutdown();
  34. virtual void Disconnect();
  35. //////////////////////////////////////////////////////////////////////////
  36. //
  37. // Methods of IMdlLib
  38. //
  39. //////////////////////////////////////////////////////////////////////////
  40. public:
  41. //
  42. // StripModelBuffers
  43. // The main function that strips the model buffers
  44. // mdlBuffer - mdl buffer, updated, no size change
  45. // vvdBuffer - vvd buffer, updated, size reduced
  46. // vtxBuffer - vtx buffer, updated, size reduced
  47. // ppStripInfo - if nonzero on return will be filled with the stripping info
  48. //
  49. virtual bool StripModelBuffers( CUtlBuffer &mdlBuffer, CUtlBuffer &vvdBuffer, CUtlBuffer &vtxBuffer, IMdlStripInfo **ppStripInfo );
  50. //
  51. // CreateNewStripInfo
  52. // Creates an empty strip info so that it can be reused.
  53. //
  54. virtual bool CreateNewStripInfo( IMdlStripInfo **ppStripInfo );
  55. //
  56. // ParseMdlMesh
  57. // The main function that parses the mesh buffers
  58. // mdlBuffer - mdl buffer
  59. // vvdBuffer - vvd buffer
  60. // vtxBuffer - vtx buffer
  61. // mesh - on return will be filled with the mesh info
  62. //
  63. virtual bool ParseMdlMesh( CUtlBuffer &mdlBuffer, CUtlBuffer &vvdBuffer, CUtlBuffer &vtxBuffer, MdlLib::MdlMesh &mesh );
  64. //
  65. // PrepareModelForPs3
  66. // The main function that strips the model buffers
  67. // mdlBuffer - mdl buffer, updated, size possibly increased
  68. // vvdBuffer - vvd buffer, updated, size possibly increased
  69. // vtxBuffer - vtx buffer, updated, size possibly increased
  70. // ppStripInfo - if nonzero on return will be filled with the stripping info
  71. //
  72. virtual bool PrepareModelForPs3( CUtlBuffer &mdlBuffer, CUtlBuffer &vvdBuffer, CUtlBuffer &vtxBuffer, IMdlStripInfo **ppStripInfo )
  73. #if defined( PS3SDK_INSTALLED )
  74. ;
  75. #else
  76. {
  77. return false;
  78. }
  79. #endif
  80. };
  81. #endif // #ifndef MDLLIB_COMMON_H