summaryrefslogtreecommitdiff
path: root/Runtime/Graphics/LightProbeGroup.cpp
blob: 1b19bcb263a005e91d2aa31387213fa924b0e9e8 (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
42
43
44
45
46
47
48
49
50
#include "UnityPrefix.h"
#include "LightProbeGroup.h"
#include "Configuration/UnityConfigure.h"
#include "Runtime/Serialize/TransferFunctions/SerializeTransfer.h"

using namespace std;

#if UNITY_EDITOR
static LightProbeGroupList gAllLightProbeGroups;
#endif

LightProbeGroup::LightProbeGroup (MemLabelId label, ObjectCreationMode mode)
:	Super(label, mode)
#if UNITY_EDITOR
	, m_LightProbeGroupNode (this)
#endif
{
}

LightProbeGroup::~LightProbeGroup ()
{
}

IMPLEMENT_CLASS (LightProbeGroup)
IMPLEMENT_OBJECT_SERIALIZE (LightProbeGroup)

template<class T> inline
void LightProbeGroup::Transfer (T& transfer)
{
	Super::Transfer (transfer);
	
	TRANSFER_EDITOR_ONLY (m_SourcePositions);
}

#if UNITY_EDITOR
void LightProbeGroup::AddToManager ()
{
	gAllLightProbeGroups.push_back (m_LightProbeGroupNode);
}

void LightProbeGroup::RemoveFromManager ()
{
	m_LightProbeGroupNode.RemoveFromList ();
}

LightProbeGroupList& GetLightProbeGroups ()
{
	return gAllLightProbeGroups;
}
#endif