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.

50 lines
1.2 KiB

  1. //========= Copyright c 1996-2008, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef PHYS_LEVEL_HAVOK_H
  8. #define PHYS_LEVEL_HAVOK_H
  9. #include "platform.h"
  10. #include "basetypes.h"
  11. #include "datalinker.h"
  12. #include "bspfile.h"
  13. #include "bitvec.h"
  14. #include "vphysics2_interface.h"
  15. extern byte *g_pPhysLevel;
  16. extern int g_PhysLevelSize;
  17. class CPhysLevelHavokEmitter: public DataLinker::Stream
  18. {
  19. public:
  20. CPhysLevelHavokEmitter();
  21. ~CPhysLevelHavokEmitter();
  22. void Emit();
  23. protected:
  24. void AddBrushes(int headnode, CVarBitVec &isBrushAdded);
  25. void ConvertBrushesToPolytopes(CVarBitVec &useBrushIn, CUtlVector<IPhysics2CookedPolytope*> &arrPolytopesOut);
  26. protected:
  27. public:
  28. bool m_bConvertBrushesToMopp, m_buildInertia, m_exportObjMopp;
  29. int m_numModels;
  30. dmodel_t *m_pModels;
  31. dnode_t *m_pNodes;
  32. dleaf_t *m_pLeafs;
  33. dbrush_t *m_pBrushes;
  34. dbrushside_t *m_pBrushSides;
  35. int m_numBrushes;
  36. dplane_t *m_pPlanes;
  37. unsigned short *m_pLeafBrushes;
  38. IPhysics2 *m_physics;
  39. IPhysics2Cook *m_cook;
  40. };
  41. #endif