diff --git a/src/main/java/seng302/visualiser/GameView.java b/src/main/java/seng302/visualiser/GameView.java index 4ae8f18d..09e59496 100644 --- a/src/main/java/seng302/visualiser/GameView.java +++ b/src/main/java/seng302/visualiser/GameView.java @@ -15,6 +15,7 @@ import javafx.collections.ObservableList; import javafx.geometry.Point2D; import javafx.scene.Group; import javafx.scene.Node; +import javafx.scene.PointLight; import javafx.scene.image.ImageView; import javafx.scene.input.KeyCode; import javafx.scene.input.KeyEvent; @@ -25,6 +26,7 @@ import javafx.scene.paint.Paint; import javafx.scene.shape.Circle; import javafx.scene.shape.Polygon; import javafx.scene.text.Text; +import javafx.scene.transform.Translate; import javafx.util.Duration; import seng302.gameServer.messages.RoundingSide; import seng302.model.ClientYacht; @@ -139,6 +141,17 @@ public class GameView extends Pane { public GameView () { gameObjects = this.getChildren(); + PointLight pointLight = new PointLight(Color.WHITE); + pointLight.setLightOn(true); + pointLight.getTransforms().add(new Translate(100, 100, -100)); + gameObjects.add(pointLight); + pointLight = new PointLight(Color.WHITE); + pointLight.setLightOn(true); + pointLight.getTransforms().add(new Translate(900, 900, -100)); + gameObjects.add(pointLight); +// AmbientLight ambientLight = new AmbientLight(new Color(1,1,1,0.4)); +//// ambientLight.setOpacity(0.5); +// gameObjects.add(ambientLight); // create image view for map, bind panel size to image gameObjects.add(mapImage); gameObjects.add(raceBorder); @@ -183,10 +196,7 @@ public class GameView extends Pane { lastTime = now; } } - boatObjects.forEach((boat, boatObject) -> boatObject.updateLocation()); -// for (Cylinder c : mapTokens) { -// c.getTransforms().add(new Rotate(1, new Point3D(45, 45, 45))); -// } +// boatObjects.forEach((boat, boatObject) -> boatObject.updateLocation()); } }; } @@ -445,24 +455,12 @@ public class GameView extends Pane { * @param newTokens the tokens to be put on the course. */ public void updateTokens(List newTokens) { - -// List mapTokens = new ArrayList<>(); -// -// for (Token token : newTokens) { -// Point2D location = findScaledXY(token.getLat(), token.getLng()); -// Marker thisMarker = new Marker(Color.YELLOW); -// thisMarker.setLayoutX(location.getX()); -// thisMarker.setLayoutY(location.getY()); -// mapTokens.add(thisMarker); -// } mapTokens = new ArrayList<>(); for (Token token : newTokens) { Point2D location = findScaledXY(token.getLat(), token.getLng()); Node tokenObject = new VelocityPickup(); -// tokenObject.getTransforms().add(new Rotate(45, new Point3D(45, 45, 45))); tokenObject.setLayoutX(location.getX()); tokenObject.setLayoutY(location.getY()); -// tokenObject.setMaterial(new PhongMaterial(Color.YELLOW)); mapTokens.add(tokenObject); } diff --git a/src/main/java/seng302/visualiser/controllers/RaceViewController.java b/src/main/java/seng302/visualiser/controllers/RaceViewController.java index a3c0761a..e679362c 100644 --- a/src/main/java/seng302/visualiser/controllers/RaceViewController.java +++ b/src/main/java/seng302/visualiser/controllers/RaceViewController.java @@ -31,6 +31,7 @@ import javafx.scene.layout.VBox; import javafx.scene.paint.Color; import javafx.scene.paint.Paint; import javafx.scene.shape.Line; +import javafx.scene.shape.Polyline; import javafx.scene.text.Text; import javafx.stage.Stage; import javafx.stage.StageStyle; @@ -47,6 +48,7 @@ import seng302.visualiser.controllers.annotations.ImportantAnnotationController; import seng302.visualiser.controllers.annotations.ImportantAnnotationDelegate; import seng302.visualiser.controllers.annotations.ImportantAnnotationsState; import seng302.visualiser.fxObjects.BoatObject; +import seng302.visualiser.fxObjects.WindArrow; /** * Controller class that manages the display of a race @@ -66,7 +68,9 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel @FXML private AnchorPane contentAnchorPane; @FXML - private Text windArrowText, windDirectionText; + private Text windDirectionText; + @FXML + private AnchorPane windArrowHolder; @FXML private Slider annotationSlider; @FXML @@ -89,6 +93,7 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel private Timer timer = new Timer(); private List> sparkLineData = new ArrayList<>(); private ImportantAnnotationsState importantAnnotations; + private Polyline windArrow = new WindArrow(Color.LIGHTGRAY); public void initialize() { // Load a default important annotation state @@ -105,6 +110,9 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel positionVbox.getStylesheets().add(getClass().getResource("/css/master.css").toString()); selectAnnotationBtn.setOnAction(event -> loadSelectAnnotationView()); + windArrowHolder.getChildren().addAll(windArrow); + windArrow.setLayoutX(windArrowHolder.getWidth() / 2); + windArrow.setLayoutY(windArrowHolder.getHeight() / 2); } public void loadRace ( @@ -148,13 +156,15 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel raceState.addCollisionListener(gameView::drawCollision); raceState.windDirectionProperty().addListener((obs, oldDirection, newDirection) -> { gameView.setWindDir(newDirection.doubleValue()); - updateWindDirection(newDirection.doubleValue()); + Platform.runLater(() -> updateWindDirection(newDirection.doubleValue())); }); - raceState.windSpeedProperty().addListener((obs, oldSpeed, newSpeed) -> { - updateWindSpeed(newSpeed.doubleValue()); + raceState.windSpeedProperty().addListener((obs, oldSpeed, newSpeed) -> + Platform.runLater(() -> updateWindSpeed(newSpeed.doubleValue())) + ); + Platform.runLater(() -> { + updateWindDirection(raceState.windDirectionProperty().doubleValue()); + updateWindSpeed(raceState.getWindSpeed()); }); - updateWindDirection(raceState.windDirectionProperty().doubleValue()); - updateWindSpeed(raceState.getWindSpeed()); gameView.setWindDir(raceState.windDirectionProperty().doubleValue()); } @@ -383,7 +393,7 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel */ private void updateWindDirection(double direction) { windDirectionText.setText(String.format("%.1f°", direction)); - windArrowText.setRotate(direction); + windArrow.setRotate(direction); } /** diff --git a/src/main/java/seng302/visualiser/fxObjects/BoatObject.java b/src/main/java/seng302/visualiser/fxObjects/BoatObject.java index 24e2eb84..49e4b3b1 100644 --- a/src/main/java/seng302/visualiser/fxObjects/BoatObject.java +++ b/src/main/java/seng302/visualiser/fxObjects/BoatObject.java @@ -8,15 +8,16 @@ import javafx.geometry.Point2D; import javafx.geometry.Point3D; import javafx.scene.Group; import javafx.scene.Node; -import javafx.scene.PointLight; import javafx.scene.paint.Color; import javafx.scene.paint.PhongMaterial; +import javafx.scene.shape.DrawMode; import javafx.scene.shape.Line; import javafx.scene.shape.MeshView; import javafx.scene.shape.Polygon; import javafx.scene.shape.Polyline; import javafx.scene.shape.Shape3D; import javafx.scene.transform.Rotate; +import javafx.scene.transform.Scale; /** * BoatGroup is a javafx group that by default contains a graphical objects for representing a 2 @@ -66,6 +67,7 @@ public class BoatObject extends Group { private Color colour = Color.BLACK; private Boolean isSelected = false, destinationSet; //All boats are initialised as selected private boolean isPlayer = false; + private Rotate rotation = new Rotate(0,0,1); private List selectedBoatListenerListeners = new ArrayList<>(); @@ -97,6 +99,13 @@ public class BoatObject extends Group { */ private void initChildren(double... points) { boatPoly = makeBoatPolygon(); + boatPoly.getTransforms().addAll( + new Rotate(-40, new Point3D(1,0,0)), + rotation, + new Rotate(180, new Point3D(0, 0, 1)) + ); + boatPoly.getTransforms().add(new Scale(10, 10, 10)); + boatPoly.setDrawMode(DrawMode.FILL); // boatPoly.setFill(colour); // boatPoly.setFill(this.colour); // boatPoly.setMaterial(new PhongMaterial(this.colour)); @@ -133,92 +142,27 @@ public class BoatObject extends Group { sail.setFill(Color.TRANSPARENT); sail.setCache(true); super.getChildren().clear(); - super.getChildren().addAll(boatPoly, sail); + super.getChildren().addAll(boatPoly);//, sail); } public void setFill (Color value) { - - - PointLight pointLight = new PointLight(); -// pointLight.setTranslateX(VIEWPORT_SIZE*3/4); -// pointLight.setTranslateY(VIEWPORT_SIZE/2); -// pointLight.setTranslateZ(VIEWPORT_SIZE/2); - -// PointLight pointLight2 = new PointLight(lightColor); -// pointLight2.setTranslateX(VIEWPORT_SIZE*1/4); -// pointLight2.setTranslateY(VIEWPORT_SIZE*3/4); -// pointLight2.setTranslateZ(VIEWPORT_SIZE*3/4); -// PointLight pointLight3 = new PointLight(lightColor); -// pointLight3.setTranslateX(VIEWPORT_SIZE*5/8); -// pointLight3.setTranslateY(VIEWPORT_SIZE/2); -// pointLight3.setTranslateZ(0); -// -// Color ambientColor = Color.rgb(80, 80, 80, 0); -// AmbientLight ambient = new AmbientLight(ambientColor); - - this.getChildren().add(pointLight); -// this.getChildren().add(pointLight2); -// this.getChildren().add(pointLight3); -// this.getChildren().add(ambient); - this.colour = value; PhongMaterial pm = new PhongMaterial(this.colour); -// pm.setSpecularPower(16); -// pm.setSpecularColor(lightColor); + pm.setSpecularPower(0.5); boatPoly.setMaterial(pm); trail.setStroke(colour); } public Shape3D makeBoatPolygon () { StlMeshImporter importer = new StlMeshImporter(); -// System.out.println(BoatObject.class.getResource("simpleboat.stl").toString()); - System.out.println(BoatObject.class.getResource("/views/StartScreenView.fxml").toString()); - importer.read(getClass().getResource("/simpleboat.stl").toString()); + importer.read(getClass().getResource("/meshes/simple_yacht.stl").toString()); +// importer.read(getClass().getResource("/cube.stl").toString()); +// importer.read(getClass().getResource("/meshes/simple_yacht.stl").toString()); +// ObjModelImporter importer = new ObjModelImporter(); +// ColModelImporter importer = new ColModelImporter(); +// importer.read(getClass().getResource("/meshes/simple_yacht.dae")); +// MeshView mesh = importer.getImport()[0]; return new MeshView(importer.getImport()); -// MeshView boat = new MeshView(); -// TriangleMesh boatMesh = new TriangleMesh(); -//// -BOAT_WIDTH / 2, BOAT_HEIGHT / 2, -//// 0.0, -BOAT_HEIGHT / 2, -//// BOAT_WIDTH / 2, BOAT_HEIGHT / 2 -// boatMesh.getPoints().addAll( -// -BOAT_WIDTH / 2, BOAT_HEIGHT / 2, 0, -// 0, -BOAT_HEIGHT / 2,0, -// BOAT_WIDTH / 2, BOAT_HEIGHT / 2, 0 -// ); -// boatMesh.getTexCoords().addAll(0.5f,0,0,1,1,1); -// boatMesh.getFaces().addAll( -// 0,0,1,1,2,2//, -//// 1,1,2,2,3,3, -//// 0,0,2,2,3,3, -//// 1,1,0,0,3,3 -// ); -// boat.setMesh(boatMesh); -//// boat.setDrawMode(DrawMode.LINE); -// return boat; -//// Box b = new Box(); -//// TriangleMesh planeMesh = new TriangleMesh(); -//// float[] points = { -//// -10, 10, 5, -//// -10, -10, 10, -//// 10, 10, 15, -//// 10, 10, 20 -//// }; -//// float[] texCoords = { -//// 0, 0, -//// 0, 1, -//// 1, 0, -//// 1, 1 -//// }; -//// int[] faces = { -//// 0, 0, 1, 1, 2, 2, -//// 2, 2, 3, 3, 1, 1 -//// }; -//// planeMesh.getPoints().addAll(points); -//// planeMesh.getTexCoords().addAll(texCoords); -//// planeMesh.getFaces().addAll(faces); -//// MeshView meshView = new MeshView(planeMesh); -// meshView.setMaterial(new PhongMaterial(Color.BLACK)); -// return meshView; } /** @@ -279,7 +223,7 @@ public class BoatObject extends Group { private void rotateTo(double heading, boolean sailsIn, double windDir) { -// boatPoly.getTransforms().add(new Rotate(heading, new Point3D(0,0,1))); + rotation.setAngle(heading); if (sailsIn) { Double sailWindOffset = 30.0; Double upwindAngleLimit = 15.0; @@ -333,7 +277,7 @@ public class BoatObject extends Group { } public void updateLocation() { - boatPoly.getTransforms().add(new Rotate(2, new Point3D(1,1,1))); +// boatPoly.getTransforms().add(new Rotate(2, new Point3D(1,1,1))); // double dx = xVelocity / 60; // double dy = yVelocity / 60; // @@ -469,7 +413,7 @@ public class BoatObject extends Group { public void setTrajectory(double heading, double velocity, double windDir) { wake.setRotation(lastHeading - heading, velocity); - rotateTo(heading, false, windDir); +// rotateTo(heading, false, windDir); xVelocity = Math.cos(Math.toRadians(heading)) * velocity; yVelocity = Math.sin(Math.toRadians(heading)) * velocity; lastHeading = heading; diff --git a/src/main/java/seng302/visualiser/fxObjects/VelocityPickup.java b/src/main/java/seng302/visualiser/fxObjects/VelocityPickup.java index 24d2d78a..a924ebee 100644 --- a/src/main/java/seng302/visualiser/fxObjects/VelocityPickup.java +++ b/src/main/java/seng302/visualiser/fxObjects/VelocityPickup.java @@ -1,31 +1,31 @@ package seng302.visualiser.fxObjects; -import com.interactivemesh.jfx.importer.stl.StlMeshImporter; import javafx.animation.AnimationTimer; import javafx.application.Platform; import javafx.geometry.Point3D; import javafx.scene.paint.Color; import javafx.scene.paint.PhongMaterial; -import javafx.scene.shape.MeshView; +import javafx.scene.shape.Cylinder; import javafx.scene.transform.Rotate; -import javafx.scene.transform.Scale; /** * Created by cir27 on 3/09/17. */ -public class VelocityPickup extends MeshView { +public class VelocityPickup extends Cylinder { public double rotation = 0; - public Rotate timerRotation = new Rotate(0, new Point3D(0,0,1)); + public Rotate timerRotation = new Rotate(0, new Point3D(1,1,1)); public VelocityPickup () { - StlMeshImporter importer = new StlMeshImporter(); - importer.read(getClass().getResource("/velocity_pickup.stl").toString()); - this.setMesh(importer.getImport()); +// StlMeshImporter importer = new StlMeshImporter(); +// importer.read(getClass().getResource("/velocity_pickup.stl").toString()); +// this.setMesh(importer.getImport()); + this.setRadius(10); + this.setHeight(10); this.setMaterial(new PhongMaterial(Color.YELLOW)); - this.getTransforms().add(new Scale(30,30,30)); - this.getTransforms().add(new Rotate(30, new Point3D(1,0, 0))); - this.getTransforms().add(new Rotate(90, new Point3D(0,1, 0))); +// this.getTransforms().add(new Scale(30,30,30)); +// this.getTransforms().add(new Rotate(30, new Point3D(1,0, 0))); +// this.getTransforms().add(new Rotate(90, new Point3D(0,1, 0))); this.getTransforms().add(timerRotation); AnimationTimer at = new AnimationTimer() { @Override diff --git a/src/main/java/seng302/visualiser/fxObjects/WindArrow.java b/src/main/java/seng302/visualiser/fxObjects/WindArrow.java new file mode 100644 index 00000000..2607ae21 --- /dev/null +++ b/src/main/java/seng302/visualiser/fxObjects/WindArrow.java @@ -0,0 +1,25 @@ +package seng302.visualiser.fxObjects; + +import javafx.scene.paint.Paint; +import javafx.scene.shape.Polyline; +import javafx.scene.shape.StrokeLineCap; +import javafx.scene.shape.StrokeLineJoin; + +/** + * Created by cir27 on 5/09/17. + */ +public class WindArrow extends Polyline { + public WindArrow(Paint fill) { + this.getPoints().addAll( + -10d, 15d, + 0d, 25d, + 0d, -25d, + 0d, 25d, + 10d, 15d + ); + this.setStrokeLineCap(StrokeLineCap.ROUND); + this.setStroke(fill); + this.setStrokeWidth(5); + this.setStrokeLineJoin(StrokeLineJoin.ROUND); + } +} diff --git a/src/main/resources/meshes/cube.stl b/src/main/resources/meshes/cube.stl new file mode 100644 index 00000000..7df90ed8 Binary files /dev/null and b/src/main/resources/meshes/cube.stl differ diff --git a/src/main/resources/meshes/simple_yacht.dae b/src/main/resources/meshes/simple_yacht.dae new file mode 100644 index 00000000..a63a2f66 --- /dev/null +++ b/src/main/resources/meshes/simple_yacht.dae @@ -0,0 +1,164 @@ + + + + + Blender User + Blender 2.78.0 commit date:2016-09-26, commit time:12:42, hash:4bb1e22 + + 2017-09-05T17:02:21 + 2017-09-05T17:02:21 + + Z_UP + + + + + + + 49.13434 + 1.777778 + 0.1 + 100 + + + + + + 0 + 0 + 0 + + + + + + + + + 1 1 1 + 1 + 0 + 0.00111109 + + + + + 0.000999987 + 1 + 0.1 + 0.1 + 1 + 1 + 1 + 2 + 0 + 1 + 1 + 1 + 1 + 1 + 0 + 2880 + 2 + 30.002 + 1.000799 + 0.04999995 + 29.99998 + 1 + 2 + 0 + 0 + 1 + 1 + 1 + 1 + 8192 + 1 + 1 + 0 + 1 + 1 + 1 + 3 + 0 + 0 + 0 + 0 + 0 + 1 + 1 + 1 + 3 + 0.15 + 75 + 1 + 1 + 0 + 1 + 1 + 0 + + + + + + + + + + -1 -1 0 1 -1 0 -1 1 0 1 1 0 0 -2.5 0 0 2.5 0 -1 1 0.2928113 -1 -1 0.2928113 0 -2.8 0.5 1 -1 0.2928113 1 1 0.2928113 0 2.8 0.5 1 0 0.2928113 -1 0 0.2928113 0 0 0.2928113 -0.5 0 0.2928113 0.5 0 0.2928113 0.5 0.5 0.29281 -0.5 0.5 0.29281 0.2 0 0.5528544 0.2 0.2 0.5528531 -0.2 0.2 0.5528531 -0.2 0 0.5528544 0.5 -0.5 0.2928113 -0.5 -0.5 0.2928113 0.2 -0.2 0.5528544 -0.2 -0.2 0.5528544 0.1999999 1.94579e-6 1.120592 0.1999999 0.2000019 1.12059 -0.2 0.2000019 1.12059 -0.2 1.94579e-6 1.120592 0.1999999 -0.199998 1.120592 -0.2 -0.199998 1.120592 0.1999999 5.95355e-6 2.241243 0.1999999 0.200006 2.241241 -0.2 0.200006 2.241241 -0.2 5.95355e-6 2.241243 0.1999999 -0.199994 2.241243 -0.2 -0.199994 2.241243 -0.04999995 0.2000019 1.12059 0.04999995 0.2000019 1.12059 0.04999995 0.200006 2.241241 -0.04999995 0.200006 2.241241 0.04999995 0.2000019 1.12059 0.04999995 0.200006 2.241241 0.04999995 1.611272 1.120585 -0.04999995 1.611272 1.120585 0.04999995 1.611272 1.120585 + + + + + + + + + + 0 0 -1 0 0 1 0.8207916 -0.4898239 -0.2938943 -0.8320503 -0.5547002 0 1 0 0 -1 0 0 0.8320503 0.5547002 0 -0.8207916 0.4898239 -0.2938943 0 2.68221e-6 1 1 0 0 -0.6549913 2.02677e-6 0.7556364 0.6549914 2.02677e-6 0.7556364 0.6549925 0 0.7556354 0 0.6549925 0.7556355 0 -0.6549925 0.7556354 -0.6549925 0 0.7556354 -1 -1.32969e-7 0 -1 0 0 1 0 0 0 -1 3.41205e-6 -1 0 0 0 1 -3.46455e-6 0 7.15256e-6 1 0 -1 3.55692e-6 0 1 -3.59016e-6 1 0 0 0 3.54772e-6 1 0 -3.54772e-6 -1 -1 0 0 1 0 0 0 0.6218634 0.7831258 0 0.1143498 0.9934406 0 -0.1143498 0.9934406 0.8320503 -0.5547002 0 -0.8207916 -0.4898239 -0.2938943 0.8207916 0.4898239 -0.2938943 -0.8320503 0.5547002 0 1 0 0 -0.6549925 5.10446e-6 0.7556354 0.6549925 5.06693e-6 0.7556354 0.6549926 0 0.7556353 0 0.6549926 0.7556354 0 -0.6549926 0.7556353 -0.6549926 0 0.7556353 -1 0 0 -1 0 0 1 0 0 0 -1 3.46455e-6 -1 0 0 0 1 -3.37925e-6 0 1 -3.47767e-6 0 1 -3.49954e-6 0 7.15256e-6 1 0 7.15256e-6 1 0 -1 3.59016e-6 0 1 -3.54583e-6 0 1 -3.59016e-6 0 1 -3.59016e-6 0 1 -3.568e-6 0 3.54772e-6 1 0 -3.54772e-6 -1 0 0.6218634 0.7831259 + + + + + + + + + + + + + +

13 15 14 16 15 14 16 12

+
+ + + + 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 +

2 0 1 0 0 0 12 1 6 1 13 1 4 2 9 2 8 2 4 3 7 3 0 3 3 4 12 4 1 4 0 5 13 5 2 5 5 6 10 6 3 6 5 7 6 7 11 7 18 8 16 8 17 8 19 9 31 9 25 9 15 10 21 10 18 10 20 11 16 11 17 11 25 12 16 12 19 12 21 13 17 13 18 13 25 14 24 14 23 14 15 15 26 15 22 15 30 16 35 16 29 16 15 1 23 1 16 1 22 17 29 17 21 17 28 18 19 18 20 18 31 19 26 19 25 19 32 20 22 20 26 20 40 21 28 21 20 21 41 22 36 22 33 22 38 5 30 5 32 5 37 23 32 23 31 23 41 24 34 24 40 24 34 25 27 25 28 25 27 4 37 4 31 4 41 1 43 1 40 1 40 26 46 26 39 26 39 27 47 27 43 27 39 28 42 28 46 28 44 29 43 29 47 29 43 1 45 1 40 1 42 30 47 30 46 30 4 0 0 0 1 0 2 0 5 0 3 0 3 0 1 0 2 0 13 1 7 1 9 1 8 31 9 31 7 31 12 1 10 1 6 1 11 32 6 32 10 32 13 1 9 1 12 1 4 33 1 33 9 33 4 34 8 34 7 34 9 4 1 4 12 4 3 4 10 4 12 4 6 5 2 5 13 5 0 5 7 5 13 5 5 35 11 35 10 35 5 36 2 36 6 36 18 8 15 8 16 8 19 37 27 37 31 37 15 38 22 38 21 38 20 39 19 39 16 39 25 40 23 40 16 40 21 41 20 41 17 41 25 42 26 42 24 42 15 43 24 43 26 43 30 44 36 44 35 44 15 1 24 1 23 1 22 45 30 45 29 45 28 46 27 46 19 46 31 47 32 47 26 47 32 48 30 48 22 48 20 49 21 49 39 49 39 50 40 50 20 50 21 51 29 51 39 51 37 1 33 1 36 1 41 52 42 52 36 52 33 53 34 53 41 53 36 1 38 1 37 1 42 52 35 52 36 52 38 5 36 5 30 5 37 54 38 54 32 54 39 55 29 55 35 55 42 56 41 56 40 56 39 57 35 57 42 57 34 58 28 58 40 58 40 56 39 56 42 56 34 4 33 4 27 4 27 4 33 4 37 4 41 1 44 1 43 1 40 59 45 59 46 59 39 60 46 60 47 60 43 1 47 1 45 1 42 61 44 61 47 61

+
+
+
+
+ + + + + 0.6859207 -0.3240135 0.6515582 7.481132 0.7276763 0.3054208 -0.6141704 -6.50764 0 0.8953956 0.4452714 5.343665 0 0 0 1 + + + + -0.2908646 -0.7711008 0.5663932 4.076245 0.9551712 -0.1998834 0.2183912 1.005454 -0.05518906 0.6045247 0.7946723 5.903862 0 0 0 1 + + + + 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 + + + + + + + +
\ No newline at end of file diff --git a/src/main/resources/meshes/simple_yacht.obj b/src/main/resources/meshes/simple_yacht.obj new file mode 100644 index 00000000..500bc852 --- /dev/null +++ b/src/main/resources/meshes/simple_yacht.obj @@ -0,0 +1,167 @@ +# Blender v2.78 (sub 0) OBJ File: '' +# www.blender.org +mtllib simple_yacht.mtl +o Plane +v -1.000000 0.000000 1.000000 +v 1.000000 0.000000 1.000000 +v -1.000000 0.000000 -1.000000 +v 1.000000 0.000000 -1.000000 +v 0.000000 0.000000 2.500000 +v 0.000000 0.000000 -2.500000 +v -1.000000 0.292811 -1.000000 +v -1.000000 0.292811 1.000000 +v 0.000000 0.500000 2.800000 +v 1.000000 0.292811 1.000000 +v 1.000000 0.292811 -1.000000 +v 0.000000 0.500000 -2.800000 +v 1.000000 0.292811 0.000000 +v -1.000000 0.292811 0.000000 +v 0.000000 0.292811 0.000000 +v -0.500000 0.292811 0.000000 +v 0.500000 0.292811 0.000000 +v 0.500000 0.292810 -0.500000 +v -0.500000 0.292810 -0.500000 +v 0.200000 0.552854 0.000000 +v 0.200000 0.552853 -0.200000 +v -0.200000 0.552853 -0.200000 +v -0.200000 0.552854 0.000000 +v 0.500000 0.292811 0.500000 +v -0.500000 0.292811 0.500000 +v 0.200000 0.552854 0.200000 +v -0.200000 0.552854 0.200000 +v 0.200000 1.120592 -0.000002 +v 0.200000 1.120590 -0.200002 +v -0.200000 1.120590 -0.200002 +v -0.200000 1.120592 -0.000002 +v 0.200000 1.120592 0.199998 +v -0.200000 1.120592 0.199998 +v 0.200000 2.241243 -0.000006 +v 0.200000 2.241241 -0.200006 +v -0.200000 2.241241 -0.200006 +v -0.200000 2.241243 -0.000006 +v 0.200000 2.241243 0.199994 +v -0.200000 2.241243 0.199994 +v -0.050000 1.120590 -0.200002 +v 0.050000 1.120590 -0.200002 +v 0.050000 2.241241 -0.200006 +v -0.050000 2.241241 -0.200006 +v 0.050000 1.120590 -0.200002 +v 0.050000 2.241241 -0.200006 +v 0.050000 1.120585 -1.611272 +v -0.050000 1.120585 -1.611272 +v 0.050000 1.120585 -1.611272 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn 0.8208 -0.2939 0.4898 +vn -0.8321 0.0000 0.5547 +vn 1.0000 0.0000 0.0000 +vn -1.0000 0.0000 0.0000 +vn 0.8321 0.0000 -0.5547 +vn -0.8208 -0.2939 -0.4898 +vn -0.6550 0.7556 -0.0000 +vn 0.6550 0.7556 -0.0000 +vn 0.0000 0.7556 -0.6550 +vn 0.0000 0.7556 0.6550 +vn 0.0000 0.0000 1.0000 +vn 0.0000 -0.0000 -1.0000 +vn 0.0000 0.7831 -0.6219 +vn 0.0000 0.9934 -0.1143 +vn 0.0000 0.9934 0.1143 +vn 0.8321 0.0000 0.5547 +vn -0.8208 -0.2939 0.4898 +vn 0.8208 -0.2939 -0.4898 +vn -0.8321 0.0000 -0.5547 +usemtl None +s off +f 3//1 2//1 1//1 +f 13//2 7//2 14//2 +f 5//3 10//3 9//3 +f 5//4 8//4 1//4 +f 4//5 13//5 2//5 +f 1//6 14//6 3//6 +f 6//7 11//7 4//7 +f 6//8 7//8 12//8 +f 19//2 17//2 18//2 +f 20//5 32//5 26//5 +f 16//9 22//9 19//9 +f 21//10 17//10 18//10 +f 26//10 17//10 20//10 +f 22//11 18//11 19//11 +f 26//12 25//12 24//12 +f 16//9 27//9 23//9 +f 31//6 36//6 30//6 +f 16//2 24//2 17//2 +f 23//6 30//6 22//6 +f 29//5 20//5 21//5 +f 32//13 27//13 26//13 +f 33//6 23//6 27//6 +f 41//14 29//14 21//14 +f 42//2 37//2 34//2 +f 39//6 31//6 33//6 +f 38//13 33//13 32//13 +f 42//14 35//14 41//14 +f 35//5 28//5 29//5 +f 28//5 38//5 32//5 +f 42//13 44//13 41//13 +f 41//2 47//2 40//2 +f 40//1 48//1 44//1 +f 40//6 43//6 47//6 +f 45//5 44//5 48//5 +f 44//13 46//13 41//13 +f 43//15 48//15 47//15 +f 5//1 1//1 2//1 +f 3//1 6//1 4//1 +f 4//1 2//1 3//1 +f 14//2 8//2 10//2 +f 9//16 10//16 8//16 +f 13//2 11//2 7//2 +f 12//17 7//17 11//17 +f 14//2 10//2 13//2 +f 5//18 2//18 10//18 +f 5//19 9//19 8//19 +f 10//5 2//5 13//5 +f 4//5 11//5 13//5 +f 7//6 3//6 14//6 +f 1//6 8//6 14//6 +f 6//20 12//20 11//20 +f 6//21 3//21 7//21 +f 19//2 16//2 17//2 +f 20//5 28//5 32//5 +f 16//9 23//9 22//9 +f 21//10 20//10 17//10 +f 26//10 24//10 17//10 +f 22//11 21//11 18//11 +f 26//12 27//12 25//12 +f 16//9 25//9 27//9 +f 31//6 37//6 36//6 +f 16//2 25//2 24//2 +f 23//6 31//6 30//6 +f 29//5 28//5 20//5 +f 32//13 33//13 27//13 +f 33//6 31//6 23//6 +f 21//14 22//14 40//14 +f 40//14 41//14 21//14 +f 22//14 30//14 40//14 +f 38//2 34//2 37//2 +f 42//2 43//2 37//2 +f 34//2 35//2 42//2 +f 37//2 39//2 38//2 +f 43//2 36//2 37//2 +f 39//6 37//6 31//6 +f 38//13 39//13 33//13 +f 40//14 30//14 36//14 +f 43//14 42//14 41//14 +f 40//14 36//14 43//14 +f 35//14 29//14 41//14 +f 41//14 40//14 43//14 +f 35//5 34//5 28//5 +f 28//5 34//5 38//5 +f 42//13 45//13 44//13 +f 41//2 46//2 47//2 +f 40//1 47//1 48//1 +f 44//13 48//13 46//13 +f 43//15 45//15 48//15 +l 16 14 +l 17 15 +l 15 16 +l 13 17 diff --git a/src/main/resources/meshes/simple_yacht.stl b/src/main/resources/meshes/simple_yacht.stl new file mode 100644 index 00000000..bb751b15 Binary files /dev/null and b/src/main/resources/meshes/simple_yacht.stl differ diff --git a/src/main/resources/meshes/simple_yacht.x3d b/src/main/resources/meshes/simple_yacht.x3d new file mode 100644 index 00000000..48e8cb28 --- /dev/null +++ b/src/main/resources/meshes/simple_yacht.x3d @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/simpleboat.stl b/src/main/resources/meshes/simpleboat.stl similarity index 100% rename from src/main/resources/simpleboat.stl rename to src/main/resources/meshes/simpleboat.stl diff --git a/src/main/resources/velocity_pickup.stl b/src/main/resources/meshes/velocity_pickup.stl similarity index 100% rename from src/main/resources/velocity_pickup.stl rename to src/main/resources/meshes/velocity_pickup.stl diff --git a/src/main/resources/velocity_pickup_2manyP.stl b/src/main/resources/velocity_pickup_2manyP.stl deleted file mode 100644 index d00f818d..00000000 Binary files a/src/main/resources/velocity_pickup_2manyP.stl and /dev/null differ diff --git a/src/main/resources/views/RaceView.fxml b/src/main/resources/views/RaceView.fxml index d00f0099..cbcaaa1a 100644 --- a/src/main/resources/views/RaceView.fxml +++ b/src/main/resources/views/RaceView.fxml @@ -26,30 +26,20 @@ - + - + - - + + - - + + - - + + @@ -61,11 +51,6 @@