summaryrefslogtreecommitdiff
path: root/Runtime/Camera/OcclusionArea.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-08-14 22:50:43 +0800
committerchai <chaifix@163.com>2019-08-14 22:50:43 +0800
commit15740faf9fe9fe4be08965098bbf2947e096aeeb (patch)
treea730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/Camera/OcclusionArea.h
+Unity Runtime codeHEADmaster
Diffstat (limited to 'Runtime/Camera/OcclusionArea.h')
-rw-r--r--Runtime/Camera/OcclusionArea.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/Runtime/Camera/OcclusionArea.h b/Runtime/Camera/OcclusionArea.h
new file mode 100644
index 0000000..6610cb4
--- /dev/null
+++ b/Runtime/Camera/OcclusionArea.h
@@ -0,0 +1,46 @@
+#ifndef OCCLUSION_AREA_H
+#define OCCLUSION_AREA_H
+
+#include "Runtime/BaseClasses/GameObject.h"
+#include "Runtime/Math/Vector3.h"
+
+class OcclusionArea : public Unity::Component {
+public:
+ OcclusionArea ();
+
+ REGISTER_DERIVED_CLASS (OcclusionArea, Component)
+ DECLARE_OBJECT_SERIALIZE (OcclusionArea)
+
+ OcclusionArea (MemLabelId label, ObjectCreationMode mode);
+
+ virtual void Reset();
+
+ void SetCenter (const Vector3f& center) { m_Center = center; SetDirty(); }
+ const Vector3f& GetCenter () const { return m_Center; }
+
+ void SetSize (const Vector3f& size) { m_Size = size; SetDirty(); }
+ const Vector3f& GetSize () const { return m_Size; }
+
+ void SetViewVolume (bool isViewVolume) { m_IsViewVolume = isViewVolume; SetDirty(); }
+ bool GetViewVolume () const { return m_IsViewVolume; }
+
+ Vector3f GetGlobalExtents () const;
+ Vector3f GetGlobalCenter () const;
+
+ static void InitializeClass ();
+ static void CleanupClass () { }
+
+private:
+
+ Vector3f m_Size;
+ Vector3f m_Center;
+
+ bool m_IsViewVolume;
+
+// bool m_OverrideResolution;
+// float m_SmallestVoxelSize;
+// float m_SmallestHoleSize;
+// float m_BackfaceCulling;
+};
+
+#endif