public class DirectionalLightShadowRendererVR extends AbstractShadowRendererVR
| Modifier and Type | Field and Description | 
|---|---|
protected float | 
lambda  | 
protected DirectionalLight | 
light  | 
protected Vector3f[] | 
points  | 
protected Camera | 
shadowCam  | 
protected ColorRGBA | 
splits  | 
protected float[] | 
splitsArray  | 
assetManager, debug, dispPic, dummyTex, edgeFilteringMode, edgesThickness, fadeInfo, fadeLength, forcedRenderState, frustumCam, lightReceivers, lightViewProjectionsMatrices, matCache, nbShadowMaps, needsfallBackMaterial, postshadowMat, postTechniqueName, preshadowMat, profiler, renderBackFacesShadows, renderManager, shadowCompareMode, shadowFB, shadowIntensity, shadowMapOccluders, shadowMaps, shadowMapSize, skipPostPass, viewPort, zFarOverride| Constructor and Description | 
|---|
DirectionalLightShadowRendererVR()
Used for serialization use
 DirectionalLightShadowRenderer#DirectionalLightShadowRenderer(AssetManager
 assetManager, int shadowMapSize, int nbSplits) 
 | 
DirectionalLightShadowRendererVR(AssetManager assetManager,
                                int shadowMapSize,
                                int nbSplits)
Creates a DirectionalLight shadow renderer. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected boolean | 
checkCulling(Camera viewCam)
Directional light is always in the view frustum 
 | 
protected void | 
clearMaterialParameters(Material material)
This method is called once per frame and is responsible for clearing any
 material parameters that subclasses may need to clear on the post material. 
 | 
protected void | 
doDisplayFrustumDebug(int shadowMapIndex)
responsible for displaying the frustum of the shadow cam for debug
 purpose 
 | 
float | 
getLambda()
returns the lambda parameter see #setLambda(float lambda) 
 | 
DirectionalLight | 
getLight()
return the light used to cast shadows 
 | 
protected GeometryList | 
getOccludersToRender(int shadowMapIndex,
                    GeometryList shadowMapOccluders)
Returns a subclass-specific geometryList containing the occluders to be
 rendered in the shadow map 
 | 
protected void | 
getReceivers(GeometryList lightReceivers)  | 
protected Camera | 
getShadowCam(int shadowMapIndex)
return the shadow camera to use for rendering the shadow map according
 the given index 
 | 
protected void | 
initFrustumCam()
delegates the initialization of the frustum cam to child renderers 
 | 
boolean | 
isEnabledStabilization()
Check if the stabilization is enabled. 
 | 
void | 
read(JmeImporter im)
De-serialize this instance, for example when loading from a J3O file. 
 | 
void | 
setEnabledStabilization(boolean stabilize)
Enables the stabilization of the shadow's edges. 
 | 
void | 
setLambda(float lambda)
Adjusts the partition of the shadow extend into shadow maps. 
 | 
void | 
setLight(DirectionalLight light)
Sets the light to use to cast shadows 
 | 
protected void | 
setMaterialParameters(Material material)
This method is called once per frame and is responsible for setting any
 material parameters that subclasses may need to set on the post material. 
 | 
protected void | 
updateShadowCams(Camera viewCam)
Invoked once per frame to update the shadow cams according to the light
 view. 
 | 
void | 
write(JmeExporter ex)
Serialize this instance, for example when saving to a J3O file. 
 | 
cleanup, createFrustum, displayDebug, displayFrustum, displayShadowMap, getEdgeFilteringMode, getEdgesThickness, getPreShadowForcedRenderState, getShadowCompareMode, getShadowIntensity, getShadowZExtend, getShadowZFadeLength, initForcedRenderState, initialize, isFlushQueues, isInitialized, isRenderBackFacesShadows, postFrame, postQueue, preFrame, renderShadowMap, reshape, setEdgeFilteringMode, setEdgesThickness, setPostShadowMaterial, setPostShadowParams, setProfiler, setRenderBackFacesShadows, setShadowCompareMode, setShadowIntensity, setShadowZExtend, setShadowZFadeLengthprotected float lambda
protected Camera shadowCam
protected ColorRGBA splits
protected float[] splitsArray
protected DirectionalLight light
protected Vector3f[] points
public DirectionalLightShadowRendererVR()
public DirectionalLightShadowRendererVR(AssetManager assetManager, int shadowMapSize, int nbSplits)
assetManager - the application's asset managershadowMapSize - the size of the rendered shadowmaps (512, 1024, 2048,
     etcetera)nbSplits - the number of shadow maps rendered (More shadow maps yield
     better quality, fewer fps.)protected void initFrustumCam()
AbstractShadowRendererVRinitFrustumCam in class AbstractShadowRendererVRpublic DirectionalLight getLight()
public void setLight(DirectionalLight light)
light - a DirectionalLightprotected void updateShadowCams(Camera viewCam)
AbstractShadowRendererVRupdateShadowCams in class AbstractShadowRendererVRviewCam - the scene camprotected GeometryList getOccludersToRender(int shadowMapIndex, GeometryList shadowMapOccluders)
AbstractShadowRendererVRgetOccludersToRender in class AbstractShadowRendererVRshadowMapIndex - the index of the shadow map being renderedshadowMapOccluders - the list of occludersprotected void getReceivers(GeometryList lightReceivers)
getReceivers in class AbstractShadowRendererVRprotected Camera getShadowCam(int shadowMapIndex)
AbstractShadowRendererVRgetShadowCam in class AbstractShadowRendererVRshadowMapIndex - the index of the shadow map being renderedprotected void doDisplayFrustumDebug(int shadowMapIndex)
AbstractShadowRendererVRdoDisplayFrustumDebug in class AbstractShadowRendererVRprotected void setMaterialParameters(Material material)
AbstractShadowRendererVRsetMaterialParameters in class AbstractShadowRendererVRmaterial - the material to use for the post shadow passprotected void clearMaterialParameters(Material material)
AbstractShadowRendererVRclearMaterialParameters in class AbstractShadowRendererVRmaterial - the material that was used for the post shadow passpublic float getLambda()
public void setLambda(float lambda)
lambda - the lambda value.public boolean isEnabledStabilization()
true if stabilization is enabled and false otherwise.public void setEnabledStabilization(boolean stabilize)
stabilize - true if stabilization has to be enabled and false otherwise.public void read(JmeImporter im) throws java.io.IOException
AbstractShadowRendererVRread in interface Savableread in class AbstractShadowRendererVRim - importer (not null)java.io.IOExceptionpublic void write(JmeExporter ex) throws java.io.IOException
AbstractShadowRendererVRwrite in interface Savablewrite in class AbstractShadowRendererVRex - exporter (not null)java.io.IOExceptionprotected boolean checkCulling(Camera viewCam)
checkCulling in class AbstractShadowRendererVRviewCam -