"L. Spiro Engine"
|
A standard scene manager. More...
#include <LSESceneManager.h>
Public Member Functions | |
CDrawableModelInstancePtr LSE_CALL | CreateDrawableModelInstance (const LSCHAR *_pcFile) |
LSVOID LSE_CALL | Reset () |
LSVOID LSE_CALL | Render (LSE_SCREENS _sSection=LSE_S_FULL_SCREEN) |
LSVOID LSE_CALL | Render (CSharedCameraPtr _cpCam, LSBOOL _bUpdateCamState=true) |
LSVOID LSE_CALL | SetCamera (CSharedCameraPtr _cpCam, LSE_SCREENS _sScreen=LSE_S_FULL_SCREEN) |
CDirLightPtr LSE_CALL | CreateDirLight () |
CFloatTexture &LSE_CALL | GetShadowMapTexture () |
Protected Member Functions | |
LSVOID LSE_CALL | RenderDirLightShadowMapOpaque (LSUINT32 _ui32Index) |
LSVOID LSE_CALL | CreateDirLightShadowMapMatrix (LSUINT32 _ui32Index) |
LSVOID LSE_CALL | RenderAmbientPassOpaque (CRenderQueue &_rqSet) |
LSVOID LSE_CALL | RenderAmbientPassTrans (CRenderQueue &_rqSet) |
LSVOID LSE_CALL | RenderOpaque (CRenderQueue &_rqSet) |
LSVOID LSE_CALL | RenderTrans (CRenderQueue &_rqSet) |
LSBOOL LSE_CALL | CreateMainShadowMapTexture () |
Protected Attributes | |
CVector< CActorPtr, LSUINT32 > | m_vActors |
CSharedCameraPtr | m_cpCams [LSE_S_TOTAL] |
CVector< CLightBasePtr > | m_vLights |
CDrawableModelInstance::CDrawableMeshInstanceArray | m_miaMainMeshList |
CRenderQueueSet | m_rqsMainRenderQueueSet |
CVector3 | m_vFrustumCorners [8] |
CVector < CDrawableModelInstance::CDrawableMeshInstanceArray, LSUINT32 > | m_vLightMeshInstances |
CVector< CRenderQueueSet, LSUINT32 > | m_vLightRenderQueues |
CVectorPoD< CVector3, LSUINT32 > | m_vLightUvDepthFactors |
CFloatTexture | m_ftShadowMapTex |
LSBOOL | m_bShadows |
CVector3 | m_vCamDir |
CVector3 | m_vCamPos |
CFrustum | m_fFrustum |
CMatrix4x4 | m_mProj |
CMatrix4x4 | m_mView |
CMatrix4x4 | m_mInvView |
Static Protected Attributes | |
static CMatrix4x4 | m_mBias |
A standard scene manager.
Class CSceneManager Description: A standard scene manager. It holds all of the objects in a game world. There can be multiple of these in a game at a time, but usually there is only one. An example of when you would want to use a second (or more) scene graph is when you want to layer a second scene over another.
CDirLightPtr LSE_CALL lse::CSceneManager::CreateDirLight | ( | ) |
Creates and returns a directional light in the scene. The light is retained until the scene is reset or until explicitly removed from the scene.
LSVOID LSE_CALL lse::CSceneManager::CreateDirLightShadowMapMatrix | ( | LSUINT32 | _ui32Index | ) | [protected] |
Creates the projection matrix for a given directional light.
_ui32Index | The index of the directional light with which to create the shadow map. |
CDrawableModelInstancePtr LSE_CALL lse::CSceneManager::CreateDrawableModelInstance | ( | const LSCHAR * | _pcFile | ) |
Get a model instance pointer by file name.
_pcFile | Path of the file to load, if not loaded already. If the file has already been loaded, it is not loaded again. |
LSBOOL LSE_CALL lse::CSceneManager::CreateMainShadowMapTexture | ( | ) | [protected] |
Creates the main shadow map texture.
CFloatTexture& LSE_CALL lse::CSceneManager::GetShadowMapTexture | ( | ) |
Gets the depth texture used for shadow mapping.
LSVOID LSE_CALL lse::CSceneManager::Render | ( | CSharedCameraPtr | _cpCam, |
LSBOOL | _bUpdateCamState = true |
||
) |
Render the scene with a given camera.
_cpCam | The camera with which to render the scene. |
_bUpdateCamState | If true, the camera position, direction, and frustum used to render the scene updated to the those of the given camera. |
LSVOID LSE_CALL lse::CSceneManager::Render | ( | LSE_SCREENS | _sSection = LSE_S_FULL_SCREEN | ) |
Render the scene using the given screen render section.
_sSection | The section of the screen to render. |
LSVOID LSE_CALL lse::CSceneManager::RenderAmbientPassOpaque | ( | CRenderQueue & | _rqSet | ) | [protected] |
Performs an ambient pass.
_rqSet | The render queue to render. |
LSVOID LSE_CALL lse::CSceneManager::RenderAmbientPassTrans | ( | CRenderQueue & | _rqSet | ) | [protected] |
Performs an ambient pass.
_rqSet | The render queue to render. |
LSVOID LSE_CALL lse::CSceneManager::RenderDirLightShadowMapOpaque | ( | LSUINT32 | _ui32Index | ) | [protected] |
Creates a shadow map with the given directional light.
_ui32Index | The index of the directional light with which to create the shadow map. |
LSVOID LSE_CALL lse::CSceneManager::RenderOpaque | ( | CRenderQueue & | _rqSet | ) | [protected] |
Renders the opaque scene objects.
_rqSet | The render queue containing the opaque scene objects. |
LSVOID LSE_CALL lse::CSceneManager::RenderTrans | ( | CRenderQueue & | _rqSet | ) | [protected] |
Renders the transluscent scene objects.
_rqSet | The render queue containing the transluscent scene objects. |
LSVOID LSE_CALL lse::CSceneManager::Reset | ( | ) |
Reset the scene manager back to scratch.
LSVOID LSE_CALL lse::CSceneManager::SetCamera | ( | CSharedCameraPtr | _cpCam, |
LSE_SCREENS | _sScreen = LSE_S_FULL_SCREEN |
||
) |
Puts a camera into a given screen slot. Only one camera can be in a slot at a time, and that camera is used for rendering that screen when Render() is called.
_cpCam | The camera to set as the renderer for the given screen slot. |
_sScreen | The screen with which to associate the given camera. |
LSBOOL lse::CSceneManager::m_bShadows [protected] |
Do any lights cast shadows?
CSharedCameraPtr lse::CSceneManager::m_cpCams[LSE_S_TOTAL] [protected] |
Main cameras. One for each screen type.
CFrustum lse::CSceneManager::m_fFrustum [protected] |
The frustum to use for the current render.
CFloatTexture lse::CSceneManager::m_ftShadowMapTex [protected] |
The main shadow map texture.
CMatrix4x4 lse::CSceneManager::m_mBias [static, protected] |
The bias matrix.
CDrawableModelInstance::CDrawableMeshInstanceArray lse::CSceneManager::m_miaMainMeshList [protected] |
Temporary list of meshes that are to be drawn.
CMatrix4x4 lse::CSceneManager::m_mInvView [protected] |
Current inverse view matrix.
CMatrix4x4 lse::CSceneManager::m_mProj [protected] |
Current projection matrix.
CMatrix4x4 lse::CSceneManager::m_mView [protected] |
Current view matrix.
CRenderQueueSet lse::CSceneManager::m_rqsMainRenderQueueSet [protected] |
The primary render queue set.
CVector<CActorPtr, LSUINT32> lse::CSceneManager::m_vActors [protected] |
The master list of actors.
CVector3 lse::CSceneManager::m_vCamDir [protected] |
The camera direction to use for the current render.
CVector3 lse::CSceneManager::m_vCamPos [protected] |
The camera position to use for the current render.
CVector3 lse::CSceneManager::m_vFrustumCorners[8] [protected] |
The corner points of the last frustum.
CVector<CDrawableModelInstance::CDrawableMeshInstanceArray, LSUINT32> lse::CSceneManager::m_vLightMeshInstances [protected] |
Mesh arrays for each light.
CVector<CRenderQueueSet, LSUINT32> lse::CSceneManager::m_vLightRenderQueues [protected] |
Render queues for each light.
CVector<CLightBasePtr> lse::CSceneManager::m_vLights [protected] |
List of lights in the scene.
CVectorPoD<CVector3, LSUINT32> lse::CSceneManager::m_vLightUvDepthFactors [protected] |
U, V, and depth factors for each light.