Search in sources :

Example 6 with EnvironmentCamera

use of com.jme3.environment.EnvironmentCamera 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

EnvironmentCamera (com.jme3.environment.EnvironmentCamera)4 Vector3f (com.jme3.math.Vector3f)4 Node (com.jme3.scene.Node)4 FilterPostProcessor (com.jme3.post.FilterPostProcessor)3 ToneMapFilter (com.jme3.post.filters.ToneMapFilter)3 Spatial (com.jme3.scene.Spatial)3 ChaseCamera (com.jme3.input.ChaseCamera)2 ActionListener (com.jme3.input.controls.ActionListener)2 KeyTrigger (com.jme3.input.controls.KeyTrigger)2 DirectionalLight (com.jme3.light.DirectionalLight)2 Quaternion (com.jme3.math.Quaternion)2 BoundingSphere (com.jme3.bounding.BoundingSphere)1 LightsDebugState (com.jme3.environment.util.LightsDebugState)1 LightProbe (com.jme3.light.LightProbe)1 Material (com.jme3.material.Material)1 BloomFilter (com.jme3.post.filters.BloomFilter)1 FXAAFilter (com.jme3.post.filters.FXAAFilter)1 SSAOFilter (com.jme3.post.ssao.SSAOFilter)1 Geometry (com.jme3.scene.Geometry)1 Sphere (com.jme3.scene.shape.Sphere)1