summaryrefslogtreecommitdiff
path: root/engine/IOcclusionSystem.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /engine/IOcclusionSystem.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'engine/IOcclusionSystem.h')
-rw-r--r--engine/IOcclusionSystem.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/engine/IOcclusionSystem.h b/engine/IOcclusionSystem.h
new file mode 100644
index 0000000..1b65f4c
--- /dev/null
+++ b/engine/IOcclusionSystem.h
@@ -0,0 +1,55 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//
+//=============================================================================//
+
+#ifndef IOCCLUSIONSYSTEM_H
+#define IOCCLUSIONSYSTEM_H
+
+#ifdef _WIN32
+#pragma once
+#endif
+
+
+class Vector;
+class VMatrix;
+struct model_t;
+class VPlane;
+class CUtlBuffer;
+
+
+//-----------------------------------------------------------------------------
+// Occlusion system interface
+//-----------------------------------------------------------------------------
+class IOcclusionSystem
+{
+public:
+ // Activate/deactivate an occluder brush model
+ virtual void ActivateOccluder( int nOccluderIndex, bool bActive ) = 0;
+
+ // Sets the view transform
+ virtual void SetView( const Vector &vecCameraPos, float flFOV, const VMatrix &worldToCamera,
+ const VMatrix &cameraToProjection, const VPlane &nearClipPlane ) = 0;
+
+ // Test for occlusion (bounds specified in abs space)
+ virtual bool IsOccluded( const Vector &vecAbsMins, const Vector &vecAbsMaxs ) = 0;
+
+ // Sets global occlusion parameters
+ virtual void SetOcclusionParameters( float flMaxOccludeeArea, float flMinOccluderArea ) = 0;
+ virtual float MinOccluderArea() const = 0;
+
+ // Render debugging overlay
+ virtual void DrawDebugOverlays() = 0;
+};
+
+
+//-----------------------------------------------------------------------------
+// Singleton accessor
+//-----------------------------------------------------------------------------
+IOcclusionSystem *OcclusionSystem();
+
+
+#endif // IOCCLUSIONSYSTEM_H