public class PointLightShadowRenderer extends AbstractShadowRenderer
Modifier and Type | Field and Description |
---|---|
static int |
CAM_NUMBER |
protected PointLight |
light |
protected Camera[] |
shadowCams |
assetManager, 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
Modifier | Constructor and Description |
---|---|
protected |
PointLightShadowRenderer()
Used for serialization.
|
|
PointLightShadowRenderer(AssetManager assetManager,
int shadowMapSize)
Creates a PointLightShadowRenderer
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkCulling(Camera viewCam) |
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.
|
void |
cloneFields(Cloner cloner,
java.lang.Object original)
Implemented to perform deep cloning for this object, resolving
local cloned references using the specified cloner.
|
protected void |
doDisplayFrustumDebug(int shadowMapIndex)
responsible for displaying the frustum of the shadow cam for debug
purpose
|
PointLight |
getLight()
gets the point light used to cast shadows with this processor
|
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
|
void |
read(JmeImporter im)
De-serialize this instance, for example when loading from a J3O file.
|
void |
setLight(PointLight light)
sets the light to use for casting shadows with this processor
|
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, 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, setShadowZFadeLength
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
rescale
public static final int CAM_NUMBER
protected PointLight light
protected Camera[] shadowCams
protected PointLightShadowRenderer()
public PointLightShadowRenderer(AssetManager assetManager, int shadowMapSize)
assetManager
- the application asset managershadowMapSize
- the size of the rendered shadowmaps (512,1024,2048,
etc...)protected void initFrustumCam()
AbstractShadowRenderer
initFrustumCam
in class AbstractShadowRenderer
protected void updateShadowCams(Camera viewCam)
AbstractShadowRenderer
updateShadowCams
in class AbstractShadowRenderer
viewCam
- the scene camprotected GeometryList getOccludersToRender(int shadowMapIndex, GeometryList shadowMapOccluders)
AbstractShadowRenderer
getOccludersToRender
in class AbstractShadowRenderer
shadowMapIndex
- the index of the shadow map being renderedshadowMapOccluders
- the list of occludersprotected void getReceivers(GeometryList lightReceivers)
getReceivers
in class AbstractShadowRenderer
protected Camera getShadowCam(int shadowMapIndex)
AbstractShadowRenderer
getShadowCam
in class AbstractShadowRenderer
shadowMapIndex
- the index of the shadow map being renderedprotected void doDisplayFrustumDebug(int shadowMapIndex)
AbstractShadowRenderer
doDisplayFrustumDebug
in class AbstractShadowRenderer
shadowMapIndex
- the index of the shadow mapprotected void setMaterialParameters(Material material)
AbstractShadowRenderer
setMaterialParameters
in class AbstractShadowRenderer
material
- the material to use for the post shadow passprotected void clearMaterialParameters(Material material)
AbstractShadowRenderer
clearMaterialParameters
in class AbstractShadowRenderer
material
- the material that was used for the post shadow passpublic PointLight getLight()
public void setLight(PointLight light)
light
- the point lightpublic void cloneFields(Cloner cloner, java.lang.Object original)
JmeCloneable
Note: during normal clone operations the original object will not be needed as the clone has already had all of the fields shallow copied.
cloneFields
in interface JmeCloneable
cloneFields
in class AbstractShadowRenderer
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.public void read(JmeImporter im) throws java.io.IOException
AbstractShadowRenderer
read
in interface Savable
read
in class AbstractShadowRenderer
im
- importer (not null)java.io.IOException
- from the importerpublic void write(JmeExporter ex) throws java.io.IOException
AbstractShadowRenderer
write
in interface Savable
write
in class AbstractShadowRenderer
ex
- exporter (not null)java.io.IOException
- from the exporterprotected boolean checkCulling(Camera viewCam)
checkCulling
in class AbstractShadowRenderer
viewCam
- a Camera to define the view frustum