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/Graphics/LightProbeGroup.h |
Diffstat (limited to 'Runtime/Graphics/LightProbeGroup.h')
-rw-r--r-- | Runtime/Graphics/LightProbeGroup.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/Runtime/Graphics/LightProbeGroup.h b/Runtime/Graphics/LightProbeGroup.h new file mode 100644 index 0000000..3ca61a3 --- /dev/null +++ b/Runtime/Graphics/LightProbeGroup.h @@ -0,0 +1,41 @@ +#ifndef LIGHTPROBEGROUP_H +#define LIGHTPROBEGROUP_H + +#include "Runtime/GameCode/Behaviour.h" +#include "Runtime/Math/Vector3.h" +#include "Runtime/Utilities/LinkedList.h" +#include "Runtime/Utilities/dynamic_array.h" + +class LightProbeGroup : public Behaviour +{ +public: + REGISTER_DERIVED_CLASS (LightProbeGroup, Behaviour) + DECLARE_OBJECT_SERIALIZE (LightProbeGroup) + + LightProbeGroup (MemLabelId label, ObjectCreationMode mode); + +#if UNITY_EDITOR + void SetPositions(Vector3f* data, int size) { m_SourcePositions.assign(data, data + size); SetDirty(); } + Vector3f* GetPositions() { return m_SourcePositions.size() > 0 ? &m_SourcePositions[0] : NULL; } + int GetPositionsSize() { return m_SourcePositions.size(); } + + virtual void AddToManager (); + virtual void RemoveFromManager (); +#else + virtual void AddToManager () {} + virtual void RemoveFromManager () {} +#endif + +private: +#if UNITY_EDITOR + dynamic_array<Vector3f> m_SourcePositions; + ListNode<LightProbeGroup> m_LightProbeGroupNode; +#endif +}; + +#if UNITY_EDITOR +typedef List< ListNode<LightProbeGroup> > LightProbeGroupList; +LightProbeGroupList& GetLightProbeGroups (); +#endif + +#endif |