public class LightProbeFactory
extends java.lang.Object
makeProbe(com.jme3.environment.EnvironmentCamera, com.jme3.scene.Spatial)
4. add the created LightProbe to a node with the Spatial.addLight(com.jme3.light.Light)
method.
Optionally for step 3 call
makeProbe(com.jme3.environment.EnvironmentCamera, com.jme3.scene.Spatial, com.jme3.environment.generation.JobProgressListener)
with a JobProgressListener
to be notified of the progress of the generation process.
The generation will be split in several threads for faster generation.
This class is entirely thread safe and can be called from any thread.
Note that in case you are using a JobProgressListener
all the its
method will be called inside and app.enqueue callable.
This means that it's completely safe to modify the scenegraph within the
Listener method, but also means that the event will be delayed until next update loop.EnvironmentCamera
Modifier and Type | Method and Description |
---|---|
static Node |
getDebugGui(AssetManager manager,
LightProbe probe)
For debugging purposes only.
|
static LightProbe |
makeProbe(EnvironmentCamera envCam,
Spatial scene)
Creates a LightProbe with the giver EnvironmentCamera in the given scene.
|
static LightProbe |
makeProbe(EnvironmentCamera envCam,
Spatial scene,
EnvMapUtils.GenerationType genType,
JobProgressListener<LightProbe> listener)
Creates a LightProbe with the giver EnvironmentCamera in the given scene.
|
static LightProbe |
makeProbe(EnvironmentCamera envCam,
Spatial scene,
JobProgressListener<LightProbe> listener) |
static LightProbe |
updateProbe(LightProbe probe,
EnvironmentCamera envCam,
Spatial scene,
EnvMapUtils.GenerationType genType,
JobProgressListener<LightProbe> listener)
Updates a LightProbe with the given EnvironmentCamera in the given scene.
|
static LightProbe |
updateProbe(LightProbe probe,
EnvironmentCamera envCam,
Spatial scene,
JobProgressListener<LightProbe> listener) |
public static LightProbe makeProbe(EnvironmentCamera envCam, Spatial scene)
makeProbe(com.jme3.environment.EnvironmentCamera, com.jme3.scene.Spatial, com.jme3.environment.generation.JobProgressListener)
envCam
- the EnvironmentCamerascene
- the SceneLightProbe
,
EnvironmentCamera
public static LightProbe makeProbe(EnvironmentCamera envCam, Spatial scene, EnvMapUtils.GenerationType genType, JobProgressListener<LightProbe> listener)
JobProgressAdapter
.envCam
- the EnvironmentCamerascene
- the ScenegenType
- Fast or HighQuality. Fast may be ok for many types of environment, but you may need high quality when an environment map has very high lighting values.listener
- the listener of the generation progress.LightProbe
,
EnvironmentCamera
,
JobProgressListener
public static LightProbe makeProbe(EnvironmentCamera envCam, Spatial scene, JobProgressListener<LightProbe> listener)
public static LightProbe updateProbe(LightProbe probe, EnvironmentCamera envCam, Spatial scene, EnvMapUtils.GenerationType genType, JobProgressListener<LightProbe> listener)
Note that this is an asynchronous process that will run on multiple threads. The process is thread safe. The created lightProbe will only be marked as ready when the rendering process is done.
The JobProgressListener will be notified of the progress of the generation.
Note that you can also use a JobProgressAdapter
.
probe
- the Light probe to updateenvCam
- the EnvironmentCamerascene
- the ScenegenType
- Fast or HighQuality. Fast may be ok for many types of environment, but you may need high quality when an environment map has very high lighting values.listener
- the listener of the generation progress.LightProbe
,
EnvironmentCamera
,
JobProgressListener
public static LightProbe updateProbe(LightProbe probe, EnvironmentCamera envCam, Spatial scene, JobProgressListener<LightProbe> listener)
public static Node getDebugGui(AssetManager manager, LightProbe probe)
manager
- the asset manager