summaryrefslogtreecommitdiff
path: root/Runtime/Graphics/LightProbeGroup.h
blob: 3ca61a3ccab8934806f956d8402e78d8f29641e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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