|
|
|
|
@ -18,12 +18,18 @@ import java.util.List;
|
|
|
|
|
* sky box, whose textures are set with special methods.
|
|
|
|
|
*/
|
|
|
|
|
public class View3D extends Pane {
|
|
|
|
|
/**
|
|
|
|
|
* Rendering container for shapes
|
|
|
|
|
*/
|
|
|
|
|
private Group world;
|
|
|
|
|
private List<Shape3D> shapes;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Near limit of view frustum
|
|
|
|
|
*/
|
|
|
|
|
private double nearClip;
|
|
|
|
|
/**
|
|
|
|
|
* Far limit of view frustum
|
|
|
|
|
*/
|
|
|
|
|
private double farClip;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Position camera pivots around
|
|
|
|
|
*/
|
|
|
|
|
@ -45,7 +51,6 @@ public class View3D extends Pane {
|
|
|
|
|
* Default constructor for View3D. Sets up Scene and PerspectiveCamera.
|
|
|
|
|
*/
|
|
|
|
|
public View3D() {
|
|
|
|
|
shapes = new ArrayList<>();
|
|
|
|
|
world = new Group();
|
|
|
|
|
|
|
|
|
|
SubScene scene = new SubScene(world, 300, 300);
|
|
|
|
|
@ -86,7 +91,6 @@ public class View3D extends Pane {
|
|
|
|
|
* @param shape to add
|
|
|
|
|
*/
|
|
|
|
|
public void addShape(Shape3D shape) {
|
|
|
|
|
shapes.add(shape);
|
|
|
|
|
world.getChildren().add(shape);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|