summaryrefslogtreecommitdiff
path: root/src/renderer/CutsceneShadow.h
blob: a59fe78f59480bf146488658a4cbebdc56a1d3e1 (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
51
52
#pragma once
#include "ShadowCamera.h"

class CCutsceneShadow
{
public:
	enum
	{
		RASTER = 0,
		RESAMPLE,
		BLUR,
		GRADIENT,
	};

	CShadowCamera m_Camera;
	bool          m_bResample;
	CShadowCamera m_ResampleCamera;
	int32         m_nBlurPasses;
	CShadowCamera m_BlurCamera;
	bool          m_bGradient;
	CShadowCamera m_GradientCamera;
	
	union
	{
		RwObject *m_pObject;
		RpAtomic *m_pAtomic;
		RpClump  *m_pClump;
	};
	
	int32    m_nRwObjectType;
	RpLight *m_pLight;
	RwSphere m_BoundingSphere;
	RwSphere m_BaseSphere;
	
	CCutsceneShadow();
	~CCutsceneShadow();
	
	RwSphere GetBaseSphere()
	{
		return m_BaseSphere;
	}

	bool Create(RwObject *object, int32 rasterSize, bool resample, int32 blurPasses, bool gradient);
	RwFrame *SetLightProperties(float angleY, float angleX, bool setLight);
	bool IsInitialized();
	void Destroy();
	RwRaster *Update();
	RwTexture *UpdateForCutscene();
	CShadowCamera *GetShadowCamera(int32 camType = RASTER);
	RwTexture *GetShadowRwTexture();
	void DrawBorderAroundTexture(RwRGBA  const& color);
};