diff options
author | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
commit | 15740faf9fe9fe4be08965098bbf2947e096aeeb (patch) | |
tree | a730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/Camera/OcclusionPortal.h |
Diffstat (limited to 'Runtime/Camera/OcclusionPortal.h')
-rw-r--r-- | Runtime/Camera/OcclusionPortal.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Runtime/Camera/OcclusionPortal.h b/Runtime/Camera/OcclusionPortal.h new file mode 100644 index 0000000..48bface --- /dev/null +++ b/Runtime/Camera/OcclusionPortal.h @@ -0,0 +1,37 @@ +#ifndef OCCLUSION_PORTAL_H +#define OCCLUSION_PORTAL_H + +#include "Runtime/GameCode/Behaviour.h" +#include "Runtime/Math/Vector3.h" + +class OcclusionPortal : public Unity::Component +{ +public: + REGISTER_DERIVED_CLASS (OcclusionPortal, Component) + DECLARE_OBJECT_SERIALIZE (OcclusionPortal) + + OcclusionPortal (MemLabelId label, ObjectCreationMode mode); + + void SetPortalIndex (int portalIndex) { m_PortalIndex = portalIndex; } + + void SetIsOpen (bool opened); + bool GetIsOpen () { return m_Open; } + + + Vector3f GetCenter () { return m_Center; } + Vector3f GetSize () { return m_Size; } + + bool CalculatePortalEnabled (); + + virtual void AwakeFromLoad (AwakeFromLoadMode mode); + virtual void Deactivate (DeactivateOperation operation); + + private: + + Vector3f m_Center; + Vector3f m_Size; + int m_PortalIndex; + bool m_Open; +}; + +#endif
\ No newline at end of file |