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


Java SceneAntialiasing.BALANCED属性代码示例

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


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

示例1: VirtualUniverseView

public VirtualUniverseView(double width, double height, Scene _container) {
		super(new Group(), width, height, true, SceneAntialiasing.BALANCED);
		rootWorld = (Group) this.getRoot();

		camera     = new QuaternionCamera();

		controller = new DefaultQuaternionController();
		if(_container != null)
			controller.setScene(_container);
		controller.setSubScene(this);
		controller.setCamera(camera);

		setFill(Color.BLACK);
		setCamera(camera);

//		rootWorld.getChildren().add(camera);
		rootWorld.getChildren().add(camera.getGroup());
	}
 
开发者ID:sanke69,项目名称:fr.xs.jtk,代码行数:18,代码来源:VirtualUniverseView.java

示例2: VirtualUniverseScene

public VirtualUniverseScene(double width, double height) {
		super(new Group(), width, height, true, SceneAntialiasing.BALANCED);
		rootWorld = (Group) this.getRoot();

		camera     = new QuaternionCamera();

		controller = new DefaultQuaternionController();
		controller.setScene(this);
		controller.setCamera(camera);

		setFill(Color.BLACK);
		setCamera(camera);

//		rootWorld.getChildren().add(camera);
		rootWorld.getChildren().add(camera.getGroup());
	}
 
开发者ID:sanke69,项目名称:fr.xs.jtk,代码行数:16,代码来源:VirtualUniverseScene.java

示例3: TestApplication3DPattern

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,代码行数:26,代码来源:TestApplication3DPattern.java

示例4: initScene

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,代码行数:24,代码来源:StageUtil.java

示例5: showStage

private void showStage(Stage stage) {
	Scene scene = new Scene(root, sceneWidth, sceneHeight, true, SceneAntialiasing.BALANCED);
	scene.setFill(Color.web("3d3d3d"));

	loadCamera(scene);
	loadControls(scene);

	stage.setTitle("F(X)yz Sample: 3D Dragging");
	stage.setScene(scene);
	stage.show();
}
 
开发者ID:callakrsos,项目名称:Gargoyle,代码行数:11,代码来源:Drag3DObject.java

示例6: createSubScene

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,代码行数:14,代码来源:SkinCanvas.java

示例7: checkScreenshot

protected void checkScreenshot(String name) {
        /*Will not work after RT-31878*/
//        if (getApplication().isAntiAliasingEnabled()) {
//            name += "-AintiAliasing";
//        }
        /*******************************************/
        /*Will work after RT-31878*/
        if(FX3DAbstractApp.getAntiAliasingMode() == SceneAntialiasing.BALANCED){
            name += "-AABALANCED";
        }
        /*******************************************/
        final String testName = getClass().getSimpleName() + "-" + name;
        ScreenshotUtils.checkScreenshot(testName, scene);
    }
 
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:14,代码来源:FX3DTestBase.java

示例8: buildSubScene

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,代码行数:8,代码来源:ContentModel.java

示例9: Space

public Space(double size, Camera camera) {
    this.transform = new TransformGroup(this.createCenter(size));
    this.transform.rotate(30, -30); // 初期アングルを設定(ちょっと斜め上から見る感じ)
    
    this.mainView = new SubScene(this.transform.getGroup(), 1200, 750, true, SceneAntialiasing.BALANCED);
    this.mainView.setFill(Color.WHITE);

    this.mainView.addEventHandler(MouseEvent.MOUSE_PRESSED, this.mousePosition::save);
    this.mainView.addEventHandler(MouseEvent.MOUSE_DRAGGED, this::handleMouseDrag);
    
    this.mainView.setCamera(camera.getCamera());
    camera.moveBackAndFront(size * 2.5);
    this.camera = camera;
}
 
开发者ID:opengl-8080,项目名称:classical-physics,代码行数:14,代码来源:Space.java

示例10: start

@Override
public void start(Stage stage) throws Exception {
	camera = new PerspectiveCamera(true);
	// setup camera transform for rotational support
	camera.setNearClip(0.1);
	camera.setFarClip(10000.0);
	camera.setTranslateZ(-20);
	makeYUp(camera);

	cameraTransform.setTranslate(0, 0, 0);
	cameraTransform.getChildren().add(camera);
	// cameraTransform.ry.setAngle(-45.0);
	// cameraTransform.rx.setAngle(-10.0);

	// add a Point Light for better viewing of the grid coordinate system
	PointLight point = new PointLight(Color.LIGHTSTEELBLUE);
	AmbientLight ambient = new AmbientLight(Color.LIGHTSKYBLUE);
	cameraTransform.getChildren().addAll(point, ambient);
	point.setTranslateX(camera.getTranslateX());
	point.setTranslateY(camera.getTranslateY());
	point.setTranslateZ(camera.getTranslateZ());

	Group group = new Group(cameraTransform);
	Group sceneRoot = new Group(group);
	Scene scene = new Scene(sceneRoot, sceneWidth, sceneHeight, true, SceneAntialiasing.BALANCED);
	this.pointLight = point;
	this.ambientLight = ambient;
	configSceneColor(scene, point, ambient, cameraTransform);

	scene.setCamera(camera);

	makeObjects(group);
	setActions(scene);
	lastEffect = System.nanoTime();
	AnimationTimer timerEffect = makeAnimation();
	stage.setScene(scene);
	stage.show();
	timerEffect.start();
}
 
开发者ID:lyrachord,项目名称:FX3DAndroid,代码行数:39,代码来源:ThreedApplication.java

示例11: start

@Override
public void start(Stage primaryStage) throws Exception {
    primaryStage.setResizable(false);
    Parent globe = null;
    Scene scene = null;

    //if (OS.contains("window")) {
    //	globe = createFixedGlobe();
    //}
    //else {
        globe = createDraggingGlobe();
    //}

	StackPane root = new StackPane();
    root.setPrefHeight(WIDTH);
    root.setPrefWidth(HEIGHT);
    root.setStyle(//"-fx-border-style: none; "
    			"-fx-background-color: transparent; "
    			+ "-fx-background-radius: 1px;");

    root.getChildren().add(globe);
    scene = new Scene(root, 640, 640, true, SceneAntialiasing.BALANCED);
    scene.setFill(Color.BLACK);

    //if (OS.contains("window")) {

    //}
    //else {
        // Add mouse and keyboard control
        getGlobe().handleMouse(root);
        getGlobe().handleKeyboard(root);
    //}

    primaryStage.setScene(scene);
    primaryStage.show();

}
 
开发者ID:mars-sim,项目名称:mars-sim,代码行数:37,代码来源:SpinningGlobe.java

示例12: createContent

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,代码行数:27,代码来源:CiRMLive3d.java

示例13: start

@Override
public void start(Stage primaryStage) throws Exception {
   setUserAgentStylesheet(STYLESHEET_CASPIAN);
    cirmLive = new CiRMLive();
    cirmLive.initClusterStats();
    Parent content = createContent();
    Scene topScene = new Scene(content, 1600, 900, true, SceneAntialiasing.BALANCED);
    topScene.setFill(Color.gray(0.1));
    primaryStage.setScene(topScene);
    primaryStage.setTitle(TITLE);
    primaryStage.setWidth(1600);
    primaryStage.setHeight(950);
    primaryStage.show();
    if (cirmLive.dateList.size() > 0) cirmLive.updateCurrentPieChart();
}
 
开发者ID:miamidade,项目名称:cirmlive,代码行数:15,代码来源:CiRMLive3d.java

示例14: showStage

private void showStage(Stage stage) {
    Scene scene = new Scene(root, sceneWidth, sceneHeight, true, SceneAntialiasing.BALANCED);
    scene.setFill(Color.web("3d3d3d"));

    loadCamera(scene);
    loadControls(scene);

    stage.setTitle("F(X)yz Sample: 3D Dragging");
    stage.setScene(scene);
    stage.show();
}
 
开发者ID:FXyz,项目名称:FXyzLib,代码行数:11,代码来源:Drag3DObject.java

示例15: start

@Override
public void start(Stage stage) throws Exception {
    
    loadSubScene();
    root.setStyle("-fx-background-color: DEEPSKYBLUE;");
    Scene scene = new Scene(root, 810,610, true, SceneAntialiasing.BALANCED);
    scene.setFill(Color.TRANSPARENT);
           
    stage.setTitle("MiniMapTest");
    stage.setScene(scene);
    //stage.initStyle(StageStyle.TRANSPARENT);
    stage.show();
    stage.setMaximized(true);
    cameraView.startViewing();
}
 
开发者ID:FXyz,项目名称:FXyzLib,代码行数:15,代码来源:CameraViewTest.java


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