Package com.jme3.shadow
Class AbstractShadowRendererVR
java.lang.Object
com.jme3.shadow.AbstractShadowRendererVR
- All Implemented Interfaces:
- Savable,- SceneProcessor
- Direct Known Subclasses:
- DirectionalLightShadowRendererVR
@Deprecated
public abstract class AbstractShadowRendererVR
extends Object
implements SceneProcessor, Savable
Deprecated.
The jme3-vr module is deprecated and will be removed in a future version (as it only supports OpenVR).
             For new Virtual Reality projects, use user libraries that provide OpenXR support.
             See Virtual Reality JME wiki section
             for more information.
Abstract shadow renderer that holds commons feature to have for a shadow
 renderer.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected AssetManagerDeprecated.protected booleanDeprecated.protected Picture[]Deprecated.protected Texture2DDeprecated.protected EdgeFilteringModeDeprecated.protected floatDeprecated.protected Vector2fDeprecated.protected floatDeprecated.protected RenderStateDeprecated.protected CameraDeprecated.protected GeometryListDeprecated.protected Matrix4f[]Deprecated.Deprecated.list of materials for post shadow queue geometriesprotected intDeprecated.protected booleanDeprecated.true if the fallback material should be used, otherwise falseprotected MaterialDeprecated.protected StringDeprecated.name of the post material techniqueprotected MaterialDeprecated.protected AppProfilerDeprecated.protected booleanDeprecated.protected RenderManagerDeprecated.protected CompareModeDeprecated.protected FrameBuffer[]Deprecated.protected floatDeprecated.protected GeometryListDeprecated.protected Texture2D[]Deprecated.protected floatDeprecated.protected booleanDeprecated.true to skip the post pass when there are no shadow castersprotected ViewPortDeprecated.protected floatDeprecated.fade shadows at distance
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedDeprecated.used for serializationprotectedAbstractShadowRendererVR(AssetManager assetManager, int shadowMapSize, int nbShadowMaps) Deprecated.Create an abstract shadow renderer.
- 
Method SummaryModifier and TypeMethodDescriptionprotected abstract booleancheckCulling(Camera viewCam) Deprecated.returns true if the light source bounding box is in the view frustumvoidcleanup()Deprecated.Called when the SP is removed from the RM.protected abstract voidclearMaterialParameters(Material material) Deprecated.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 GeometrycreateFrustum(Vector3f[] pts, int i) Deprecated.debug function to create a visible frustumvoidDeprecated.For debugging purposes, "snapshot" the current frustum to the scene.voidDeprecated.Force the frustum to be displayed.protected voidDeprecated.For debugging purposes, display depth shadow maps.protected voiddoDisplayFrustumDebug(int shadowMapIndex) Deprecated.responsible for displaying the frustum of the shadow cam for debug purposeDeprecated.Get the edge filtering mode.intDeprecated.returns the edges thicknessprotected abstract GeometryListgetOccludersToRender(int shadowMapIndex, GeometryList shadowMapOccluders) Deprecated.Returns a subclass-specific geometryList containing the occluders to be rendered in the shadow mapDeprecated.Returns the pre shadows pass render state.protected abstract voidgetReceivers(GeometryList lightReceivers) Deprecated.protected abstract CameragetShadowCam(int shadowMapIndex) Deprecated.return the shadow camera to use for rendering the shadow map according the given indexDeprecated.returns the shadow compare modefloatDeprecated.Returns the shadow intensity.floatDeprecated.How far the shadows are rendered in the viewfloatDeprecated.get the length over which the shadow will fade out when using a shadowZextendprotected voidDeprecated.protected abstract voidDeprecated.delegates the initialization of the frustum cam to child renderersvoidinitialize(RenderManager rm, ViewPort vp) Deprecated.Initialize this shadow renderer prior to its first update.booleanDeprecated.This method does nothing now and is kept only for backward compatibility.booleanDeprecated.Test whether this shadow renderer has been initialized.booleanDeprecated.if this processor renders back faces shadowsvoidpostFrame(FrameBuffer out) Deprecated.Called after a frame has been rendered and the queue flushed.voidpostQueue(RenderQueue rq) Deprecated.Called after the scene graph has been queued, but before it is flushed.voidpreFrame(float tpf) Deprecated.Called before a framevoidread(JmeImporter im) Deprecated.De-serialize this instance, for example when loading from a J3O file.protected voidrenderShadowMap(int shadowMapIndex) Deprecated.voidDeprecated.Called when the resolution of the viewport has been changed.final voidsetEdgeFilteringMode(EdgeFilteringMode filterMode) Deprecated.Sets the filtering mode for shadow edges.voidsetEdgesThickness(int edgesThickness) Deprecated.Sets the shadow edge thickness.protected abstract voidsetMaterialParameters(Material material) Deprecated.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 final voidsetPostShadowMaterial(Material postShadowMat) Deprecated.set the post shadow material for this rendererprotected voidDeprecated.for internal use onlyvoidsetProfiler(AppProfiler profiler) Deprecated.Sets a profiler Instance for this processor.voidsetRenderBackFacesShadows(Boolean renderBackFacesShadows) Deprecated.Set to true if you want back faces shadows on geometries.final voidsetShadowCompareMode(CompareMode compareMode) Deprecated.Sets the shadow compare mode.final voidsetShadowIntensity(float shadowIntensity) Deprecated.Set the shadowIntensity.voidsetShadowZExtend(float zFar) Deprecated.Set the distance from the eye where the shadows will be rendered default value is dynamically computed to the shadow casters/receivers union bound zFar, capped to view frustum far value.voidsetShadowZFadeLength(float length) Deprecated.Define the length over which the shadow will fade out when using a shadowZextend This is useful to make dynamic shadows fade into baked shadows in the distance.protected abstract voidupdateShadowCams(Camera viewCam) Deprecated.Invoked once per frame to update the shadow cams according to the light view.voidwrite(JmeExporter ex) Deprecated.Serialize this instance, for example when saving to a J3O file.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.jme3.post.SceneProcessorrescale
- 
Field Details- 
nbShadowMapsprotected int nbShadowMapsDeprecated.
- 
shadowMapSizeprotected float shadowMapSizeDeprecated.
- 
shadowIntensityprotected float shadowIntensityDeprecated.
- 
renderManagerDeprecated.
- 
viewPortDeprecated.
- 
shadowFBDeprecated.
- 
shadowMapsDeprecated.
- 
dummyTexDeprecated.
- 
preshadowMatDeprecated.
- 
postshadowMatDeprecated.
- 
lightViewProjectionsMatricesDeprecated.
- 
assetManagerDeprecated.
- 
debugprotected boolean debugDeprecated.
- 
edgesThicknessprotected float edgesThicknessDeprecated.
- 
edgeFilteringModeDeprecated.
- 
shadowCompareModeDeprecated.
- 
dispPicDeprecated.
- 
forcedRenderStateDeprecated.
- 
renderBackFacesShadowsprotected boolean renderBackFacesShadowsDeprecated.
- 
profilerDeprecated.
- 
needsfallBackMaterialprotected boolean needsfallBackMaterialDeprecated.true if the fallback material should be used, otherwise false
- 
postTechniqueNameDeprecated.name of the post material technique
- 
matCacheDeprecated.list of materials for post shadow queue geometries
- 
lightReceiversDeprecated.
- 
shadowMapOccludersDeprecated.
- 
zFarOverrideprotected float zFarOverrideDeprecated.fade shadows at distance
- 
fadeInfoDeprecated.
- 
fadeLengthprotected float fadeLengthDeprecated.
- 
frustumCamDeprecated.
- 
skipPostPassprotected boolean skipPostPassDeprecated.true to skip the post pass when there are no shadow casters
 
- 
- 
Constructor Details- 
AbstractShadowRendererVRprotected AbstractShadowRendererVR()Deprecated.used for serialization
- 
AbstractShadowRendererVRDeprecated.Create an abstract shadow renderer. Subclasses invoke this constructor.- Parameters:
- assetManager- the application asset manager
- shadowMapSize- the size of the rendered shadow maps (512,1024,2048, etc...)
- nbShadowMaps- the number of shadow maps rendered (the more shadow maps the more quality, the fewer fps).
 
 
- 
- 
Method Details- 
initForcedRenderStateprotected void initForcedRenderState()Deprecated.
- 
setPostShadowMaterialDeprecated.set the post shadow material for this renderer- Parameters:
- postShadowMat-
 
- 
setEdgeFilteringModeDeprecated.Sets the filtering mode for shadow edges. SeeEdgeFilteringModefor more info.- Parameters:
- filterMode- the desired filter mode (not null)
 
- 
getEdgeFilteringModeDeprecated.Get the edge filtering mode.- Returns:
- the edge filtering mode.
 
- 
setShadowCompareModeDeprecated.Sets the shadow compare mode. SeeCompareModefor more info.- Parameters:
- compareMode- the desired compare mode (not null)
 
- 
getShadowCompareModeDeprecated.returns the shadow compare mode- Returns:
- the shadowCompareMode
- See Also:
 
- 
createFrustumDeprecated.debug function to create a visible frustum
- 
initializeDeprecated.Initialize this shadow renderer prior to its first update.- Specified by:
- initializein interface- SceneProcessor
- Parameters:
- rm- the render manager
- vp- the viewport
 
- 
initFrustumCamprotected abstract void initFrustumCam()Deprecated.delegates the initialization of the frustum cam to child renderers
- 
isInitializedpublic boolean isInitialized()Deprecated.Test whether this shadow renderer has been initialized.- Specified by:
- isInitializedin interface- SceneProcessor
- Returns:
- true if initialized, otherwise false
 
- 
updateShadowCamsDeprecated.Invoked once per frame to update the shadow cams according to the light view.- Parameters:
- viewCam- the scene cam
 
- 
getOccludersToRenderprotected abstract GeometryList getOccludersToRender(int shadowMapIndex, GeometryList shadowMapOccluders) Deprecated.Returns a subclass-specific geometryList containing the occluders to be rendered in the shadow map- Parameters:
- shadowMapIndex- the index of the shadow map being rendered
- shadowMapOccluders- the list of occluders
- Returns:
- a list of occluders
 
- 
getShadowCamDeprecated.return the shadow camera to use for rendering the shadow map according the given index- Parameters:
- shadowMapIndex- the index of the shadow map being rendered
- Returns:
- the shadowCam
 
- 
setProfilerDeprecated.Description copied from interface:SceneProcessorSets a profiler Instance for this processor.- Specified by:
- setProfilerin interface- SceneProcessor
- Parameters:
- profiler- the profiler instance.
 
- 
doDisplayFrustumDebugprotected void doDisplayFrustumDebug(int shadowMapIndex) Deprecated.responsible for displaying the frustum of the shadow cam for debug purpose- Parameters:
- shadowMapIndex-
 
- 
postQueueDeprecated.Description copied from interface:SceneProcessorCalled after the scene graph has been queued, but before it is flushed.- Specified by:
- postQueuein interface- SceneProcessor
- Parameters:
- rq- The render queue
 
- 
renderShadowMapprotected void renderShadowMap(int shadowMapIndex) Deprecated.
- 
displayFrustumpublic void displayFrustum()Deprecated.Force the frustum to be displayed.
- 
displayShadowMapDeprecated.For debugging purposes, display depth shadow maps.
- 
displayDebugpublic void displayDebug()Deprecated.For debugging purposes, "snapshot" the current frustum to the scene.
- 
getReceiversDeprecated.
- 
postFrameDeprecated.Description copied from interface:SceneProcessorCalled after a frame has been rendered and the queue flushed.- Specified by:
- postFramein interface- SceneProcessor
- Parameters:
- out- The FB to which the scene was rendered.
 
- 
clearMaterialParametersDeprecated.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.- Parameters:
- material- the material that was used for the post shadow pass
 
- 
setMaterialParametersDeprecated.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.- Parameters:
- material- the material to use for the post shadow pass
 
- 
setPostShadowParamsprotected void setPostShadowParams()Deprecated.for internal use only
- 
getShadowZExtendpublic float getShadowZExtend()Deprecated.How far the shadows are rendered in the view- Returns:
- shadowZExtend
- See Also:
 
- 
setShadowZExtendpublic void setShadowZExtend(float zFar) Deprecated.Set the distance from the eye where the shadows will be rendered default value is dynamically computed to the shadow casters/receivers union bound zFar, capped to view frustum far value.- Parameters:
- zFar- the zFar values that override the computed one
 
- 
setShadowZFadeLengthpublic void setShadowZFadeLength(float length) Deprecated.Define the length over which the shadow will fade out when using a shadowZextend This is useful to make dynamic shadows fade into baked shadows in the distance.- Parameters:
- length- the fade length in world units
 
- 
getShadowZFadeLengthpublic float getShadowZFadeLength()Deprecated.get the length over which the shadow will fade out when using a shadowZextend- Returns:
- the fade length in world units
 
- 
checkCullingDeprecated.returns true if the light source bounding box is in the view frustum- Returns:
- true if box in frustum
 
- 
preFramepublic void preFrame(float tpf) Deprecated.Description copied from interface:SceneProcessorCalled before a frame- Specified by:
- preFramein interface- SceneProcessor
- Parameters:
- tpf- Time per frame
 
- 
cleanuppublic void cleanup()Deprecated.Description copied from interface:SceneProcessorCalled when the SP is removed from the RM.- Specified by:
- cleanupin interface- SceneProcessor
 
- 
reshapeDeprecated.Description copied from interface:SceneProcessorCalled when the resolution of the viewport has been changed.- Specified by:
- reshapein interface- SceneProcessor
- Parameters:
- vp- the affected ViewPort
- w- the new width (in pixels)
- h- the new height (in pixels)
 
- 
getShadowIntensitypublic float getShadowIntensity()Deprecated.Returns the shadow intensity.- Returns:
- shadowIntensity
- See Also:
 
- 
setShadowIntensitypublic final void setShadowIntensity(float shadowIntensity) Deprecated.Set the shadowIntensity. The value should be between 0 and 1. A 0 value gives a bright and invisible shadow, a 1 value gives a pitch black shadow. The default is 0.7- Parameters:
- shadowIntensity- the darkness of the shadow
 
- 
getEdgesThicknesspublic int getEdgesThickness()Deprecated.returns the edges thickness- Returns:
- edgesThickness
- See Also:
 
- 
setEdgesThicknesspublic void setEdgesThickness(int edgesThickness) Deprecated.Sets the shadow edge thickness. Default is 1. Setting it to lower values can help to reduce the jagged effect of the shadow edges.- Parameters:
- edgesThickness- the shadow edge thickness.
 
- 
isFlushQueuesDeprecated.This method does nothing now and is kept only for backward compatibility.This method does nothing now and is kept only for backward compatibility.- Returns:
- false
 
- 
getPreShadowForcedRenderStateDeprecated.Returns the pre shadows pass render state. use it to adjust the RenderState parameters of the pre shadow pass. Note that this will be overridden if the preShadow technique in the material has a ForcedRenderState- Returns:
- the pre shadow render state.
 
- 
setRenderBackFacesShadowsDeprecated.Set to true if you want back faces shadows on geometries. Note that back faces shadows will be blended over dark lighten areas and may produce overly dark lighting. Also note that setting this parameter will override this parameter for ALL materials in the scene. You can alternatively change this parameter on a single material usingMaterial.setBoolean(String, boolean)This also will automatically adjust the faceCullMode and the PolyOffset of the pre shadow pass. You can modify them by usinggetPreShadowForcedRenderState()- Parameters:
- renderBackFacesShadows- true or false.
 
- 
isRenderBackFacesShadowspublic boolean isRenderBackFacesShadows()Deprecated.if this processor renders back faces shadows- Returns:
- true if this processor renders back faces shadows
 
- 
readDeprecated.De-serialize this instance, for example when loading from a J3O file.- Specified by:
- readin interface- Savable
- Parameters:
- im- importer (not null)
- Throws:
- IOException
 
- 
writeDeprecated.Serialize this instance, for example when saving to a J3O file.- Specified by:
- writein interface- Savable
- Parameters:
- ex- exporter (not null)
- Throws:
- IOException
 
 
-