summaryrefslogtreecommitdiff
path: root/Runtime/Camera/OcclusionArea.h
blob: 6610cb4df2eb43d7f32932fd3ca4ee5f8e36cf1f (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
#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