mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
Created new yacht shape and altered the number of lights.
#implement
This commit is contained in:
@@ -15,6 +15,7 @@ import javafx.collections.ObservableList;
|
|||||||
import javafx.geometry.Point2D;
|
import javafx.geometry.Point2D;
|
||||||
import javafx.scene.Group;
|
import javafx.scene.Group;
|
||||||
import javafx.scene.Node;
|
import javafx.scene.Node;
|
||||||
|
import javafx.scene.PointLight;
|
||||||
import javafx.scene.image.ImageView;
|
import javafx.scene.image.ImageView;
|
||||||
import javafx.scene.input.KeyCode;
|
import javafx.scene.input.KeyCode;
|
||||||
import javafx.scene.input.KeyEvent;
|
import javafx.scene.input.KeyEvent;
|
||||||
@@ -25,6 +26,7 @@ import javafx.scene.paint.Paint;
|
|||||||
import javafx.scene.shape.Circle;
|
import javafx.scene.shape.Circle;
|
||||||
import javafx.scene.shape.Polygon;
|
import javafx.scene.shape.Polygon;
|
||||||
import javafx.scene.text.Text;
|
import javafx.scene.text.Text;
|
||||||
|
import javafx.scene.transform.Translate;
|
||||||
import javafx.util.Duration;
|
import javafx.util.Duration;
|
||||||
import seng302.gameServer.messages.RoundingSide;
|
import seng302.gameServer.messages.RoundingSide;
|
||||||
import seng302.model.ClientYacht;
|
import seng302.model.ClientYacht;
|
||||||
@@ -139,6 +141,17 @@ public class GameView extends Pane {
|
|||||||
|
|
||||||
public GameView () {
|
public GameView () {
|
||||||
gameObjects = this.getChildren();
|
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
|
// create image view for map, bind panel size to image
|
||||||
gameObjects.add(mapImage);
|
gameObjects.add(mapImage);
|
||||||
gameObjects.add(raceBorder);
|
gameObjects.add(raceBorder);
|
||||||
@@ -183,10 +196,7 @@ public class GameView extends Pane {
|
|||||||
lastTime = now;
|
lastTime = now;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
boatObjects.forEach((boat, boatObject) -> boatObject.updateLocation());
|
// boatObjects.forEach((boat, boatObject) -> boatObject.updateLocation());
|
||||||
// for (Cylinder c : mapTokens) {
|
|
||||||
// c.getTransforms().add(new Rotate(1, new Point3D(45, 45, 45)));
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -445,24 +455,12 @@ public class GameView extends Pane {
|
|||||||
* @param newTokens the tokens to be put on the course.
|
* @param newTokens the tokens to be put on the course.
|
||||||
*/
|
*/
|
||||||
public void updateTokens(List<Token> newTokens) {
|
public void updateTokens(List<Token> newTokens) {
|
||||||
|
|
||||||
// List<Marker> 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<>();
|
mapTokens = new ArrayList<>();
|
||||||
for (Token token : newTokens) {
|
for (Token token : newTokens) {
|
||||||
Point2D location = findScaledXY(token.getLat(), token.getLng());
|
Point2D location = findScaledXY(token.getLat(), token.getLng());
|
||||||
Node tokenObject = new VelocityPickup();
|
Node tokenObject = new VelocityPickup();
|
||||||
// tokenObject.getTransforms().add(new Rotate(45, new Point3D(45, 45, 45)));
|
|
||||||
tokenObject.setLayoutX(location.getX());
|
tokenObject.setLayoutX(location.getX());
|
||||||
tokenObject.setLayoutY(location.getY());
|
tokenObject.setLayoutY(location.getY());
|
||||||
// tokenObject.setMaterial(new PhongMaterial(Color.YELLOW));
|
|
||||||
mapTokens.add(tokenObject);
|
mapTokens.add(tokenObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import javafx.scene.layout.VBox;
|
|||||||
import javafx.scene.paint.Color;
|
import javafx.scene.paint.Color;
|
||||||
import javafx.scene.paint.Paint;
|
import javafx.scene.paint.Paint;
|
||||||
import javafx.scene.shape.Line;
|
import javafx.scene.shape.Line;
|
||||||
|
import javafx.scene.shape.Polyline;
|
||||||
import javafx.scene.text.Text;
|
import javafx.scene.text.Text;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import javafx.stage.StageStyle;
|
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.ImportantAnnotationDelegate;
|
||||||
import seng302.visualiser.controllers.annotations.ImportantAnnotationsState;
|
import seng302.visualiser.controllers.annotations.ImportantAnnotationsState;
|
||||||
import seng302.visualiser.fxObjects.BoatObject;
|
import seng302.visualiser.fxObjects.BoatObject;
|
||||||
|
import seng302.visualiser.fxObjects.WindArrow;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Controller class that manages the display of a race
|
* Controller class that manages the display of a race
|
||||||
@@ -66,7 +68,9 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
|
|||||||
@FXML
|
@FXML
|
||||||
private AnchorPane contentAnchorPane;
|
private AnchorPane contentAnchorPane;
|
||||||
@FXML
|
@FXML
|
||||||
private Text windArrowText, windDirectionText;
|
private Text windDirectionText;
|
||||||
|
@FXML
|
||||||
|
private AnchorPane windArrowHolder;
|
||||||
@FXML
|
@FXML
|
||||||
private Slider annotationSlider;
|
private Slider annotationSlider;
|
||||||
@FXML
|
@FXML
|
||||||
@@ -89,6 +93,7 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
|
|||||||
private Timer timer = new Timer();
|
private Timer timer = new Timer();
|
||||||
private List<Series<String, Double>> sparkLineData = new ArrayList<>();
|
private List<Series<String, Double>> sparkLineData = new ArrayList<>();
|
||||||
private ImportantAnnotationsState importantAnnotations;
|
private ImportantAnnotationsState importantAnnotations;
|
||||||
|
private Polyline windArrow = new WindArrow(Color.LIGHTGRAY);
|
||||||
|
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
// Load a default important annotation state
|
// 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());
|
positionVbox.getStylesheets().add(getClass().getResource("/css/master.css").toString());
|
||||||
|
|
||||||
selectAnnotationBtn.setOnAction(event -> loadSelectAnnotationView());
|
selectAnnotationBtn.setOnAction(event -> loadSelectAnnotationView());
|
||||||
|
windArrowHolder.getChildren().addAll(windArrow);
|
||||||
|
windArrow.setLayoutX(windArrowHolder.getWidth() / 2);
|
||||||
|
windArrow.setLayoutY(windArrowHolder.getHeight() / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadRace (
|
public void loadRace (
|
||||||
@@ -148,13 +156,15 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
|
|||||||
raceState.addCollisionListener(gameView::drawCollision);
|
raceState.addCollisionListener(gameView::drawCollision);
|
||||||
raceState.windDirectionProperty().addListener((obs, oldDirection, newDirection) -> {
|
raceState.windDirectionProperty().addListener((obs, oldDirection, newDirection) -> {
|
||||||
gameView.setWindDir(newDirection.doubleValue());
|
gameView.setWindDir(newDirection.doubleValue());
|
||||||
updateWindDirection(newDirection.doubleValue());
|
Platform.runLater(() -> updateWindDirection(newDirection.doubleValue()));
|
||||||
});
|
});
|
||||||
raceState.windSpeedProperty().addListener((obs, oldSpeed, newSpeed) -> {
|
raceState.windSpeedProperty().addListener((obs, oldSpeed, newSpeed) ->
|
||||||
updateWindSpeed(newSpeed.doubleValue());
|
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());
|
gameView.setWindDir(raceState.windDirectionProperty().doubleValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -383,7 +393,7 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
|
|||||||
*/
|
*/
|
||||||
private void updateWindDirection(double direction) {
|
private void updateWindDirection(double direction) {
|
||||||
windDirectionText.setText(String.format("%.1f°", direction));
|
windDirectionText.setText(String.format("%.1f°", direction));
|
||||||
windArrowText.setRotate(direction);
|
windArrow.setRotate(direction);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -8,15 +8,16 @@ import javafx.geometry.Point2D;
|
|||||||
import javafx.geometry.Point3D;
|
import javafx.geometry.Point3D;
|
||||||
import javafx.scene.Group;
|
import javafx.scene.Group;
|
||||||
import javafx.scene.Node;
|
import javafx.scene.Node;
|
||||||
import javafx.scene.PointLight;
|
|
||||||
import javafx.scene.paint.Color;
|
import javafx.scene.paint.Color;
|
||||||
import javafx.scene.paint.PhongMaterial;
|
import javafx.scene.paint.PhongMaterial;
|
||||||
|
import javafx.scene.shape.DrawMode;
|
||||||
import javafx.scene.shape.Line;
|
import javafx.scene.shape.Line;
|
||||||
import javafx.scene.shape.MeshView;
|
import javafx.scene.shape.MeshView;
|
||||||
import javafx.scene.shape.Polygon;
|
import javafx.scene.shape.Polygon;
|
||||||
import javafx.scene.shape.Polyline;
|
import javafx.scene.shape.Polyline;
|
||||||
import javafx.scene.shape.Shape3D;
|
import javafx.scene.shape.Shape3D;
|
||||||
import javafx.scene.transform.Rotate;
|
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
|
* 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 Color colour = Color.BLACK;
|
||||||
private Boolean isSelected = false, destinationSet; //All boats are initialised as selected
|
private Boolean isSelected = false, destinationSet; //All boats are initialised as selected
|
||||||
private boolean isPlayer = false;
|
private boolean isPlayer = false;
|
||||||
|
private Rotate rotation = new Rotate(0,0,1);
|
||||||
|
|
||||||
private List<SelectedBoatListener> selectedBoatListenerListeners = new ArrayList<>();
|
private List<SelectedBoatListener> selectedBoatListenerListeners = new ArrayList<>();
|
||||||
|
|
||||||
@@ -97,6 +99,13 @@ public class BoatObject extends Group {
|
|||||||
*/
|
*/
|
||||||
private void initChildren(double... points) {
|
private void initChildren(double... points) {
|
||||||
boatPoly = makeBoatPolygon();
|
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(colour);
|
||||||
// boatPoly.setFill(this.colour);
|
// boatPoly.setFill(this.colour);
|
||||||
// boatPoly.setMaterial(new PhongMaterial(this.colour));
|
// boatPoly.setMaterial(new PhongMaterial(this.colour));
|
||||||
@@ -133,92 +142,27 @@ public class BoatObject extends Group {
|
|||||||
sail.setFill(Color.TRANSPARENT);
|
sail.setFill(Color.TRANSPARENT);
|
||||||
sail.setCache(true);
|
sail.setCache(true);
|
||||||
super.getChildren().clear();
|
super.getChildren().clear();
|
||||||
super.getChildren().addAll(boatPoly, sail);
|
super.getChildren().addAll(boatPoly);//, sail);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFill (Color value) {
|
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;
|
this.colour = value;
|
||||||
PhongMaterial pm = new PhongMaterial(this.colour);
|
PhongMaterial pm = new PhongMaterial(this.colour);
|
||||||
// pm.setSpecularPower(16);
|
pm.setSpecularPower(0.5);
|
||||||
// pm.setSpecularColor(lightColor);
|
|
||||||
boatPoly.setMaterial(pm);
|
boatPoly.setMaterial(pm);
|
||||||
trail.setStroke(colour);
|
trail.setStroke(colour);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Shape3D makeBoatPolygon () {
|
public Shape3D makeBoatPolygon () {
|
||||||
StlMeshImporter importer = new StlMeshImporter();
|
StlMeshImporter importer = new StlMeshImporter();
|
||||||
// System.out.println(BoatObject.class.getResource("simpleboat.stl").toString());
|
importer.read(getClass().getResource("/meshes/simple_yacht.stl").toString());
|
||||||
System.out.println(BoatObject.class.getResource("/views/StartScreenView.fxml").toString());
|
// importer.read(getClass().getResource("/cube.stl").toString());
|
||||||
importer.read(getClass().getResource("/simpleboat.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());
|
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) {
|
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) {
|
if (sailsIn) {
|
||||||
Double sailWindOffset = 30.0;
|
Double sailWindOffset = 30.0;
|
||||||
Double upwindAngleLimit = 15.0;
|
Double upwindAngleLimit = 15.0;
|
||||||
@@ -333,7 +277,7 @@ public class BoatObject extends Group {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void updateLocation() {
|
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 dx = xVelocity / 60;
|
||||||
// double dy = yVelocity / 60;
|
// double dy = yVelocity / 60;
|
||||||
//
|
//
|
||||||
@@ -469,7 +413,7 @@ public class BoatObject extends Group {
|
|||||||
|
|
||||||
public void setTrajectory(double heading, double velocity, double windDir) {
|
public void setTrajectory(double heading, double velocity, double windDir) {
|
||||||
wake.setRotation(lastHeading - heading, velocity);
|
wake.setRotation(lastHeading - heading, velocity);
|
||||||
rotateTo(heading, false, windDir);
|
// rotateTo(heading, false, windDir);
|
||||||
xVelocity = Math.cos(Math.toRadians(heading)) * velocity;
|
xVelocity = Math.cos(Math.toRadians(heading)) * velocity;
|
||||||
yVelocity = Math.sin(Math.toRadians(heading)) * velocity;
|
yVelocity = Math.sin(Math.toRadians(heading)) * velocity;
|
||||||
lastHeading = heading;
|
lastHeading = heading;
|
||||||
|
|||||||
@@ -1,31 +1,31 @@
|
|||||||
package seng302.visualiser.fxObjects;
|
package seng302.visualiser.fxObjects;
|
||||||
|
|
||||||
import com.interactivemesh.jfx.importer.stl.StlMeshImporter;
|
|
||||||
import javafx.animation.AnimationTimer;
|
import javafx.animation.AnimationTimer;
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
import javafx.geometry.Point3D;
|
import javafx.geometry.Point3D;
|
||||||
import javafx.scene.paint.Color;
|
import javafx.scene.paint.Color;
|
||||||
import javafx.scene.paint.PhongMaterial;
|
import javafx.scene.paint.PhongMaterial;
|
||||||
import javafx.scene.shape.MeshView;
|
import javafx.scene.shape.Cylinder;
|
||||||
import javafx.scene.transform.Rotate;
|
import javafx.scene.transform.Rotate;
|
||||||
import javafx.scene.transform.Scale;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by cir27 on 3/09/17.
|
* Created by cir27 on 3/09/17.
|
||||||
*/
|
*/
|
||||||
public class VelocityPickup extends MeshView {
|
public class VelocityPickup extends Cylinder {
|
||||||
|
|
||||||
public double rotation = 0;
|
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 () {
|
public VelocityPickup () {
|
||||||
StlMeshImporter importer = new StlMeshImporter();
|
// StlMeshImporter importer = new StlMeshImporter();
|
||||||
importer.read(getClass().getResource("/velocity_pickup.stl").toString());
|
// importer.read(getClass().getResource("/velocity_pickup.stl").toString());
|
||||||
this.setMesh(importer.getImport());
|
// this.setMesh(importer.getImport());
|
||||||
|
this.setRadius(10);
|
||||||
|
this.setHeight(10);
|
||||||
this.setMaterial(new PhongMaterial(Color.YELLOW));
|
this.setMaterial(new PhongMaterial(Color.YELLOW));
|
||||||
this.getTransforms().add(new Scale(30,30,30));
|
// this.getTransforms().add(new Scale(30,30,30));
|
||||||
this.getTransforms().add(new Rotate(30, new Point3D(1,0, 0)));
|
// 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 Rotate(90, new Point3D(0,1, 0)));
|
||||||
this.getTransforms().add(timerRotation);
|
this.getTransforms().add(timerRotation);
|
||||||
AnimationTimer at = new AnimationTimer() {
|
AnimationTimer at = new AnimationTimer() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
@@ -0,0 +1,164 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
|
||||||
|
<asset>
|
||||||
|
<contributor>
|
||||||
|
<author>Blender User</author>
|
||||||
|
<authoring_tool>Blender 2.78.0 commit date:2016-09-26, commit time:12:42, hash:4bb1e22</authoring_tool>
|
||||||
|
</contributor>
|
||||||
|
<created>2017-09-05T17:02:21</created>
|
||||||
|
<modified>2017-09-05T17:02:21</modified>
|
||||||
|
<unit name="meter" meter="1"/>
|
||||||
|
<up_axis>Z_UP</up_axis>
|
||||||
|
</asset>
|
||||||
|
<library_cameras>
|
||||||
|
<camera id="Camera-camera" name="Camera">
|
||||||
|
<optics>
|
||||||
|
<technique_common>
|
||||||
|
<perspective>
|
||||||
|
<xfov sid="xfov">49.13434</xfov>
|
||||||
|
<aspect_ratio>1.777778</aspect_ratio>
|
||||||
|
<znear sid="znear">0.1</znear>
|
||||||
|
<zfar sid="zfar">100</zfar>
|
||||||
|
</perspective>
|
||||||
|
</technique_common>
|
||||||
|
</optics>
|
||||||
|
<extra>
|
||||||
|
<technique profile="blender">
|
||||||
|
<YF_dofdist>0</YF_dofdist>
|
||||||
|
<shiftx>0</shiftx>
|
||||||
|
<shifty>0</shifty>
|
||||||
|
</technique>
|
||||||
|
</extra>
|
||||||
|
</camera>
|
||||||
|
</library_cameras>
|
||||||
|
<library_lights>
|
||||||
|
<light id="Lamp-light" name="Lamp">
|
||||||
|
<technique_common>
|
||||||
|
<point>
|
||||||
|
<color sid="color">1 1 1</color>
|
||||||
|
<constant_attenuation>1</constant_attenuation>
|
||||||
|
<linear_attenuation>0</linear_attenuation>
|
||||||
|
<quadratic_attenuation>0.00111109</quadratic_attenuation>
|
||||||
|
</point>
|
||||||
|
</technique_common>
|
||||||
|
<extra>
|
||||||
|
<technique profile="blender">
|
||||||
|
<adapt_thresh>0.000999987</adapt_thresh>
|
||||||
|
<area_shape>1</area_shape>
|
||||||
|
<area_size>0.1</area_size>
|
||||||
|
<area_sizey>0.1</area_sizey>
|
||||||
|
<area_sizez>1</area_sizez>
|
||||||
|
<atm_distance_factor>1</atm_distance_factor>
|
||||||
|
<atm_extinction_factor>1</atm_extinction_factor>
|
||||||
|
<atm_turbidity>2</atm_turbidity>
|
||||||
|
<att1>0</att1>
|
||||||
|
<att2>1</att2>
|
||||||
|
<backscattered_light>1</backscattered_light>
|
||||||
|
<bias>1</bias>
|
||||||
|
<blue>1</blue>
|
||||||
|
<buffers>1</buffers>
|
||||||
|
<bufflag>0</bufflag>
|
||||||
|
<bufsize>2880</bufsize>
|
||||||
|
<buftype>2</buftype>
|
||||||
|
<clipend>30.002</clipend>
|
||||||
|
<clipsta>1.000799</clipsta>
|
||||||
|
<compressthresh>0.04999995</compressthresh>
|
||||||
|
<dist sid="blender_dist">29.99998</dist>
|
||||||
|
<energy sid="blender_energy">1</energy>
|
||||||
|
<falloff_type>2</falloff_type>
|
||||||
|
<filtertype>0</filtertype>
|
||||||
|
<flag>0</flag>
|
||||||
|
<gamma sid="blender_gamma">1</gamma>
|
||||||
|
<green>1</green>
|
||||||
|
<halo_intensity sid="blnder_halo_intensity">1</halo_intensity>
|
||||||
|
<horizon_brightness>1</horizon_brightness>
|
||||||
|
<mode>8192</mode>
|
||||||
|
<ray_samp>1</ray_samp>
|
||||||
|
<ray_samp_method>1</ray_samp_method>
|
||||||
|
<ray_samp_type>0</ray_samp_type>
|
||||||
|
<ray_sampy>1</ray_sampy>
|
||||||
|
<ray_sampz>1</ray_sampz>
|
||||||
|
<red>1</red>
|
||||||
|
<samp>3</samp>
|
||||||
|
<shadhalostep>0</shadhalostep>
|
||||||
|
<shadow_b sid="blender_shadow_b">0</shadow_b>
|
||||||
|
<shadow_g sid="blender_shadow_g">0</shadow_g>
|
||||||
|
<shadow_r sid="blender_shadow_r">0</shadow_r>
|
||||||
|
<sky_colorspace>0</sky_colorspace>
|
||||||
|
<sky_exposure>1</sky_exposure>
|
||||||
|
<skyblendfac>1</skyblendfac>
|
||||||
|
<skyblendtype>1</skyblendtype>
|
||||||
|
<soft>3</soft>
|
||||||
|
<spotblend>0.15</spotblend>
|
||||||
|
<spotsize>75</spotsize>
|
||||||
|
<spread>1</spread>
|
||||||
|
<sun_brightness>1</sun_brightness>
|
||||||
|
<sun_effect_type>0</sun_effect_type>
|
||||||
|
<sun_intensity>1</sun_intensity>
|
||||||
|
<sun_size>1</sun_size>
|
||||||
|
<type>0</type>
|
||||||
|
</technique>
|
||||||
|
</extra>
|
||||||
|
</light>
|
||||||
|
</library_lights>
|
||||||
|
<library_images/>
|
||||||
|
<library_geometries>
|
||||||
|
<geometry id="Plane-mesh" name="Plane">
|
||||||
|
<mesh>
|
||||||
|
<source id="Plane-mesh-positions">
|
||||||
|
<float_array id="Plane-mesh-positions-array" count="144">-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</float_array>
|
||||||
|
<technique_common>
|
||||||
|
<accessor source="#Plane-mesh-positions-array" count="48" stride="3">
|
||||||
|
<param name="X" type="float"/>
|
||||||
|
<param name="Y" type="float"/>
|
||||||
|
<param name="Z" type="float"/>
|
||||||
|
</accessor>
|
||||||
|
</technique_common>
|
||||||
|
</source>
|
||||||
|
<source id="Plane-mesh-normals">
|
||||||
|
<float_array id="Plane-mesh-normals-array" count="186">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</float_array>
|
||||||
|
<technique_common>
|
||||||
|
<accessor source="#Plane-mesh-normals-array" count="62" stride="3">
|
||||||
|
<param name="X" type="float"/>
|
||||||
|
<param name="Y" type="float"/>
|
||||||
|
<param name="Z" type="float"/>
|
||||||
|
</accessor>
|
||||||
|
</technique_common>
|
||||||
|
</source>
|
||||||
|
<vertices id="Plane-mesh-vertices">
|
||||||
|
<input semantic="POSITION" source="#Plane-mesh-positions"/>
|
||||||
|
</vertices>
|
||||||
|
<lines count="4">
|
||||||
|
<input semantic="VERTEX" source="#Plane-mesh-vertices" offset="0"/>
|
||||||
|
<p>13 15 14 16 15 14 16 12</p>
|
||||||
|
</lines>
|
||||||
|
<polylist count="88">
|
||||||
|
<input semantic="VERTEX" source="#Plane-mesh-vertices" offset="0"/>
|
||||||
|
<input semantic="NORMAL" source="#Plane-mesh-normals" offset="1"/>
|
||||||
|
<vcount>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 </vcount>
|
||||||
|
<p>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</p>
|
||||||
|
</polylist>
|
||||||
|
</mesh>
|
||||||
|
</geometry>
|
||||||
|
</library_geometries>
|
||||||
|
<library_controllers/>
|
||||||
|
<library_visual_scenes>
|
||||||
|
<visual_scene id="Scene" name="Scene">
|
||||||
|
<node id="Camera" name="Camera" type="NODE">
|
||||||
|
<matrix sid="transform">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</matrix>
|
||||||
|
<instance_camera url="#Camera-camera"/>
|
||||||
|
</node>
|
||||||
|
<node id="Lamp" name="Lamp" type="NODE">
|
||||||
|
<matrix sid="transform">-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</matrix>
|
||||||
|
<instance_light url="#Lamp-light"/>
|
||||||
|
</node>
|
||||||
|
<node id="Plane" name="Plane" type="NODE">
|
||||||
|
<matrix sid="transform">1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</matrix>
|
||||||
|
<instance_geometry url="#Plane-mesh" name="Plane"/>
|
||||||
|
</node>
|
||||||
|
</visual_scene>
|
||||||
|
</library_visual_scenes>
|
||||||
|
<scene>
|
||||||
|
<instance_visual_scene url="#Scene"/>
|
||||||
|
</scene>
|
||||||
|
</COLLADA>
|
||||||
@@ -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
|
||||||
Binary file not shown.
@@ -0,0 +1,69 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "http://www.web3d.org/specifications/x3d-3.0.dtd">
|
||||||
|
<X3D version="3.0" profile="Immersive" xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xsd:noNamespaceSchemaLocation="http://www.web3d.org/specifications/x3d-3.0.xsd">
|
||||||
|
<head>
|
||||||
|
<meta name="filename" content="simple_yacht.x3d" />
|
||||||
|
<meta name="generator" content="Blender 2.78 (sub 0)" />
|
||||||
|
</head>
|
||||||
|
<Scene>
|
||||||
|
<NavigationInfo headlight="false"
|
||||||
|
visibilityLimit="0.0"
|
||||||
|
type='"EXAMINE", "ANY"'
|
||||||
|
avatarSize="0.25, 1.75, 0.75"
|
||||||
|
/>
|
||||||
|
<Background DEF="WO_World"
|
||||||
|
groundColor="0.051 0.051 0.051"
|
||||||
|
skyColor="0.051 0.051 0.051"
|
||||||
|
/>
|
||||||
|
<Transform DEF="Plane_TRANSFORM"
|
||||||
|
translation="0.000000 0.000000 0.000000"
|
||||||
|
scale="1.000000 1.000000 1.000000"
|
||||||
|
rotation="0.000000 0.707107 0.707107 3.141593"
|
||||||
|
>
|
||||||
|
<Transform DEF="Plane_ifs_TRANSFORM"
|
||||||
|
translation="0.000000 0.000000 0.000000"
|
||||||
|
scale="1.000000 1.000000 1.000000"
|
||||||
|
rotation="1.000000 0.000000 0.000000 0.000000"
|
||||||
|
>
|
||||||
|
<Group DEF="group_ME_Plane">
|
||||||
|
<Shape>
|
||||||
|
<Appearance>
|
||||||
|
</Appearance>
|
||||||
|
<IndexedFaceSet solid="false"
|
||||||
|
coordIndex="2 1 0 -1 12 6 13 -1 4 9 8 -1 4 7 0 -1 3 12 1 -1 0 13 2 -1 5 10 3 -1 5 6 11 -1 18 16 17 -1 19 31 25 -1 15 21 18 -1 20 16 17 -1 25 16 19 -1 21 17 18 -1 25 24 23 -1 15 26 22 -1 30 35 29 -1 15 23 16 -1 22 29 21 -1 28 19 20 -1 31 26 25 -1 32 22 26 -1 40 28 20 -1 41 36 33 -1 38 30 32 -1 37 32 31 -1 41 34 40 -1 34 27 28 -1 27 37 31 -1 41 43 40 -1 40 46 39 -1 39 47 43 -1 39 42 46 -1 44 43 47 -1 43 45 40 -1 42 47 46 -1 4 0 1 -1 2 5 3 -1 3 1 2 -1 13 7 9 -1 8 9 7 -1 12 10 6 -1 11 6 10 -1 13 9 12 -1 4 1 9 -1 4 8 7 -1 9 1 12 -1 3 10 12 -1 6 2 13 -1 0 7 13 -1 5 11 10 -1 5 2 6 -1 18 15 16 -1 19 27 31 -1 15 22 21 -1 20 19 16 -1 25 23 16 -1 21 20 17 -1 25 26 24 -1 15 24 26 -1 30 36 35 -1 15 24 23 -1 22 30 29 -1 28 27 19 -1 31 32 26 -1 32 30 22 -1 20 21 39 -1 39 40 20 -1 21 29 39 -1 37 33 36 -1 41 42 36 -1 33 34 41 -1 36 38 37 -1 42 35 36 -1 38 36 30 -1 37 38 32 -1 39 29 35 -1 42 41 40 -1 39 35 42 -1 34 28 40 -1 40 39 42 -1 34 33 27 -1 27 33 37 -1 41 44 43 -1 40 45 46 -1 39 46 47 -1 43 47 45 -1 42 44 47 -1 "
|
||||||
|
>
|
||||||
|
<Coordinate DEF="coords_ME_Plane"
|
||||||
|
point="-1.000000 -1.000000 0.000000 1.000000 -1.000000 0.000000 -1.000000 1.000000 0.000000 1.000000 1.000000 0.000000 0.000000 -2.500000 0.000000 0.000000 2.500000 0.000000 -1.000000 1.000000 0.292811 -1.000000 -1.000000 0.292811 0.000000 -2.800000 0.500000 1.000000 -1.000000 0.292811 1.000000 1.000000 0.292811 0.000000 2.800000 0.500000 1.000000 0.000000 0.292811 -1.000000 0.000000 0.292811 0.000000 0.000000 0.292811 -0.500000 0.000000 0.292811 0.500000 0.000000 0.292811 0.500000 0.500000 0.292810 -0.500000 0.500000 0.292810 0.200000 0.000000 0.552854 0.200000 0.200000 0.552853 -0.200000 0.200000 0.552853 -0.200000 0.000000 0.552854 0.500000 -0.500000 0.292811 -0.500000 -0.500000 0.292811 0.200000 -0.200000 0.552854 -0.200000 -0.200000 0.552854 0.200000 0.000002 1.120592 0.200000 0.200002 1.120590 -0.200000 0.200002 1.120590 -0.200000 0.000002 1.120592 0.200000 -0.199998 1.120592 -0.200000 -0.199998 1.120592 0.200000 0.000006 2.241243 0.200000 0.200006 2.241241 -0.200000 0.200006 2.241241 -0.200000 0.000006 2.241243 0.200000 -0.199994 2.241243 -0.200000 -0.199994 2.241243 -0.050000 0.200002 1.120590 0.050000 0.200002 1.120590 0.050000 0.200006 2.241241 -0.050000 0.200006 2.241241 0.050000 0.200002 1.120590 0.050000 0.200006 2.241241 0.050000 1.611272 1.120585 -0.050000 1.611272 1.120585 0.050000 1.611272 1.120585 "
|
||||||
|
/>
|
||||||
|
</IndexedFaceSet>
|
||||||
|
</Shape>
|
||||||
|
</Group>
|
||||||
|
</Transform>
|
||||||
|
</Transform>
|
||||||
|
<Transform DEF="Lamp_TRANSFORM"
|
||||||
|
translation="-4.076245 5.903862 1.005454"
|
||||||
|
scale="1.000000 1.000000 1.000000"
|
||||||
|
rotation="-0.498084 -0.762016 -0.413815 1.513875"
|
||||||
|
>
|
||||||
|
<PointLight DEF="LA_Lamp"
|
||||||
|
ambientIntensity="0.0000"
|
||||||
|
color="1.0000 1.0000 1.0000"
|
||||||
|
intensity="0.5714"
|
||||||
|
radius="30.0000"
|
||||||
|
location="-0.0000 -0.0000 0.0000"
|
||||||
|
/>
|
||||||
|
</Transform>
|
||||||
|
<Transform DEF="Camera_TRANSFORM"
|
||||||
|
translation="-7.481132 5.343665 -6.507640"
|
||||||
|
scale="1.000000 1.000000 1.000000"
|
||||||
|
rotation="-0.098233 -0.968789 -0.227591 2.349487"
|
||||||
|
>
|
||||||
|
<Viewpoint DEF="CA_Camera"
|
||||||
|
centerOfRotation="0 0 0"
|
||||||
|
position="-0.00 -0.00 0.00"
|
||||||
|
orientation="-0.00 -0.47 -0.88 0.00"
|
||||||
|
fieldOfView="0.858"
|
||||||
|
/>
|
||||||
|
</Transform>
|
||||||
|
</Scene>
|
||||||
|
</X3D>
|
||||||
Binary file not shown.
@@ -26,30 +26,20 @@
|
|||||||
|
|
||||||
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="998.0" prefWidth="1530.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng302.visualiser.controllers.RaceViewController">
|
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="998.0" prefWidth="1530.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng302.visualiser.controllers.RaceViewController">
|
||||||
<children>
|
<children>
|
||||||
<AnchorPane layoutX="322.0" layoutY="130.0" prefHeight="998.0" prefWidth="1281.0"
|
<AnchorPane layoutX="322.0" layoutY="130.0" prefHeight="998.0" prefWidth="1281.0" style="-fx-background-color: skyblue;" AnchorPane.bottomAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||||
style="-fx-background-color: skyblue;" AnchorPane.bottomAnchor="0.0"
|
|
||||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
|
||||||
<children>
|
<children>
|
||||||
<GridPane prefHeight="998.0" prefWidth="1281.0" AnchorPane.bottomAnchor="0.0"
|
<GridPane prefHeight="998.0" prefWidth="1281.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||||
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
|
|
||||||
AnchorPane.topAnchor="0.0">
|
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="630.0" minWidth="10.0"
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="630.0" minWidth="10.0" prefWidth="68.0" />
|
||||||
prefWidth="68.0"/>
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="1213.0" minWidth="10.0" prefWidth="1213.0" />
|
||||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="1213.0" minWidth="10.0"
|
|
||||||
prefWidth="1213.0"/>
|
|
||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
<rowConstraints>
|
<rowConstraints>
|
||||||
<RowConstraints maxHeight="489.0" minHeight="1.0" prefHeight="24.0"
|
<RowConstraints maxHeight="489.0" minHeight="1.0" prefHeight="24.0" vgrow="SOMETIMES" />
|
||||||
vgrow="SOMETIMES"/>
|
<RowConstraints maxHeight="997.0" minHeight="10.0" prefHeight="974.0" vgrow="SOMETIMES" />
|
||||||
<RowConstraints maxHeight="997.0" minHeight="10.0" prefHeight="974.0"
|
|
||||||
vgrow="SOMETIMES"/>
|
|
||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
<children>
|
<children>
|
||||||
<AnchorPane fx:id="contentAnchorPane" prefHeight="200.0" prefWidth="200.0"
|
<AnchorPane fx:id="contentAnchorPane" prefHeight="200.0" prefWidth="200.0" GridPane.columnSpan="2" GridPane.rowSpan="2" />
|
||||||
GridPane.columnSpan="2" GridPane.rowSpan="2"/>
|
<Text fx:id="fpsDisplay" strokeType="OUTSIDE" strokeWidth="0.0" text="60 FPS" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
|
||||||
<Text fx:id="fpsDisplay" strokeType="OUTSIDE" strokeWidth="0.0" text="60 FPS"
|
|
||||||
GridPane.halignment="CENTER" GridPane.valignment="CENTER"/>
|
|
||||||
</children>
|
</children>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
</children>
|
</children>
|
||||||
@@ -61,11 +51,6 @@
|
|||||||
<Label layoutX="11.0" layoutY="41.0" text="Timer" textFill="WHITE" />
|
<Label layoutX="11.0" layoutY="41.0" text="Timer" textFill="WHITE" />
|
||||||
<Label layoutX="11.0" layoutY="112.0" text="Wind direction" textFill="WHITE" />
|
<Label layoutX="11.0" layoutY="112.0" text="Wind direction" textFill="WHITE" />
|
||||||
<Circle fx:id="windBackgroundCircle" blendMode="DARKEN" fill="#3dcdc8" layoutX="110.0" layoutY="190.0" radius="35.0" stroke="#d7d7d7" strokeType="INSIDE" strokeWidth="3.0" />
|
<Circle fx:id="windBackgroundCircle" blendMode="DARKEN" fill="#3dcdc8" layoutX="110.0" layoutY="190.0" radius="35.0" stroke="#d7d7d7" strokeType="INSIDE" strokeWidth="3.0" />
|
||||||
<Text fx:id="windArrowText" fill="#a8a8a8" layoutX="86.0" layoutY="210.0" strokeType="OUTSIDE" strokeWidth="0.0" text="↓">
|
|
||||||
<font>
|
|
||||||
<Font name="AdobeArabic-Regular" size="55.0" />
|
|
||||||
</font>
|
|
||||||
</Text>
|
|
||||||
<Text fx:id="windDirectionText" fill="#d3d3d3" layoutX="171.0" layoutY="238.0" strokeType="OUTSIDE" strokeWidth="0.0" text="0.0°" textAlignment="RIGHT">
|
<Text fx:id="windDirectionText" fill="#d3d3d3" layoutX="171.0" layoutY="238.0" strokeType="OUTSIDE" strokeWidth="0.0" text="0.0°" textAlignment="RIGHT">
|
||||||
<font>
|
<font>
|
||||||
<Font name="System Bold" size="13.0" />
|
<Font name="System Bold" size="13.0" />
|
||||||
@@ -100,6 +85,7 @@
|
|||||||
<NumberAxis fx:id="sparklineYAxis" minorTickCount="1" minorTickLength="1.0" side="LEFT" styleClass="spark-line-yaxis" tickLabelGap="1.0" tickUnit="1.0" upperBound="7.0" />
|
<NumberAxis fx:id="sparklineYAxis" minorTickCount="1" minorTickLength="1.0" side="LEFT" styleClass="spark-line-yaxis" tickLabelGap="1.0" tickUnit="1.0" upperBound="7.0" />
|
||||||
</yAxis>
|
</yAxis>
|
||||||
</LineChart>
|
</LineChart>
|
||||||
|
<AnchorPane fx:id="windArrowHolder" layoutX="110.0" layoutY="175.0" prefHeight="15.0" prefWidth="20.0" />
|
||||||
</children>
|
</children>
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
</children>
|
</children>
|
||||||
|
|||||||
Reference in New Issue
Block a user