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.

56 lines
1.6 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #ifndef IOCCLUSIONSYSTEM_H
  9. #define IOCCLUSIONSYSTEM_H
  10. #ifdef _WIN32
  11. #pragma once
  12. #endif
  13. class Vector;
  14. class VMatrix;
  15. struct model_t;
  16. class VPlane;
  17. class CUtlBuffer;
  18. //-----------------------------------------------------------------------------
  19. // Occlusion system interface
  20. //-----------------------------------------------------------------------------
  21. class IOcclusionSystem
  22. {
  23. public:
  24. // Activate/deactivate an occluder brush model
  25. virtual void ActivateOccluder( int nOccluderIndex, bool bActive ) = 0;
  26. // Sets the view transform
  27. virtual void SetView( const Vector &vecCameraPos, float flFOV, const VMatrix &worldToCamera,
  28. const VMatrix &cameraToProjection, const VPlane &nearClipPlane ) = 0;
  29. virtual int GetViewId() const = 0;
  30. // Test for occlusion (bounds specified in abs space)
  31. virtual bool IsOccluded( int occlusionViewId, const Vector &vecAbsMins, const Vector &vecAbsMaxs ) = 0;
  32. // Sets global occlusion parameters
  33. virtual void SetOcclusionParameters( float flMaxOccludeeArea, float flMinOccluderArea ) = 0;
  34. virtual float MinOccluderArea() const = 0;
  35. // Render debugging overlay
  36. virtual void DrawDebugOverlays() = 0;
  37. };
  38. //-----------------------------------------------------------------------------
  39. // Singleton accessor
  40. //-----------------------------------------------------------------------------
  41. IOcclusionSystem *OcclusionSystem();
  42. #endif // IOCCLUSIONSYSTEM_H