List of usage examples for javafx.scene.shape Box Box
public Box(double width, double height, double depth)
From source file:nars.rl.util.ThreeDView.java
private void buildAxes() { final PhongMaterial redMaterial = new PhongMaterial(); redMaterial.setDiffuseColor(Color.DARKRED); redMaterial.setSpecularColor(Color.RED); final PhongMaterial greenMaterial = new PhongMaterial(); greenMaterial.setDiffuseColor(Color.DARKGREEN); greenMaterial.setSpecularColor(Color.GREEN); final PhongMaterial blueMaterial = new PhongMaterial(); blueMaterial.setDiffuseColor(Color.DARKBLUE); blueMaterial.setSpecularColor(Color.BLUE); final Box xAxis = new Box(240.0, 1, 1); final Box yAxis = new Box(1, 240.0, 1); final Box zAxis = new Box(1, 1, 240.0); xAxis.setMaterial(redMaterial);//ww w . j a v a2 s . co m yAxis.setMaterial(greenMaterial); zAxis.setMaterial(blueMaterial); axisGroup.getChildren().addAll(xAxis, yAxis, zAxis); world.getChildren().addAll(axisGroup); }