Skip to content

LightingShadowMapManager

LuisAntonRebollo edited this page Dec 4, 2013 · 1 revision
<SCRIPT SRC="../../../include/tutorial.js" LANGUAGE="JavaScript"></SCRIPT> <SCRIPT SRC="../../../include/prototype.js" LANGUAGE="JavaScript"></SCRIPT> <SCRIPT SRC="../../../include/scriptaculous.js" LANGUAGE="JavaScript"></SCRIPT> <SCRIPT SRC="../../../include/glossaryLookUp.js" LANGUAGE="JavaScript"></SCRIPT> <SCRIPT SRC="../../../include/referenceLookUp.js" LANGUAGE="JavaScript"></SCRIPT> <SCRIPT SRC="../../../include/component.js" LANGUAGE="JavaScript"></SCRIPT> <SCRIPT SRC="../../../include/componentContainer.js" LANGUAGE="JavaScript"></SCRIPT> <SCRIPT>DocImagePath = "../../../";</SCRIPT> <script> // this script chunk is to update the ToC to the current doc and expand it pageID = 25; parent.leftFrame.expandToItem('tree2', 'doc25'); var element = parent.leftFrame.document.getElementById('doc25'); if((element) && (element.className==parent.leftFrame.nodeClosedClass)) { element.className = parent.leftFrame.nodeOpenClass } ; </script> <title>Torque 3D/Engine/ShadowMapManager</title>

ShadowMapManager Class Reference


deactivate()

Called when the ShadowMapManager should be decactivated. The ShadowMapManager will notify the SceneManger to remove its onPreRender function from the pre-render signal, clean up the shadow texture memory and makes its self no longer active.



Syntax

deactivate()

Returns

No return value.


Examples
// Called from within the AdvancedLightManager::deactivate, SHADOWMGR is a #define
// of the ShadowMapManager::instance() function.
SHADOWMGR->deactivate();

activate()

Called when the ShadowMapManager should become active. If the ShadowMapManager is unable to retrieve a SceneManager through the internal method getSceneManager then it will return a console error saying it was unable to active the ShadowMapManager and return out of the function. If it is able to retrieve the SceneManager then it will notify the SceneManager of its onPreRender function and turn its self active.



Syntax

activate()

Returns

No return value.


Examples
// Called from within the AdvancedLightManager::activate, SHADOWMGR is a #define
// of the ShadowMapManager::instance() function.
SHADOWMGR->activate();

setLightShadowMapForLight( LightInfo * )

Looks up the shadow map for the light then sets it.



Syntax

setLightShadowMapForLight(LightInfo *light )
  • light: Will use this variable to look up the potential ShadowMapParams.

Returns

No return value.


Examples
// Set light holds the active shadow map.       
mShadowManager->setLightShadowMapForLight( sunLight );

setLightShadowMap( LightShadowMap *)

Sets the current shadowmap (used in setLightInfo/setTextureStage calls).



Syntax

setLightShadowMap(LightShadowMap *lm )
  • lm: The current shadow map that will be assigned to the classes internal "LightShadowMap *mCurrentShadowMap" variable.

Returns

No return value.


Examples
// While traversing the shadow maps in "ShadowMapPass::render".
LightShadowMap *lsm = shadowMaps[i];
mShadowManager->setLightShadowMap( lsm );
Clone this wiki locally