|
|
|
|
@ -6,6 +6,7 @@ import javafx.scene.paint.Color;
|
|
|
|
|
import javafx.scene.paint.PhongMaterial;
|
|
|
|
|
import javafx.scene.shape.MeshView;
|
|
|
|
|
import javafx.scene.transform.Rotate;
|
|
|
|
|
import visualiser.app.App;
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
@ -44,7 +45,9 @@ public class SkyBox {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void addTop() {
|
|
|
|
|
MeshView surface = makeSurface(new Image(getClass().getClassLoader().getResourceAsStream("images/skybox/ThickCloudsWaterUp2048.png")), size);
|
|
|
|
|
String imagePath = "images/skybox/ThickCloudsWaterUp2048.png";
|
|
|
|
|
if (!App.dayMode) imagePath = "images/skybox/DarkStormyUp2048.png";
|
|
|
|
|
MeshView surface = makeSurface(new Image(getClass().getClassLoader().getResourceAsStream(imagePath)), size);
|
|
|
|
|
|
|
|
|
|
surface.setRotationAxis(new Point3D(0, 0, 1));
|
|
|
|
|
surface.setRotate(180);
|
|
|
|
|
@ -58,7 +61,9 @@ public class SkyBox {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void addRight() {
|
|
|
|
|
MeshView surface = makeSurface(new Image(getClass().getClassLoader().getResourceAsStream("images/skybox/ThickCloudsWaterRight2048.png")), size + 1);
|
|
|
|
|
String imagePath = "images/skybox/ThickCloudsWaterRight2048.png";
|
|
|
|
|
if (!App.dayMode) imagePath = "images/skybox/DarkStormyRight2048.png";
|
|
|
|
|
MeshView surface = makeSurface(new Image(getClass().getClassLoader().getResourceAsStream(imagePath)), size + 1);
|
|
|
|
|
|
|
|
|
|
surface.setTranslateX(size/2);
|
|
|
|
|
surface.setTranslateY(size/2);
|
|
|
|
|
@ -77,7 +82,9 @@ public class SkyBox {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void addLeft() {
|
|
|
|
|
MeshView surface = makeSurface(new Image(getClass().getClassLoader().getResourceAsStream("images/skybox/ThickCloudsWaterLeft2048.png")), size + 1);
|
|
|
|
|
String imagePath = "images/skybox/ThickCloudsWaterLeft2048.png";
|
|
|
|
|
if (!App.dayMode) imagePath = "images/skybox/DarkStormyLeft2048.png";
|
|
|
|
|
MeshView surface = makeSurface(new Image(getClass().getClassLoader().getResourceAsStream(imagePath)), size + 1);
|
|
|
|
|
|
|
|
|
|
surface.setTranslateX(size/2);
|
|
|
|
|
surface.setTranslateY(size/2);
|
|
|
|
|
@ -99,7 +106,9 @@ public class SkyBox {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void addBack() {
|
|
|
|
|
MeshView surface = makeSurface(new Image(getClass().getClassLoader().getResourceAsStream("images/skybox/ThickCloudsWaterBack2048.png")), size);
|
|
|
|
|
String imagePath = "images/skybox/ThickCloudsWaterBack2048.png";
|
|
|
|
|
if (!App.dayMode) imagePath = "images/skybox/DarkStormyBack2048.png";
|
|
|
|
|
MeshView surface = makeSurface(new Image(getClass().getClassLoader().getResourceAsStream(imagePath)), size);
|
|
|
|
|
surface.getTransforms().add(new Rotate(90, 0, 0));
|
|
|
|
|
|
|
|
|
|
surface.setRotationAxis(new Point3D(1, 0, 0));
|
|
|
|
|
@ -117,8 +126,9 @@ public class SkyBox {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void addFront() {
|
|
|
|
|
MeshView surface = makeSurface(new Image(getClass().getClassLoader().getResourceAsStream("images/skybox/ThickCloudsWaterFront2048.png")), size);
|
|
|
|
|
|
|
|
|
|
String imagePath = "images/skybox/ThickCloudsWaterFront2048.png";
|
|
|
|
|
if (!App.dayMode) imagePath = "images/skybox/DarkStormyFront2048.png";
|
|
|
|
|
MeshView surface = makeSurface(new Image(getClass().getClassLoader().getResourceAsStream(imagePath)), size);
|
|
|
|
|
surface.setTranslateX(size/2);
|
|
|
|
|
surface.setTranslateY(size/2);
|
|
|
|
|
surface.setRotationAxis(new Point3D(0, 0, 1));
|
|
|
|
|
@ -126,6 +136,7 @@ public class SkyBox {
|
|
|
|
|
surface.setTranslateX(-size/2);
|
|
|
|
|
surface.setTranslateY(-size/2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
surface.setTranslateX(x + size/2 - clipOverlap);
|
|
|
|
|
surface.setTranslateY(y + yshift);
|
|
|
|
|
surface.setTranslateZ(z);
|
|
|
|
|
|