public final class DefaultLightFilter extends java.lang.Object implements LightFilter
Constructor and Description |
---|
DefaultLightFilter() |
DefaultLightFilter(LightProbeBlendingStrategy probeBlendStrat) |
Modifier and Type | Method and Description |
---|---|
void |
filterLights(Geometry geometry,
LightList filteredLightList)
Determine which lights on the
world
light list are to be rendered. |
void |
setCamera(Camera camera)
Sets the camera for which future filtering is to be done against in
LightFilter.filterLights(com.jme3.scene.Geometry, com.jme3.light.LightList) . |
void |
setLightProbeBlendingStrategy(LightProbeBlendingStrategy strategy) |
public DefaultLightFilter()
public DefaultLightFilter(LightProbeBlendingStrategy probeBlendStrat)
public void setCamera(Camera camera)
LightFilter
LightFilter.filterLights(com.jme3.scene.Geometry, com.jme3.light.LightList)
.setCamera
in interface LightFilter
camera
- The camera to perform light filtering against.public void filterLights(Geometry geometry, LightList filteredLightList)
LightFilter
world
light list
are to be rendered.
The simplest implementation (e.g. one that performs no filtering) would
simply copy the contents of Spatial.getWorldLightList()
to
filteredLightList
.
An advanced implementation would determine if the light intersects
the geometry's bounding volume
and if
the light intersects the frustum of the camera set in
LightFilter.setCamera(com.jme3.renderer.Camera)
as well as sort the lights
according to some "influence" criteria - this will then provide
an optimal set of lights that should be used for rendering.
filterLights
in interface LightFilter
geometry
- The geometry for which the light filtering is performed.filteredLightList
- The results are to be stored here.public void setLightProbeBlendingStrategy(LightProbeBlendingStrategy strategy)