Package com.jme3.shadow
Class PointLightShadowRenderer
java.lang.Object
com.jme3.shadow.AbstractShadowRenderer
com.jme3.shadow.PointLightShadowRenderer
- All Implemented Interfaces:
- Savable,- SceneProcessor,- JmeCloneable,- Cloneable
PointLightShadowRenderer renders shadows for a point light
- 
Field SummaryFieldsFields inherited from class com.jme3.shadow.AbstractShadowRendererassetManager, debug, dispPic, dummyTex, edgeFilteringMode, edgesThickness, fadeInfo, fadeLength, forcedRenderState, frustumCam, lightReceivers, lightViewProjectionsMatrices, logger, matCache, nbShadowMaps, needsfallBackMaterial, postshadowMat, postTechniqueName, preshadowMat, prof, renderBackFacesShadows, renderManager, shadowCompareMode, shadowFB, shadowIntensity, shadowMapOccluders, shadowMaps, shadowMapSize, skipPostPass, viewPort, zFarOverride
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedUsed for serialization.PointLightShadowRenderer(AssetManager assetManager, int shadowMapSize) Creates a PointLightShadowRenderer
- 
Method SummaryModifier and TypeMethodDescriptionprotected booleancheckCulling(Camera viewCam) protected voidclearMaterialParameters(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.voidcloneFields(Cloner cloner, Object original) Implemented to perform deep cloning for this object, resolving local cloned references using the specified cloner.protected voiddoDisplayFrustumDebug(int shadowMapIndex) responsible for displaying the frustum of the shadow cam for debug purposegetLight()gets the point light used to cast shadows with this processorprotected GeometryListgetOccludersToRender(int shadowMapIndex, GeometryList shadowMapOccluders) Returns a subclass-specific geometryList containing the occluders to be rendered in the shadow mapprotected voidgetReceivers(GeometryList lightReceivers) protected CameragetShadowCam(int shadowMapIndex) return the shadow camera to use for rendering the shadow map according the given indexprotected voiddelegates the initialization of the frustum cam to child renderersvoidread(JmeImporter im) De-serialize this instance, for example when loading from a J3O file.voidsetLight(PointLight light) sets the light to use for casting shadows with this processorprotected voidsetMaterialParameters(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 voidupdateShadowCams(Camera viewCam) Invoked once per frame to update the shadow cams according to the light view.voidwrite(JmeExporter ex) Serialize this instance, for example when saving to a J3O file.Methods inherited from class com.jme3.shadow.AbstractShadowRenderercleanup, createFrustum, displayDebug, displayFrustum, displayShadowMap, getEdgeFilteringMode, getEdgesThickness, getNumShadowMaps, getPreShadowForcedRenderState, getShadowCompareMode, getShadowIntensity, getShadowMapSize, getShadowZExtend, getShadowZFadeLength, initForcedRenderState, initialize, isFlushQueues, isInitialized, isRenderBackFacesShadows, jmeClone, postFrame, postQueue, preFrame, renderShadowMap, reshape, setEdgeFilteringMode, setEdgesThickness, setPostShadowMaterial, setPostShadowParams, setProfiler, setRenderBackFacesShadows, setShadowCompareMode, setShadowIntensity, setShadowZExtend, setShadowZFadeLengthMethods 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- 
CAM_NUMBERpublic static final int CAM_NUMBER- See Also:
 
- 
light
- 
shadowCams
 
- 
- 
Constructor Details- 
PointLightShadowRendererprotected PointLightShadowRenderer()Used for serialization. Use PointLightShadowRenderer#PointLightShadowRenderer(AssetManager assetManager, int shadowMapSize) instead.
- 
PointLightShadowRendererCreates a PointLightShadowRenderer- Parameters:
- assetManager- the application asset manager
- shadowMapSize- the size of the rendered shadowmaps (512,1024,2048, etc...)
 
 
- 
- 
Method Details- 
initFrustumCamprotected void initFrustumCam()Description copied from class:AbstractShadowRendererdelegates the initialization of the frustum cam to child renderers- Specified by:
- initFrustumCamin class- AbstractShadowRenderer
 
- 
updateShadowCamsDescription copied from class:AbstractShadowRendererInvoked once per frame to update the shadow cams according to the light view.- Specified by:
- updateShadowCamsin class- AbstractShadowRenderer
- Parameters:
- viewCam- the scene cam
 
- 
getOccludersToRenderDescription copied from class:AbstractShadowRendererReturns a subclass-specific geometryList containing the occluders to be rendered in the shadow map- Specified by:
- getOccludersToRenderin class- AbstractShadowRenderer
- Parameters:
- shadowMapIndex- the index of the shadow map being rendered
- shadowMapOccluders- the list of occluders
- Returns:
- the geometryList
 
- 
getReceivers- Specified by:
- getReceiversin class- AbstractShadowRenderer
 
- 
getShadowCamDescription copied from class:AbstractShadowRendererreturn the shadow camera to use for rendering the shadow map according the given index- Specified by:
- getShadowCamin class- AbstractShadowRenderer
- Parameters:
- shadowMapIndex- the index of the shadow map being rendered
- Returns:
- the shadowCam
 
- 
doDisplayFrustumDebugprotected void doDisplayFrustumDebug(int shadowMapIndex) Description copied from class:AbstractShadowRendererresponsible for displaying the frustum of the shadow cam for debug purpose- Overrides:
- doDisplayFrustumDebugin class- AbstractShadowRenderer
- Parameters:
- shadowMapIndex- the index of the shadow map
 
- 
setMaterialParametersDescription copied from class:AbstractShadowRendererThis method is called once per frame and is responsible for setting any material parameters that subclasses may need to set on the post material.- Specified by:
- setMaterialParametersin class- AbstractShadowRenderer
- Parameters:
- material- the material to use for the post shadow pass
 
- 
clearMaterialParametersDescription copied from class:AbstractShadowRendererThis method is called once per frame and is responsible for clearing any material parameters that subclasses may need to clear on the post material.- Specified by:
- clearMaterialParametersin class- AbstractShadowRenderer
- Parameters:
- material- the material that was used for the post shadow pass
 
- 
getLightgets the point light used to cast shadows with this processor- Returns:
- the point light
 
- 
setLightsets the light to use for casting shadows with this processor- Parameters:
- light- the point light
 
- 
cloneFieldsDescription copied from interface:JmeCloneableImplemented to perform deep cloning for this object, resolving local cloned references using the specified cloner. The object can call cloner.clone(fieldValue) to deep clone any of its fields.Note: during normal clone operations the original object will not be needed as the clone has already had all of the fields shallow copied. - Specified by:
- cloneFieldsin interface- JmeCloneable
- Overrides:
- cloneFieldsin class- AbstractShadowRenderer
- Parameters:
- cloner- The cloner that is performing the cloning operation. The cloneFields method can call back into the cloner to make clones of its subordinate fields.
- original- The original object from which this object was cloned. This is provided for the very rare case that this object needs to refer to its original for some reason. In general, all of the relevant values should have been transferred during the shallow clone, and this object need only clone what it wants.
 
- 
readDescription copied from class:AbstractShadowRendererDe-serialize this instance, for example when loading from a J3O file.- Specified by:
- readin interface- Savable
- Overrides:
- readin class- AbstractShadowRenderer
- Parameters:
- im- importer (not null)
- Throws:
- IOException- from the importer
 
- 
writeDescription copied from class:AbstractShadowRendererSerialize this instance, for example when saving to a J3O file.- Specified by:
- writein interface- Savable
- Overrides:
- writein class- AbstractShadowRenderer
- Parameters:
- ex- exporter (not null)
- Throws:
- IOException- from the exporter
 
- 
checkCulling- Specified by:
- checkCullingin class- AbstractShadowRenderer
- Parameters:
- viewCam- a Camera to define the view frustum
- Returns:
- true if intersects
 
 
-