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.

87 lines
2.9 KiB

  1. //===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose:
  4. //
  5. // $Revision: $
  6. // $NoKeywords: $
  7. //
  8. // This file contains a little interface to deal with static prop collisions
  9. //
  10. //===========================================================================//
  11. #ifndef STATICPROPMGR_H
  12. #define STATICPROPMGR_H
  13. #include "mathlib/vector.h"
  14. #include "engine/IStaticPropMgr.h"
  15. // FIXME: Remove! Only here for the test against old code
  16. #include "enginetrace.h"
  17. //-----------------------------------------------------------------------------
  18. // foward declarations
  19. //-----------------------------------------------------------------------------
  20. class ICollideable;
  21. FORWARD_DECLARE_HANDLE( LightCacheHandle_t );
  22. class IPooledVBAllocator;
  23. DECLARE_LOGGING_CHANNEL( LOG_StaticPropManager );
  24. //-----------------------------------------------------------------------------
  25. // The engine's static prop manager
  26. //-----------------------------------------------------------------------------
  27. abstract_class IStaticPropMgrEngine
  28. {
  29. public:
  30. virtual bool Init() = 0;
  31. virtual void Shutdown() = 0;
  32. // Call at the beginning of the level, will unserialize all static
  33. // props and add them to the main collision tree
  34. virtual void LevelInit() = 0;
  35. // Call this when there's a client, *after* LevelInit, and after the world entity is loaded
  36. virtual void LevelInitClient() = 0;
  37. // Call this when there's a client, *before* LevelShutdown
  38. virtual void LevelShutdownClient() = 0;
  39. // Call at the end of the level, cleans up the static props
  40. virtual void LevelShutdown() = 0;
  41. // Call this to recompute static prop lighting when necessary
  42. virtual void RecomputeStaticLighting() = 0;
  43. // Check if a static prop is in a particular PVS.
  44. virtual bool IsPropInPVS( IHandleEntity *pHandleEntity, const byte *pVis ) const = 0;
  45. // temp - loadtime setting of flag to disable CSM rendering for static prop.
  46. virtual void DisableCSMRenderingForStaticProp( int staticPropIndex ) = 0;
  47. // returns a collideable interface to static props
  48. virtual ICollideable *GetStaticProp( IHandleEntity *pHandleEntity ) = 0;
  49. // returns the lightcache handle associated with a static prop
  50. virtual LightCacheHandle_t GetLightCacheHandleForStaticProp( IHandleEntity *pHandleEntity ) = 0;
  51. // Is a base handle a static prop?
  52. virtual bool IsStaticProp( IHandleEntity *pHandleEntity ) const = 0;
  53. virtual bool IsStaticProp( CBaseHandle handle ) const = 0;
  54. // Returns the static prop index (useful for networking)
  55. virtual int GetStaticPropIndex( IHandleEntity *pHandleEntity ) const = 0;
  56. virtual void ConfigureSystemLevel( int nCPULevel, int nGPULevel ) = 0;
  57. virtual void RestoreStaticProps() = 0;
  58. };
  59. //-----------------------------------------------------------------------------
  60. // Singleton access
  61. //-----------------------------------------------------------------------------
  62. IStaticPropMgrEngine* StaticPropMgr();
  63. #endif // STATICPROPMGR_H