public void start(Stage primaryStage) { d3 = new Draw3D(); Scene scene = d3.buildScene(); preambleCommands(); drawingCommands(); d3.setStart(); primaryStage.setScene(scene); primaryStage.setTitle(title); primaryStage.show(); }
@Override public void start(Stage primaryStage) { dt = new Draw3D(); Scene scene = dt.buildScene(); buildData(); dt.setStart(); primaryStage.setScene(scene); primaryStage.setTitle("TestDrone"); primaryStage.show(); }
void preambleCommands() { d3.setAmbientLight(false); d3.setPointLight(true); d3.setCumulate(false); d3.setSequencingOn(); d3.setVectorRadius(1); d3.setArrowRadius(1); }
private void buildData() { Sphere3D s1 = new Sphere3D(3, 3, 3, 2); System.out.println("s1 =" + s1.toString()); PhongMaterial m11 = new PhongMaterial(Color.RED); PhongMaterial m12 = new PhongMaterial(Color.BROWN); PhongMaterial m21 = new PhongMaterial(Color.BLUE); PhongMaterial m22 = new PhongMaterial(Color.BLACK); Drone3D d1 = new Drone3D(new Point3D(3, 3, 3), 48, 8, 0, 0, 0, m11, m12); Drone3D d2 = new Drone3D(new Point3D(8, 8, 8), 48, 8, 0, 0, 0, m21, m22); System.out.println("d1= " + d1); System.out.println("d2= " + d2); dt.drawDrone3D(d1); dt.drawDrone3D(d2); }