当前位置: 首页>>代码示例>>Java>>正文


Java SubScene.setCamera方法代码示例

本文整理汇总了Java中javafx.scene.SubScene.setCamera方法的典型用法代码示例。如果您正苦于以下问题:Java SubScene.setCamera方法的具体用法?Java SubScene.setCamera怎么用?Java SubScene.setCamera使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javafx.scene.SubScene的用法示例。


在下文中一共展示了SubScene.setCamera方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createDraggingGlobe

import javafx.scene.SubScene; //导入方法依赖的package包/类
public Parent createDraggingGlobe() {
 boolean support = Platform.isSupported(ConditionalFeature.SCENE3D);
 if (support)
  logger.info("JavaFX 3D features supported");
 else
  logger.info("JavaFX 3D features NOT supported");

    globe = new Globe();
    rotateGlobe();

 // Use a SubScene
    subScene = new SubScene(globe.getRoot(), WIDTH, HEIGHT);//, true, SceneAntialiasing.BALANCED);
    subScene.setId("sub");
    subScene.setCamera(globe.getCamera());//subScene));

    //return new Group(subScene);
    return new HBox(subScene);
}
 
开发者ID:mars-sim,项目名称:mars-sim,代码行数:19,代码来源:SpinningGlobe.java

示例2: TestApplication3DPattern

import javafx.scene.SubScene; //导入方法依赖的package包/类
public TestApplication3DPattern() {
		root = new StackPane();
		scene = new Scene(root, sceneWidth, sceneHeight, true, SceneAntialiasing.BALANCED);

		worldRoot = new Group();
		subscene = new SubScene(worldRoot, sceneWidth, sceneHeight, true, SceneAntialiasing.BALANCED);

		camera = new EulerCamera();
//		camera.setTranslateZ(-1000);
		
		worldRoot.getChildren().add(camera);

		controller = new DefaultEulerController();
		controller.setScene(scene);
		controller.setSubScene(subscene);
		controller.setCamera(camera);

		scene.setFill(Color.BLACK);
		subscene.setFill(Color.BLACK);
		configure();

//		scene.setCamera(camera);
		subscene.setCamera(camera);

		root.getChildren().addAll(subscene);
	}
 
开发者ID:sanke69,项目名称:fr.xs.jtk,代码行数:27,代码来源:TestApplication3DPattern.java

示例3: initScene

import javafx.scene.SubScene; //导入方法依赖的package包/类
public Scene initScene(City city, PerspectiveCamera camera, String cityName) {
      Group root = new Group();
      buildCamera(root, camera);
      root.getTransforms().addAll(rxBox, ryBox, rzBox);
      subScene = new SubScene(root, SCENE_WIDTH, SCENE_HEIGHT, true, SceneAntialiasing.BALANCED);
      subScene.setCamera(camera);
      root.getChildren().add(city);

      // 2D
      BorderPane pane = new BorderPane();
      Pane toolBar = null;
try {
	toolBar = new CityToolBarService().load(cityName);
} catch (IOException e) {
	e.printStackTrace();
}
      pane.setBottom(subScene);
      pane.setTop(toolBar);
      
      Scene scene = new Scene(pane, SCENE_WIDTH, SCENE_HEIGHT);
      subScene.heightProperty().bind(scene.heightProperty());
      subScene.widthProperty().bind(scene.widthProperty());      
      return scene;
  }
 
开发者ID:canoo,项目名称:code-of-gotham,代码行数:25,代码来源:StageUtil.java

示例4: createSubScene

import javafx.scene.SubScene; //导入方法依赖的package包/类
protected SubScene createSubScene() {
	Group group = new Group();
	group.getChildren().add(createPlayerModel());
	group.getTransforms().add(zRotate);
	
	camera.getTransforms().addAll(yRotate, translate, scale);
	
	subScene = new SubScene(group, preW, preH, true,
			msaa ? SceneAntialiasing.BALANCED : SceneAntialiasing.DISABLED);
       subScene.setFill(Color.ALICEBLUE);
       subScene.setCamera(camera);
       
       return subScene;
}
 
开发者ID:InfinityStudio,项目名称:minecraft-jfx-skin,代码行数:15,代码来源:SkinCanvas.java

示例5: getTopLeftScene

import javafx.scene.SubScene; //导入方法依赖的package包/类
@Override
protected SubScene getTopLeftScene() {
    rootTLMV = buildGroupMover();
    SubScene ss = new SubScene(rootTLMV.getGroup(), SS_WIDTH, SS_HEIGHT, true, SceneAntialiasing.DISABLED);
    ss.setCamera(new PerspectiveCamera());
    return ss;
}
 
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:8,代码来源:SubSceneDepthTestApp.java

示例6: getTopRightScene

import javafx.scene.SubScene; //导入方法依赖的package包/类
@Override
protected SubScene getTopRightScene() {
    rootTRMV = buildGroupMover();
    rootTRMV.setRotateY(60);

    SubScene ss = new SubScene(rootTRMV.getGroup(), SS_WIDTH, SS_HEIGHT, true, SceneAntialiasing.DISABLED);
    ss.setCamera(new PerspectiveCamera());
    return ss;
}
 
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:10,代码来源:SubSceneDepthTestApp.java

示例7: getDownLeftScene

import javafx.scene.SubScene; //导入方法依赖的package包/类
@Override
protected SubScene getDownLeftScene() {
    rootDLMV = buildGroupMover();
    rootDLMV.setRotateY(-60);
    SubScene ss = new SubScene(rootDLMV.getGroup(), SS_WIDTH, SS_HEIGHT, true, SceneAntialiasing.DISABLED);
    ss.setCamera(new PerspectiveCamera());
    return ss;
}
 
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:9,代码来源:SubSceneDepthTestApp.java

示例8: addCamera

import javafx.scene.SubScene; //导入方法依赖的package包/类
@Override
protected Camera addCamera(SubScene scene) {
    PerspectiveCamera pc = new PerspectiveCamera(true);
    scene.setCamera(pc);
    pc.setFarClip(10000);
    return pc;
}
 
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:8,代码来源:SubScenePerspectiveCameraFixedEyeIsolateTestApp.java

示例9: getTopLeftScene

import javafx.scene.SubScene; //导入方法依赖的package包/类
@Override
protected SubScene getTopLeftScene() {
    SubScene ss = new SubScene(buildGroup(), SS_WIDTH, SS_HEIGHT, true, SceneAntialiasing.DISABLED);
    ss.setCamera(new PerspectiveCamera());
    scenes[0] = ss;
    return ss;
}
 
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:8,代码来源:SubSceneBasicPropsTestApp.java

示例10: getTopRightScene

import javafx.scene.SubScene; //导入方法依赖的package包/类
@Override
protected SubScene getTopRightScene() {
    SubScene ss = new SubScene(buildGroup(), SS_WIDTH, SS_HEIGHT, true, SceneAntialiasing.DISABLED);
    ss.setCamera(new PerspectiveCamera());
    scenes[1] = ss;
    return ss;
}
 
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:8,代码来源:SubSceneBasicPropsTestApp.java

示例11: getDownLeftScene

import javafx.scene.SubScene; //导入方法依赖的package包/类
@Override
protected SubScene getDownLeftScene() {
    SubScene ss = new SubScene(buildGroup(), SS_WIDTH, SS_HEIGHT, true, SceneAntialiasing.DISABLED);
    ss.setCamera(new PerspectiveCamera());
    scenes[2] = ss;
    return ss;
}
 
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:8,代码来源:SubSceneBasicPropsTestApp.java

示例12: buildGroup

import javafx.scene.SubScene; //导入方法依赖的package包/类
private SubScene buildGroup(int num) {
    Sphere s = new Sphere(50);
    nodes[num] = s;
    Group grp = new Group(s);
    grp.setTranslateX(SS_WIDTH / 2);
    grp.setTranslateY(SS_HEIGHT / 2);
    roots[num] = grp;
    SubScene ss = createSubScene(grp, SS_WIDTH, SS_HEIGHT);
    ss.setCamera(new PerspectiveCamera());
    return ss;
}
 
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:12,代码来源:SubSceneLightScopingTestApp.java

示例13: buildSubScene

import javafx.scene.SubScene; //导入方法依赖的package包/类
private void buildSubScene() {
    root3D.getChildren().add(autoScalingGroup);
    
    subScene = new SubScene(root3D, paneW, paneH, true, SceneAntialiasing.BALANCED);
    subScene.setCamera(camera);
    subScene.setFill(Color.CADETBLUE);
    setListeners(true);
}
 
开发者ID:gluonhq,项目名称:gluon-samples,代码行数:9,代码来源:ContentModel.java

示例14: createContent

import javafx.scene.SubScene; //导入方法依赖的package包/类
public Parent createContent() {
    BorderPane p = new BorderPane();
    HBox btBox = new HBox(50, leftBt, lookLeftBt, forwardBt, upBt, downBt, backBt, lookRightBt, rightBt); 
    btBox.alignmentProperty().set(Pos.CENTER);
    p.setBottom(btBox);
    setUpButtons();
    PerspectiveCamera camera = new PerspectiveCamera(true);
    camera.getTransforms().add(cameraTranslate);
    camera.getTransforms().add(cameraRotate);
    camera.setFieldOfView(50);
    camera.setFarClip(10000);
    camera.setNearClip(1);
    p.setDepthTest(DepthTest.ENABLE);
    BorderPane cirmLiveUI = cirmLive.createSceneContent();
    cirmLiveUI.setCache(true);
    cirmLiveUI.setCacheShape(true);
    cirmLiveUI.setCacheHint(CacheHint.QUALITY);
    //cirmLiveUI.setSsetAlignment(camera, Pos.CENTER);
    //cirmLiveUI.setTranslateZ(500);
    //TODO root.getChildren().addAll(c, c2, c3);
     
    SubScene subScene = new SubScene(cirmLiveUI, 1600, 900, true, SceneAntialiasing.BALANCED);
    subScene.setFill(Color.CORAL);
    subScene.setCamera(camera);
    p.setCenter(subScene);       
    return p;
}
 
开发者ID:miamidade,项目名称:cirmlive,代码行数:28,代码来源:CiRMLive3d.java

示例15: buildSubScene

import javafx.scene.SubScene; //导入方法依赖的package包/类
private void buildSubScene() {
    root3D.getChildren().add(autoScalingGroup);
    
    subScene = new SubScene(root3D,paneW,paneH,true,javafx.scene.SceneAntialiasing.BALANCED);
    subScene.setCamera(camera);
    subScene.setFill(Color.CADETBLUE);
    setListeners(true);
}
 
开发者ID:jperedadnr,项目名称:RubikFX,代码行数:9,代码来源:ContentModel.java


注:本文中的javafx.scene.SubScene.setCamera方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。