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.

46 lines
1.2 KiB

  1. //====== Copyright � 1996-2005, Valve Corporation, All rights reserved. =======
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef VIRTUALMESH_H
  7. #define VIRTUALMESH_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. // NOTE: These are fixed length to make it easy to fill these out without memory allocation or storage
  12. const int MAX_VIRTUAL_TRIANGLES = 1024;
  13. struct virtualmeshlist_t
  14. {
  15. Vector *pVerts;
  16. int indexCount;
  17. int triangleCount;
  18. int vertexCount;
  19. int surfacePropsIndex;
  20. byte *pHull;
  21. unsigned short indices[MAX_VIRTUAL_TRIANGLES*3];
  22. };
  23. struct virtualmeshtrianglelist_t
  24. {
  25. int triangleCount;
  26. unsigned short triangleIndices[MAX_VIRTUAL_TRIANGLES*3];
  27. };
  28. class IVirtualMeshEvent
  29. {
  30. public:
  31. virtual void GetVirtualMesh( void *userData, virtualmeshlist_t *pList ) = 0;
  32. virtual void GetWorldspaceBounds( void *userData, Vector *pMins, Vector *pMaxs ) = 0;
  33. virtual void GetTrianglesInSphere( void *userData, const Vector &center, float radius, virtualmeshtrianglelist_t *pList ) = 0;
  34. };
  35. struct virtualmeshparams_t
  36. {
  37. IVirtualMeshEvent *pMeshEventHandler;
  38. void *userData;
  39. bool buildOuterHull;
  40. };
  41. #endif // VIRTUALMESH_H