Search in sources :

Example 11 with LightProbe

use of com.jme3.light.LightProbe in project TeachingInSimulation by ScOrPiOzzy.

the class ElecCompState method initializeLocal.

@Override
protected void initializeLocal() {
    // 认知模块的根节点
    root = new Node(ROOT_NAME);
    LOG.debug("创建元器件状态机的根节点{}", root.getName());
    rootNode.attachChild(root);
    setupLight();
    stateManager.attach(chaserState = new MyCameraState());
    // //		PBR indirect lighting
    // final EnvironmentCamera envCam = new EnvironmentCamera(256, new Vector3f(0, 3f, 0));
    // stateManager.attach(envCam);
    // 
    // stateManager.attach(new BreakPointState((a) -> {
    // LightProbe probe = LightProbeFactory.makeProbe(stateManager.getState(EnvironmentCamera.class), rootNode, new JobProgressAdapter<LightProbe>() {
    // @Override
    // public void done(LightProbe result) {
    // //					加载结束
    // Platform.runLater(() -> SpringUtil.getBean(PageController.class).hideLoading());
    // }
    // });
    // ((BoundingSphere) probe.getBounds()).setRadius(100);
    // rootNode.addLight(probe);
    // }));
    // 加载结束
    Platform.runLater(() -> SpringUtil.getBean(PageController.class).hideLoading());
}
Also used : Node(com.jme3.scene.Node)

Aggregations

BoundingSphere (com.jme3.bounding.BoundingSphere)6 LightProbe (com.jme3.light.LightProbe)6 EnvironmentCamera (com.jme3.environment.EnvironmentCamera)3 TempVars (com.jme3.util.TempVars)3 Node (com.jme3.scene.Node)2 BoundingBox (com.jme3.bounding.BoundingBox)1 BoundingVolume (com.jme3.bounding.BoundingVolume)1 IrradianceMapGenerator (com.jme3.environment.generation.IrradianceMapGenerator)1 PrefilteredEnvMapFaceGenerator (com.jme3.environment.generation.PrefilteredEnvMapFaceGenerator)1 Light (com.jme3.light.Light)1 Material (com.jme3.material.Material)1 Geometry (com.jme3.scene.Geometry)1 Spatial (com.jme3.scene.Spatial)1 TextureCubeMap (com.jme3.texture.TextureCubeMap)1 ScheduledThreadPoolExecutor (java.util.concurrent.ScheduledThreadPoolExecutor)1