My Project
IScene.h
1 #pragma once
2 
3 namespace ParaEngine
4 {
5  class CSunLight;
6  class CBaseCamera;
7  struct SceneState;
8 
12  class IScene
13  {
14  public:
15 
17  virtual bool IsRenderSky() = 0;
18  virtual void EnableSkyRendering(bool bEnable) = 0;
19 
21  virtual void SetBackGroundColor(const LinearColor& bgColor) = 0;
23  virtual LinearColor GetBackGroundColor() = 0;
24 
26  virtual void SetFogColorFactor(const LinearColor& fogColorFactor) = 0;
27  virtual const LinearColor& GetFogColorFactor() = 0;
28  virtual void SetFogColor(const LinearColor& fogColor) = 0;
29  virtual LinearColor GetFogColor() = 0;
30  virtual void SetFogStart(float fFogStart) = 0;
31  virtual float GetFogStart() = 0;
32  virtual void SetFogEnd(float fFogEnd) = 0;
33  virtual float GetFogEnd() = 0;
34  virtual void SetFogDensity(float fFogDensity) = 0;
35  virtual float GetFogDensity() = 0;
36  virtual void EnableFog(bool bEnableFog) = 0;
37  virtual bool IsFogEnabled() = 0;
38 
40  virtual bool IsLightEnabled() = 0;
42  virtual void EnableLight(bool bEnable) = 0;
43 
45  virtual CSunLight& GetSunLight() = 0;
46 
47  virtual CBaseCamera* GetCurrentCamera() = 0;
48 
49  virtual Vector3 GetRenderOrigin() = 0;
50 
52  virtual SceneState* GetSceneState()=0;
53 
55  virtual bool IsSunLightEnabled()=0;
56 
58  virtual void EnableSunLight(bool bEnable) = 0;
59 
61  virtual void SetShadow(bool bRenderShadow) {};
62 
64  virtual float GetShadowRadius() {return 0.f;};
65 
67  virtual bool IsShadowMapEnabled(){return false;};
68 
73  virtual bool PrepareRenderObject(CBaseObject* pObj, CBaseCamera* pCamera, SceneState& sceneState) { return true; };
74 
79  virtual CBaseObject* GetGlobalObject(const std::string& sName) { return NULL; };
80  };
81 
82 }
virtual bool IsSunLightEnabled()=0
get light enable state
virtual CSunLight & GetSunLight()=0
get sun light object
It's used as parameter to Draw method of each scene object.
Definition: SceneState.h:284
virtual bool IsRenderSky()=0
whether rendering the sky
Basic scene interface: implemented by the CSceneObject and CMiniScenegraph class. ...
Definition: IScene.h:12
different physics engine has different winding order.
Definition: EventBinding.h:32
virtual void EnableSunLight(bool bEnable)=0
whether use light
Modeling the global sun and its directional light, including sun position, direction, color, time of day, etc.
Definition: SunLight.h:26
virtual void SetBackGroundColor(const LinearColor &bgColor)=0
set the color of the scene ground when it is not enabled.When scene is enabled, the background color ...
virtual LinearColor GetBackGroundColor()=0
Get the color of the scene ground when it is not enabled.When scene is enabled, the background color ...
virtual bool IsShadowMapEnabled()
whether render using shadow map
Definition: IScene.h:67
Standard 3-dimensional vector.
Definition: ParaVector3.h:16
Definition: BaseCamera.h:70
virtual CBaseObject * GetGlobalObject(const std::string &sName)
get the global object by its name.
Definition: IScene.h:79
virtual bool PrepareRenderObject(CBaseObject *pObj, CBaseCamera *pCamera, SceneState &sceneState)
automatically prepare the node for rendering by placing it to the current render pipeline.
Definition: IScene.h:73
virtual void EnableLight(bool bEnable)=0
whether use light
virtual bool IsLightEnabled()=0
get light enable state
Defines the base class of all scene elements:CBaseObject for Parallel World Engine.
Definition: BaseObject.h:230
virtual void SetShadow(bool bRenderShadow)
whether render shadow
Definition: IScene.h:61
virtual SceneState * GetSceneState()=0
get the scene state
virtual void SetFogColorFactor(const LinearColor &fogColorFactor)=0
fog parameters
A linear, 32-bit/component floating point RGBA color.
Definition: ParaColor.h:12
virtual float GetShadowRadius()
whether render shadow
Definition: IScene.h:64