Team Fortress 2 Source Code as on 22/4/2020
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.

55 lines
1.5 KiB

  1. //========= Copyright 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. // Test for occlusion (bounds specified in abs space)
  30. virtual bool IsOccluded( const Vector &vecAbsMins, const Vector &vecAbsMaxs ) = 0;
  31. // Sets global occlusion parameters
  32. virtual void SetOcclusionParameters( float flMaxOccludeeArea, float flMinOccluderArea ) = 0;
  33. virtual float MinOccluderArea() const = 0;
  34. // Render debugging overlay
  35. virtual void DrawDebugOverlays() = 0;
  36. };
  37. //-----------------------------------------------------------------------------
  38. // Singleton accessor
  39. //-----------------------------------------------------------------------------
  40. IOcclusionSystem *OcclusionSystem();
  41. #endif // IOCCLUSIONSYSTEM_H