mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
Merge remote-tracking branch 'origin/story1266_3d_model_factory' into story1266_3d_model_factory
# Conflicts: # src/main/java/seng302/visualiser/fxObjects/assets_3D/ModelFactory.java # src/main/java/seng302/visualiser/fxObjects/assets_3D/ModelType.java
This commit is contained in:
@@ -47,7 +47,7 @@ public class ClientYacht extends Observable {
|
|||||||
private Integer position;
|
private Integer position;
|
||||||
|
|
||||||
private Long estimateTimeAtFinish;
|
private Long estimateTimeAtFinish;
|
||||||
private Boolean sailIn = true;
|
private Boolean sailIn = false;
|
||||||
private Integer currentMarkSeqID = 0;
|
private Integer currentMarkSeqID = 0;
|
||||||
private Long markRoundTime;
|
private Long markRoundTime;
|
||||||
private Long timeTillNext;
|
private Long timeTillNext;
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import seng302.model.GeoPoint;
|
|||||||
public class GeoUtility {
|
public class GeoUtility {
|
||||||
|
|
||||||
private static double EARTH_RADIUS = 6378.137;
|
private static double EARTH_RADIUS = 6378.137;
|
||||||
|
// private static double EARTH_RADIUS = 6378.13712121212121212121212121212121212121;
|
||||||
private static Double MS_TO_KNOTS = 1.943844492;
|
private static Double MS_TO_KNOTS = 1.943844492;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -5,14 +5,25 @@ import java.util.Comparator;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Timer;
|
||||||
|
import java.util.TimerTask;
|
||||||
import javafx.animation.AnimationTimer;
|
import javafx.animation.AnimationTimer;
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
import javafx.geometry.Point2D;
|
import javafx.geometry.Point2D;
|
||||||
import javafx.geometry.Point3D;
|
import javafx.geometry.Point3D;
|
||||||
import javafx.scene.*;
|
import javafx.scene.AmbientLight;
|
||||||
|
import javafx.scene.Group;
|
||||||
|
import javafx.scene.Node;
|
||||||
|
import javafx.scene.PerspectiveCamera;
|
||||||
|
import javafx.scene.PointLight;
|
||||||
|
import javafx.scene.SceneAntialiasing;
|
||||||
|
import javafx.scene.SubScene;
|
||||||
|
import javafx.scene.effect.BlendMode;
|
||||||
import javafx.scene.image.ImageView;
|
import javafx.scene.image.ImageView;
|
||||||
import javafx.scene.input.KeyEvent;
|
import javafx.scene.input.KeyEvent;
|
||||||
import javafx.scene.paint.Color;
|
import javafx.scene.paint.Color;
|
||||||
|
import javafx.scene.paint.PhongMaterial;
|
||||||
|
import javafx.scene.shape.Sphere;
|
||||||
import javafx.scene.text.Text;
|
import javafx.scene.text.Text;
|
||||||
import javafx.scene.transform.Rotate;
|
import javafx.scene.transform.Rotate;
|
||||||
import javafx.scene.transform.Scale;
|
import javafx.scene.transform.Scale;
|
||||||
@@ -26,7 +37,8 @@ import seng302.model.mark.Corner;
|
|||||||
import seng302.model.mark.Mark;
|
import seng302.model.mark.Mark;
|
||||||
import seng302.model.token.Token;
|
import seng302.model.token.Token;
|
||||||
import seng302.utilities.GeoUtility;
|
import seng302.utilities.GeoUtility;
|
||||||
import seng302.visualiser.fxObjects.assets_2D.*;
|
import seng302.visualiser.fxObjects.assets_2D.AnnotationBox;
|
||||||
|
import seng302.visualiser.fxObjects.assets_2D.BoatObject;
|
||||||
import seng302.visualiser.fxObjects.assets_3D.ModelFactory;
|
import seng302.visualiser.fxObjects.assets_3D.ModelFactory;
|
||||||
import seng302.visualiser.fxObjects.assets_3D.ModelType;
|
import seng302.visualiser.fxObjects.assets_3D.ModelType;
|
||||||
|
|
||||||
@@ -75,11 +87,12 @@ public class GameView3D {
|
|||||||
private Group annotationsGroup = new Group();
|
private Group annotationsGroup = new Group();
|
||||||
private Group wakesGroup = new Group();
|
private Group wakesGroup = new Group();
|
||||||
private Group boatObjectGroup = new Group();
|
private Group boatObjectGroup = new Group();
|
||||||
private Group trails = new Group();
|
|
||||||
private Group markers = new Group();
|
private Group markers = new Group();
|
||||||
private Group tokens = new Group();
|
private Group tokens = new Group();
|
||||||
private List<CompoundMark> course = new ArrayList<>();
|
private List<CompoundMark> course = new ArrayList<>();
|
||||||
private List<Node> mapTokens;
|
private List<Node> mapTokens;
|
||||||
|
private Timer trailMaker = new Timer();
|
||||||
|
private Group trail = new Group();
|
||||||
|
|
||||||
private ImageView mapImage = new ImageView();
|
private ImageView mapImage = new ImageView();
|
||||||
|
|
||||||
@@ -117,20 +130,66 @@ public class GameView3D {
|
|||||||
camera.setNearClip(0.1);
|
camera.setNearClip(0.1);
|
||||||
camera.setFieldOfView(FOV);
|
camera.setFieldOfView(FOV);
|
||||||
gameObjects = new Group();
|
gameObjects = new Group();
|
||||||
|
PointLight pl = new PointLight(Color.DARKGRAY);
|
||||||
|
pl.setLightOn(true);
|
||||||
|
pl.setBlendMode(BlendMode.ADD);
|
||||||
|
pl.setOpacity(0.5);
|
||||||
|
pl.getTransforms().add(new Translate(0,0,-500));
|
||||||
|
AmbientLight al = new AmbientLight();
|
||||||
|
al.setLightOn(true);
|
||||||
|
al.setBlendMode(BlendMode.SOFT_LIGHT);
|
||||||
|
al.getTransforms().add(new Translate(0, 0, -100));
|
||||||
root3D = new Group(camera, gameObjects);
|
root3D = new Group(camera, gameObjects);
|
||||||
view = new SubScene(
|
view = new SubScene(
|
||||||
root3D, 1000, 1000, true, SceneAntialiasing.BALANCED
|
root3D, 1000, 1000, true, SceneAntialiasing.BALANCED
|
||||||
);
|
);
|
||||||
view.setCamera(camera);
|
view.setCamera(camera);
|
||||||
view.setFill(Color.SKYBLUE);
|
// view.setFill(Color.LIGHTBLUE);
|
||||||
camera.getTransforms().add(new Rotate(30, new Point3D(1,0,0)));
|
camera.getTransforms().add(new Rotate(30, new Point3D(1,0,0)));
|
||||||
// gameObjects.getChildren().addAll(raceBorder, markers, tokens);
|
// gameObjects.getChildren().addAll(raceBorder, markers, tokens);
|
||||||
|
System.out.println(camera.getLayoutX());
|
||||||
|
System.out.println(camera.getTranslateX());
|
||||||
|
System.out.println(camera.getLayoutY());
|
||||||
|
System.out.println(camera.getTranslateY());
|
||||||
|
System.out.println(camera.getTranslateZ());
|
||||||
|
camera.setTranslateZ(-80);
|
||||||
|
camera.setTranslateY(150);
|
||||||
|
Sphere red = new Sphere(1);
|
||||||
|
red.setMaterial(new PhongMaterial(Color.RED));
|
||||||
|
red.setLayoutX(0);
|
||||||
|
red.setLayoutY(0);
|
||||||
|
|
||||||
|
Sphere blue = new Sphere(1);
|
||||||
|
blue.setMaterial(new PhongMaterial(Color.BLUE));
|
||||||
|
blue.setLayoutX(1);
|
||||||
|
blue.setLayoutY(0);
|
||||||
|
|
||||||
|
Sphere green = new Sphere(1);
|
||||||
|
green.setMaterial(new PhongMaterial(Color.GREEN));
|
||||||
|
green.setLayoutX(-.5);
|
||||||
|
green.setLayoutY(0);
|
||||||
|
|
||||||
|
Sphere white = new Sphere(1);
|
||||||
|
white.setMaterial(new PhongMaterial(Color.WHITE));
|
||||||
|
white.setLayoutX(-.25);
|
||||||
|
white.setLayoutY(0);
|
||||||
|
|
||||||
|
Sphere black = new Sphere(1);
|
||||||
|
black.setMaterial(new PhongMaterial(Color.BLACK));
|
||||||
|
black.setLayoutX(-.125);
|
||||||
|
black.setLayoutY(0);
|
||||||
|
|
||||||
gameObjects.getChildren().addAll(
|
gameObjects.getChildren().addAll(
|
||||||
ModelFactory.importModel(ModelType.OCEAN).getAssets(),
|
// ModelFactory.importModel(ModelType.OCEAN).getAssets(),
|
||||||
raceBorder, markers, tokens
|
raceBorder, trail, markers, tokens,
|
||||||
|
white, blue, green, black, red
|
||||||
);
|
);
|
||||||
|
|
||||||
|
System.out.println(camera.getLayoutX());
|
||||||
|
System.out.println(camera.getTranslateX());
|
||||||
|
System.out.println(camera.getLayoutY());
|
||||||
|
System.out.println(camera.getTranslateY());
|
||||||
|
System.out.println(camera.getTranslateZ());
|
||||||
// Sphere s = new Sphere(1);
|
// Sphere s = new Sphere(1);
|
||||||
// s.setMaterial(new PhongMaterial(Color.RED));
|
// s.setMaterial(new PhongMaterial(Color.RED));
|
||||||
// Sphere left = new Sphere(1);
|
// Sphere left = new Sphere(1);
|
||||||
@@ -281,9 +340,9 @@ public class GameView3D {
|
|||||||
Math.toDegrees(
|
Math.toDegrees(
|
||||||
Math.atan2(m2Location.getY() - m1Location.getY(), m2Location.getX() - m1Location.getX())
|
Math.atan2(m2Location.getY() - m1Location.getY(), m2Location.getX() - m1Location.getX())
|
||||||
) + 90,
|
) + 90,
|
||||||
new Point3D(0,1,0)
|
new Point3D(0,0,1)
|
||||||
),
|
),
|
||||||
new Scale(1, 1, m1Location.distance(m2Location) / 10)
|
new Scale(1, m1Location.distance(m2Location) / 10, 1)
|
||||||
);
|
);
|
||||||
|
|
||||||
Point2D midPoint = m2Location.midpoint(m1Location);
|
Point2D midPoint = m2Location.midpoint(m1Location);
|
||||||
@@ -411,28 +470,20 @@ public class GameView3D {
|
|||||||
minLatPoint, new GeoPoint(unscaledLat, unscaledLon)
|
minLatPoint, new GeoPoint(unscaledLat, unscaledLon)
|
||||||
);
|
);
|
||||||
if (angleFromReference >= 0 && angleFromReference <= Math.PI / 2) {
|
if (angleFromReference >= 0 && angleFromReference <= Math.PI / 2) {
|
||||||
xAxisLocation += Math
|
xAxisLocation += distanceScaleFactor * Math.sin(angleFromReference) * distanceFromReference;
|
||||||
.round(distanceScaleFactor * Math.sin(angleFromReference) * distanceFromReference);
|
yAxisLocation -= distanceScaleFactor * Math.cos(angleFromReference) * distanceFromReference;
|
||||||
yAxisLocation -= Math
|
|
||||||
.round(distanceScaleFactor * Math.cos(angleFromReference) * distanceFromReference);
|
|
||||||
} else if (angleFromReference >= 0) {
|
} else if (angleFromReference >= 0) {
|
||||||
angleFromReference = angleFromReference - Math.PI / 2;
|
angleFromReference = angleFromReference - Math.PI / 2;
|
||||||
xAxisLocation += Math
|
xAxisLocation += distanceScaleFactor * Math.cos(angleFromReference) * distanceFromReference;
|
||||||
.round(distanceScaleFactor * Math.cos(angleFromReference) * distanceFromReference);
|
yAxisLocation += distanceScaleFactor * Math.sin(angleFromReference) * distanceFromReference;
|
||||||
yAxisLocation += Math
|
|
||||||
.round(distanceScaleFactor * Math.sin(angleFromReference) * distanceFromReference);
|
|
||||||
} else if (angleFromReference < 0 && angleFromReference >= -Math.PI / 2) {
|
} else if (angleFromReference < 0 && angleFromReference >= -Math.PI / 2) {
|
||||||
angleFromReference = Math.abs(angleFromReference);
|
angleFromReference = Math.abs(angleFromReference);
|
||||||
xAxisLocation -= Math
|
xAxisLocation -= distanceScaleFactor * Math.sin(angleFromReference) * distanceFromReference;
|
||||||
.round(distanceScaleFactor * Math.sin(angleFromReference) * distanceFromReference);
|
yAxisLocation -= distanceScaleFactor * Math.cos(angleFromReference) * distanceFromReference;
|
||||||
yAxisLocation -= Math
|
|
||||||
.round(distanceScaleFactor * Math.cos(angleFromReference) * distanceFromReference);
|
|
||||||
} else {
|
} else {
|
||||||
angleFromReference = Math.abs(angleFromReference) - Math.PI / 2;
|
angleFromReference = Math.abs(angleFromReference) - Math.PI / 2;
|
||||||
xAxisLocation -= Math
|
xAxisLocation -= distanceScaleFactor * Math.cos(angleFromReference) * distanceFromReference;
|
||||||
.round(distanceScaleFactor * Math.cos(angleFromReference) * distanceFromReference);
|
yAxisLocation += distanceScaleFactor * Math.sin(angleFromReference) * distanceFromReference;
|
||||||
yAxisLocation += Math
|
|
||||||
.round(distanceScaleFactor * Math.sin(angleFromReference) * distanceFromReference);
|
|
||||||
}
|
}
|
||||||
if (horizontalInversion) {
|
if (horizontalInversion) {
|
||||||
xAxisLocation = canvasWidth - bufferSize - (xAxisLocation - bufferSize);
|
xAxisLocation = canvasWidth - bufferSize - (xAxisLocation - bufferSize);
|
||||||
@@ -502,8 +553,8 @@ public class GameView3D {
|
|||||||
newBoat.setFill(colour);
|
newBoat.setFill(colour);
|
||||||
boatObjects.put(clientYacht, newBoat);
|
boatObjects.put(clientYacht, newBoat);
|
||||||
// createAndBindAnnotationBox(clientYacht, colour);
|
// createAndBindAnnotationBox(clientYacht, colour);
|
||||||
// wakesGroup.getChildren().add(newBoat.getWake());
|
wakesGroup.getChildren().add(newBoat.getWake());
|
||||||
// wakes.add(newBoat.getWake());
|
wakes.add(newBoat.getWake());
|
||||||
boatObjectGroup.getChildren().add(newBoat);
|
boatObjectGroup.getChildren().add(newBoat);
|
||||||
// trails.getChildren().add(newBoat.getTrail());
|
// trails.getChildren().add(newBoat.getTrail());
|
||||||
|
|
||||||
@@ -521,9 +572,10 @@ public class GameView3D {
|
|||||||
}
|
}
|
||||||
// annotationsGroup.getChildren().addAll(annotations.values());
|
// annotationsGroup.getChildren().addAll(annotations.values());
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
gameObjects.getChildren().addAll(boatObjectGroup);
|
|
||||||
// gameObjects.addAll(trails);
|
// gameObjects.addAll(trails);
|
||||||
// gameObjects.addAll(wakes);
|
gameObjects.getChildren().addAll(wakes);
|
||||||
|
gameObjects.getChildren().addAll(boatObjectGroup);
|
||||||
// gameObjects.addAll(annotationsGroup);
|
// gameObjects.addAll(annotationsGroup);
|
||||||
// gameObjects.addAll(boatObjectGroup);
|
// gameObjects.addAll(boatObjectGroup);
|
||||||
});
|
});
|
||||||
@@ -564,7 +616,7 @@ public class GameView3D {
|
|||||||
Math.toDegrees(
|
Math.toDegrees(
|
||||||
Math.atan2(location.getY() - lastLocation.getY(), location.getX() - lastLocation.getX())
|
Math.atan2(location.getY() - lastLocation.getY(), location.getX() - lastLocation.getX())
|
||||||
),
|
),
|
||||||
new Point3D(0,1,0)
|
new Point3D(0,0,1)
|
||||||
),
|
),
|
||||||
new Scale((lastLocation.distance(location) / 15)-0.2, 1, 1)
|
new Scale((lastLocation.distance(location) / 15)-0.2, 1, 1)
|
||||||
);
|
);
|
||||||
@@ -586,7 +638,7 @@ public class GameView3D {
|
|||||||
Math.toDegrees(
|
Math.toDegrees(
|
||||||
Math.atan2(lastLocation.getY() - firstLocation.getY(), lastLocation.getX() - firstLocation.getX())
|
Math.atan2(lastLocation.getY() - firstLocation.getY(), lastLocation.getX() - firstLocation.getX())
|
||||||
),
|
),
|
||||||
new Point3D(0,1,0)
|
new Point3D(0,0,1)
|
||||||
),
|
),
|
||||||
new Scale((firstLocation.distance(lastLocation) / 15)-0.2, 1, 1)
|
new Scale((firstLocation.distance(lastLocation) / 15)-0.2, 1, 1)
|
||||||
);
|
);
|
||||||
@@ -618,4 +670,50 @@ public class GameView3D {
|
|||||||
tokens.getChildren().setAll(mapTokens);
|
tokens.getChildren().setAll(mapTokens);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setBoatAsPlayer (ClientYacht playerYacht) {
|
||||||
|
this.playerYacht = playerYacht;
|
||||||
|
|
||||||
|
trailMaker.scheduleAtFixedRate(new TimerTask() {
|
||||||
|
|
||||||
|
private Point2D lastLocation = findScaledXY(playerYacht.getLocation());
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
Node segment = ModelFactory.importModel(ModelType.TRAIL_SEGMENT).getAssets();
|
||||||
|
Point2D location = findScaledXY(playerYacht.getLocation());
|
||||||
|
segment.getTransforms().addAll(
|
||||||
|
new Translate(location.getX(), location.getY()),
|
||||||
|
new Rotate(playerYacht.getHeading(), new Point3D(0,0,1)),
|
||||||
|
new Scale(1, lastLocation.distance(location) / 5)
|
||||||
|
);
|
||||||
|
Platform.runLater(() -> {
|
||||||
|
trail.getChildren().add(segment);
|
||||||
|
if (trail.getChildren().size() > 100) {
|
||||||
|
trail.getChildren().remove(0);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
lastLocation = location;
|
||||||
|
}
|
||||||
|
}, 0L, 500L);
|
||||||
|
|
||||||
|
// playerYacht.toggleSail();
|
||||||
|
// boatObjects.get(playerYacht).setAsPlayer();
|
||||||
|
// CompoundMark currentMark = course.get(playerYacht.getLegNumber());
|
||||||
|
// for (Mark mark : currentMark.getMarks()) {
|
||||||
|
// markerObjects.get(mark).showNextExitArrow();
|
||||||
|
// }
|
||||||
|
// annotations.get(playerYacht).addAnnotation(
|
||||||
|
// "velocity",
|
||||||
|
// playerYacht.getVelocityProperty(),
|
||||||
|
// (velocity) -> String.format("Speed: %.2f ms", velocity.doubleValue())
|
||||||
|
// );
|
||||||
|
// Platform.runLater(() -> {
|
||||||
|
// boatObjectGroup.getChildren().remove(boatObjects.get(playerYacht));
|
||||||
|
// gameObjects.add(boatObjects.get(playerYacht));
|
||||||
|
// annotationsGroup.getChildren().remove(annotations.get(playerYacht));
|
||||||
|
// gameObjects.add(annotations.get(playerYacht));
|
||||||
|
// });
|
||||||
|
// playerYacht.addMarkRoundingListener(this::updateMarkArrows);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,21 +150,21 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
|
|||||||
new ArrayList<>(raceData.getCompoundMarks().values()), raceData.getMarkSequence()
|
new ArrayList<>(raceData.getCompoundMarks().values()), raceData.getMarkSequence()
|
||||||
);
|
);
|
||||||
// gameView.enableZoom();
|
// gameView.enableZoom();
|
||||||
// gameView.setBoatAsPlayer(player);
|
gameView.setBoatAsPlayer(player);
|
||||||
// gameView.startRace();
|
// gameView.startRace();
|
||||||
|
|
||||||
// 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());
|
||||||
// Platform.runLater(() -> updateWindDirection(newDirection.doubleValue()));
|
Platform.runLater(() -> updateWindDirection(newDirection.doubleValue()));
|
||||||
// });
|
});
|
||||||
// raceState.windSpeedProperty().addListener((obs, oldSpeed, newSpeed) ->
|
// raceState.windSpeedProperty().addListener((obs, oldSpeed, newSpeed) ->
|
||||||
// Platform.runLater(() -> updateWindSpeed(newSpeed.doubleValue()))
|
// Platform.runLater(() -> updateWindSpeed(newSpeed.doubleValue()))
|
||||||
// );
|
// );
|
||||||
// Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
// updateWindDirection(raceState.windDirectionProperty().doubleValue());
|
updateWindDirection(raceState.windDirectionProperty().doubleValue());
|
||||||
// updateWindSpeed(raceState.getWindSpeed());
|
updateWindSpeed(raceState.getWindSpeed());
|
||||||
// });
|
});
|
||||||
// gameView.setWindDir(raceState.windDirectionProperty().doubleValue());
|
// gameView.setWindDir(raceState.windDirectionProperty().doubleValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
import javafx.geometry.Point2D;
|
import javafx.geometry.Point2D;
|
||||||
|
import javafx.geometry.Point3D;
|
||||||
import javafx.scene.AmbientLight;
|
import javafx.scene.AmbientLight;
|
||||||
import javafx.scene.Group;
|
import javafx.scene.Group;
|
||||||
import javafx.scene.Node;
|
import javafx.scene.Node;
|
||||||
@@ -20,6 +21,7 @@ import javafx.scene.transform.Translate;
|
|||||||
import seng302.visualiser.fxObjects.assets_3D.BoatMeshType;
|
import seng302.visualiser.fxObjects.assets_3D.BoatMeshType;
|
||||||
import seng302.visualiser.fxObjects.assets_3D.BoatModel;
|
import seng302.visualiser.fxObjects.assets_3D.BoatModel;
|
||||||
import seng302.visualiser.fxObjects.assets_3D.ModelFactory;
|
import seng302.visualiser.fxObjects.assets_3D.ModelFactory;
|
||||||
|
import seng302.visualiser.fxObjects.assets_3D.ModelType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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
|
||||||
@@ -58,10 +60,9 @@ public class BoatObject extends Group {
|
|||||||
private double sailState;
|
private double sailState;
|
||||||
//Graphical objects
|
//Graphical objects
|
||||||
private Polyline trail = new Polyline();
|
private Polyline trail = new Polyline();
|
||||||
// private Polygon boatPoly;
|
private BoatModel boatAssets;
|
||||||
private BoatModel boatPoly;
|
|
||||||
private Polygon sail;
|
private Polygon sail;
|
||||||
private Wake wake;
|
private Group wake;
|
||||||
private Line leftLayLine;
|
private Line leftLayLine;
|
||||||
private Line rightLayline;
|
private Line rightLayline;
|
||||||
private double distanceTravelled, lastRotation;
|
private double distanceTravelled, lastRotation;
|
||||||
@@ -100,31 +101,32 @@ public class BoatObject extends Group {
|
|||||||
* polygon.
|
* polygon.
|
||||||
*/
|
*/
|
||||||
private void initChildren(double... points) {
|
private void initChildren(double... points) {
|
||||||
boatPoly = makeBoatPolygon();
|
boatAssets = ModelFactory.boatGameView(BoatMeshType.DINGHY, colour);
|
||||||
boatPoly.getAssets().getTransforms().addAll(
|
boatAssets.hideSail();
|
||||||
|
boatAssets.getAssets().getTransforms().addAll(
|
||||||
// new Rotate(-40, new Point3D(1,0,0)),
|
// new Rotate(-40, new Point3D(1,0,0)),
|
||||||
rotation
|
rotation
|
||||||
// new Rotate(-90, new Point3D(0,0,1))
|
// new Rotate(-90, new Point3D(0,0,1))
|
||||||
);
|
);
|
||||||
boatPoly.getAssets().getTransforms().add(new Scale(5, 5, 5));
|
boatAssets.getAssets().getTransforms().add(new Scale(5, 5, 5));
|
||||||
// boatPoly.setDrawMode(DrawMode.FILL);
|
// boatAssets.setDrawMode(DrawMode.FILL);
|
||||||
// boatPoly.setFill(colour);
|
// boatAssets.setFill(colour);
|
||||||
// boatPoly.setFill(this.colour);
|
// boatAssets.setFill(this.colour);
|
||||||
// boatPoly.setMaterial(new PhongMaterial(this.colour));
|
// boatAssets.setMaterial(new PhongMaterial(this.colour));
|
||||||
boatPoly.getAssets().setOnMouseEntered(event -> {
|
boatAssets.getAssets().setOnMouseEntered(event -> {
|
||||||
// boatPoly.setFill(Color.FLORALWHITE);
|
// boatAssets.setFill(Color.FLORALWHITE);
|
||||||
// boatPoly.setStroke(Color.RED);
|
// boatAssets.setStroke(Color.RED);
|
||||||
// boatPoly.setMaterial(new PhongMaterial(Color.FLORALWHITE));
|
// boatAssets.setMaterial(new PhongMaterial(Color.FLORALWHITE));
|
||||||
});
|
});
|
||||||
boatPoly.getAssets().setOnMouseExited(event -> {
|
boatAssets.getAssets().setOnMouseExited(event -> {
|
||||||
// boatPoly.setMaterial(new PhongMaterial(this.colour));
|
// boatAssets.setMaterial(new PhongMaterial(this.colour));
|
||||||
// boatPoly.setFill(colour);
|
// boatAssets.setFill(colour);
|
||||||
// boatPoly.setFill(this.colour);
|
// boatAssets.setFill(this.colour);
|
||||||
// boatPoly.setStroke(Color.BLACK);
|
// boatAssets.setStroke(Color.BLACK);
|
||||||
});
|
});
|
||||||
boatPoly.getAssets().setOnMouseClicked(event -> setIsSelected(!isSelected));
|
boatAssets.getAssets().setOnMouseClicked(event -> setIsSelected(!isSelected));
|
||||||
boatPoly.getAssets().setCache(true);
|
boatAssets.getAssets().setCache(true);
|
||||||
// boatPoly.setCacheHint(CacheHint.SPEED);
|
// boatAssets.setCacheHint(CacheHint.SPEED);
|
||||||
|
|
||||||
// annotationBox = new AnnotationBox();
|
// annotationBox = new AnnotationBox();
|
||||||
// annotationBox.setFill(colour);
|
// annotationBox.setFill(colour);
|
||||||
@@ -133,8 +135,8 @@ public class BoatObject extends Group {
|
|||||||
rightLayline = new Line();
|
rightLayline = new Line();
|
||||||
trail.getStrokeDashArray().setAll(5d, 10d);
|
trail.getStrokeDashArray().setAll(5d, 10d);
|
||||||
trail.setCache(true);
|
trail.setCache(true);
|
||||||
wake = new Wake(0, -BOAT_HEIGHT);
|
|
||||||
wake.setVisible(true);
|
wake = ModelFactory.importModel(ModelType.WAKE).getAssets();
|
||||||
|
|
||||||
sail = new Polygon(0.0,BOAT_HEIGHT / 4,
|
sail = new Polygon(0.0,BOAT_HEIGHT / 4,
|
||||||
0.0, BOAT_HEIGHT);
|
0.0, BOAT_HEIGHT);
|
||||||
@@ -162,46 +164,21 @@ public class BoatObject extends Group {
|
|||||||
// super.getChildren().add(pointLight);
|
// super.getChildren().add(pointLight);
|
||||||
AmbientLight light = new AmbientLight(new Color(0.5,0.5,0.5,1));
|
AmbientLight light = new AmbientLight(new Color(0.5,0.5,0.5,1));
|
||||||
super.getChildren().add(light);
|
super.getChildren().add(light);
|
||||||
super.getChildren().addAll(boatPoly.getAssets());//, sail);
|
super.getChildren().addAll(boatAssets.getAssets());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFill (Color value) {
|
public void setFill (Color value) {
|
||||||
this.colour = value;
|
this.colour = value;
|
||||||
PhongMaterial pm = new PhongMaterial(this.colour);
|
PhongMaterial pm = new PhongMaterial(this.colour);
|
||||||
|
pm.setSpecularPower(0.5);
|
||||||
|
pm.setSpecularColor(Color.BLACK);
|
||||||
for (int i=0;i<2;i++) {
|
for (int i=0;i<2;i++) {
|
||||||
Shape3D s = (Shape3D) boatPoly.getAssets().getChildren().get(i);
|
Shape3D s = (Shape3D) boatAssets.getAssets().getChildren().get(i);
|
||||||
s.setMaterial(pm);
|
s.setMaterial(pm);
|
||||||
}
|
}
|
||||||
trail.setStroke(colour);
|
trail.setStroke(colour);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BoatModel makeBoatPolygon () {
|
|
||||||
// StlMeshImporter importer = new StlMeshImporter();
|
|
||||||
// importer.read(getClass().getResource("/meshes/hollow_simple_boat.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();
|
|
||||||
// ColModelImporter importer = new ColModelImporter();
|
|
||||||
// importer.read(getClass().getResource("/meshes/hollow_simple_boat.dae"));
|
|
||||||
// MeshView mesh = importer.getImport()[0];
|
|
||||||
// FileInputStream inputStream = null;
|
|
||||||
// try{
|
|
||||||
// inputStream = new FileInputStream(getClass().getResource("/meshes/simple_yacht.stl").toString());
|
|
||||||
// Obj obj = ObjUtils.convertToRenderable(
|
|
||||||
// ObjReader.read(inputStream));
|
|
||||||
//
|
|
||||||
// IntBuffer indices = ObjData.getFaceVertexIndices(obj);
|
|
||||||
// FloatBuffer vertices = ObjData.getVertices(obj);
|
|
||||||
// FloatBuffer texCoords = ObjData.getTexCoords(obj);
|
|
||||||
// MeshView
|
|
||||||
// FloatBuffer normals = ObjData.getNormals(obj);
|
|
||||||
return ModelFactory.boatGameView(BoatMeshType.DINGHY, colour);
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// e.printStackTrace();
|
|
||||||
// return null;
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Moves the boat and its children annotations to coordinates specified
|
* Moves the boat and its children annotations to coordinates specified
|
||||||
@@ -212,12 +189,12 @@ public class BoatObject extends Group {
|
|||||||
* @param sailIn Boolean to toggle sail state.
|
* @param sailIn Boolean to toggle sail state.
|
||||||
*/
|
*/
|
||||||
public void moveTo(double x, double y, double rotation, double velocity, Boolean sailIn, double windDir) {
|
public void moveTo(double x, double y, double rotation, double velocity, Boolean sailIn, double windDir) {
|
||||||
Double dx = Math.abs(boatPoly.getAssets().getLayoutX() - x);
|
Double dx = Math.abs(boatAssets.getAssets().getLayoutX() - x);
|
||||||
Double dy = Math.abs(boatPoly.getAssets().getLayoutY() - y);
|
Double dy = Math.abs(boatAssets.getAssets().getLayoutY() - y);
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
rotateTo(rotation, sailIn, windDir);
|
rotateTo(rotation, sailIn, windDir);
|
||||||
boatPoly.getAssets().setLayoutX(x);
|
boatAssets.getAssets().setLayoutX(x);
|
||||||
boatPoly.getAssets().setLayoutY(y);
|
boatAssets.getAssets().setLayoutY(y);
|
||||||
// if (sailIn) {
|
// if (sailIn) {
|
||||||
//// sail.getPoints().clear();
|
//// sail.getPoints().clear();
|
||||||
//// sail.getPoints().addAll(0.0, 0.0, 4.0, 1.5, 8.0, 3.0, 12.0, 3.5, 16.0, 3.0, 20.0, 1.5, 24.0, 0.0);
|
//// sail.getPoints().addAll(0.0, 0.0, 4.0, 1.5, 8.0, 3.0, 12.0, 3.5, 16.0, 3.0, 20.0, 1.5, 24.0, 0.0);
|
||||||
@@ -229,13 +206,13 @@ public class BoatObject extends Group {
|
|||||||
// sail.setLayoutX(x);
|
// sail.setLayoutX(x);
|
||||||
// sail.setLayoutY(y);
|
// sail.setLayoutY(y);
|
||||||
// }
|
// }
|
||||||
// wake.setLayoutX(x);
|
wake.setLayoutX(x);
|
||||||
// wake.setLayoutY(y);
|
wake.setLayoutY(y);
|
||||||
});
|
});
|
||||||
// wake.setRotation(rotation, velocity);
|
// wake.setRotation(rotation, velocity);
|
||||||
// rotateTo(rotation);
|
// rotateTo(rotation);
|
||||||
// boatPoly.setLayoutX(x);
|
// boatAssets.setLayoutX(x);
|
||||||
// boatPoly.setLayoutY(y);
|
// boatAssets.setLayoutY(y);
|
||||||
// wake.setLayoutX(x);
|
// wake.setLayoutX(x);
|
||||||
// wake.setLayoutY(y);
|
// wake.setLayoutY(y);
|
||||||
// wake.rotate(rotation);
|
// wake.rotate(rotation);
|
||||||
@@ -262,31 +239,33 @@ public class BoatObject extends Group {
|
|||||||
|
|
||||||
private void rotateTo(double heading, boolean sailsIn, double windDir) {
|
private void rotateTo(double heading, boolean sailsIn, double windDir) {
|
||||||
rotation.setAngle(heading);
|
rotation.setAngle(heading);
|
||||||
if (!sailsIn) {
|
wake.getTransforms().setAll(new Rotate(heading, new Point3D(0,0,1)));
|
||||||
boatPoly.showSail();
|
if (sailsIn) {
|
||||||
|
boatAssets.showSail();
|
||||||
|
System.out.println("heading = " + heading);
|
||||||
Double sailWindOffset = 30.0;
|
Double sailWindOffset = 30.0;
|
||||||
Double upwindAngleLimit = 15.0;
|
Double upwindAngleLimit = 15.0;
|
||||||
Double downwindAngleLimit = 10.0; //Upwind from normalised horizontal
|
Double downwindAngleLimit = 10.0; //Upwind from normalised horizontal
|
||||||
Double normalizedHeading = normalizeHeading(heading, windDir);
|
Double normalizedHeading = normalizeHeading(heading, windDir);
|
||||||
if (normalizedHeading < 180) {
|
if (normalizedHeading < 180) {
|
||||||
if (normalizedHeading < sailWindOffset + upwindAngleLimit){
|
if (normalizedHeading < sailWindOffset + upwindAngleLimit){
|
||||||
boatPoly.rotateSail(heading + 90 - upwindAngleLimit);
|
boatAssets.rotateSail(-heading + 90 - upwindAngleLimit);
|
||||||
} else if (normalizedHeading > 90 + sailWindOffset){
|
} else if (normalizedHeading > 90 + sailWindOffset){
|
||||||
boatPoly.rotateSail(heading + downwindAngleLimit);
|
boatAssets.rotateSail(-heading + downwindAngleLimit);
|
||||||
} else {
|
} else {
|
||||||
boatPoly.rotateSail(windDir + 90 + sailWindOffset);
|
boatAssets.rotateSail(-heading + 90 + sailWindOffset);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (normalizedHeading > 360 - (sailWindOffset + upwindAngleLimit)){
|
// if (normalizedHeading > 360 - (sailWindOffset + upwindAngleLimit)){
|
||||||
boatPoly.rotateSail(heading + 90 + upwindAngleLimit);
|
// boatAssets.rotateSail(-heading + 90 + upwindAngleLimit);
|
||||||
} else if (normalizedHeading < 270 - sailWindOffset){
|
// } else if (normalizedHeading < 270 - sailWindOffset){
|
||||||
boatPoly.rotateSail(heading + 180 - downwindAngleLimit);
|
// boatAssets.rotateSail(-heading + 180 - downwindAngleLimit);
|
||||||
} else {
|
// } else {
|
||||||
boatPoly.rotateSail(windDir + 90 - sailWindOffset);
|
// boatAssets.rotateSail(-heading + 90 - sailWindOffset);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
boatPoly.hideSail();
|
boatAssets.hideSail();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -312,7 +291,7 @@ public class BoatObject extends Group {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void updateLocation() {
|
public void updateLocation() {
|
||||||
// boatPoly.getTransforms().add(new Rotate(2, new Point3D(1,1,1)));
|
// boatAssets.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;
|
||||||
//
|
//
|
||||||
@@ -326,8 +305,8 @@ public class BoatObject extends Group {
|
|||||||
// Line l = new Line(
|
// Line l = new Line(
|
||||||
// lastPoint.getX(),
|
// lastPoint.getX(),
|
||||||
// lastPoint.getY(),
|
// lastPoint.getY(),
|
||||||
// boatPoly.getLayoutX(),
|
// boatAssets.getLayoutX(),
|
||||||
// boatPoly.getLayoutY()
|
// boatAssets.getLayoutY()
|
||||||
// );
|
// );
|
||||||
// l.getStrokeDashArray().setAll(3d, 7d);
|
// l.getStrokeDashArray().setAll(3d, 7d);
|
||||||
// l.setStroke(colour);
|
// l.setStroke(colour);
|
||||||
@@ -335,7 +314,7 @@ public class BoatObject extends Group {
|
|||||||
// l.setCacheHint(CacheHint.SPEED);
|
// l.setCacheHint(CacheHint.SPEED);
|
||||||
// lineGroup.getChildren().add(l);
|
// lineGroup.getChildren().add(l);
|
||||||
// }
|
// }
|
||||||
// lastPoint = new Point2D(boatPoly.getLayoutX(), boatPoly.getLayoutY());
|
// lastPoint = new Point2D(boatAssets.getLayoutX(), boatAssets.getLayoutY());
|
||||||
// }
|
// }
|
||||||
// wake.updatePosition();
|
// wake.updatePosition();
|
||||||
}
|
}
|
||||||
@@ -356,7 +335,7 @@ public class BoatObject extends Group {
|
|||||||
// Point2D nextMarkPoint1 = canvasController.findScaledXY(nextMark1.getLatitude(), nextMark1.getLongitude());
|
// Point2D nextMarkPoint1 = canvasController.findScaledXY(nextMark1.getLatitude(), nextMark1.getLongitude());
|
||||||
// Point2D nextMarkPoint2 = canvasController.findScaledXY(nextMark2.getLatitude(), nextMark2.getLongitude());
|
// Point2D nextMarkPoint2 = canvasController.findScaledXY(nextMark2.getLatitude(), nextMark2.getLongitude());
|
||||||
//
|
//
|
||||||
// Point2D boatCurrentPoint = new Point2D(boatPoly.getLayoutX(), boatPoly.getLayoutY());
|
// Point2D boatCurrentPoint = new Point2D(boatAssets.getLayoutX(), boatAssets.getLayoutY());
|
||||||
// Point2D windTestPoint = GeoUtility.makeArbitraryVectorPoint(nextMarkPoint1, windAngle, 10d);
|
// Point2D windTestPoint = GeoUtility.makeArbitraryVectorPoint(nextMarkPoint1, windAngle, 10d);
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
@@ -422,32 +401,32 @@ public class BoatObject extends Group {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Double getBoatLayoutX() {
|
public Double getBoatLayoutX() {
|
||||||
return boatPoly.getAssets().getLayoutX();
|
return boatAssets.getAssets().getLayoutX();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Double getBoatLayoutY() {
|
public Double getBoatLayoutY() {
|
||||||
return boatPoly.getAssets().getLayoutY();
|
return boatAssets.getAssets().getLayoutY();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets this boat to appear highlighted
|
* Sets this boat to appear highlighted
|
||||||
*/
|
*/
|
||||||
public void setAsPlayer() {
|
public void setAsPlayer() {
|
||||||
// boatPoly.getPoints().setAll(
|
// boatAssets.getPoints().setAll(
|
||||||
// -BOAT_WIDTH / 1.75, BOAT_HEIGHT / 1.75,
|
// -BOAT_WIDTH / 1.75, BOAT_HEIGHT / 1.75,
|
||||||
// 0.0, -BOAT_HEIGHT / 1.75,
|
// 0.0, -BOAT_HEIGHT / 1.75,
|
||||||
// BOAT_WIDTH / 1.75, BOAT_HEIGHT / 1.75
|
// BOAT_WIDTH / 1.75, BOAT_HEIGHT / 1.75
|
||||||
// );
|
// );
|
||||||
// boatPoly.setStroke(Color.BLACK);
|
// boatAssets.setStroke(Color.BLACK);
|
||||||
// boatPoly.setStrokeWidth(2);
|
// boatAssets.setStrokeWidth(2);
|
||||||
// boatPoly.setStrokeLineCap(StrokeLineCap.ROUND);
|
// boatAssets.setStrokeLineCap(StrokeLineCap.ROUND);
|
||||||
isPlayer = true;
|
isPlayer = true;
|
||||||
animateSail();
|
animateSail();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTrajectory(double heading, double velocity, double windDir) {
|
public void setTrajectory(double heading, double velocity, double windDir) {
|
||||||
wake.setRotation(lastHeading - heading, velocity);
|
// wake.r(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;
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ import com.interactivemesh.jfx.importer.stl.StlMeshImporter;
|
|||||||
import javafx.animation.AnimationTimer;
|
import javafx.animation.AnimationTimer;
|
||||||
import javafx.geometry.Point3D;
|
import javafx.geometry.Point3D;
|
||||||
import javafx.scene.AmbientLight;
|
import javafx.scene.AmbientLight;
|
||||||
|
import javafx.scene.CacheHint;
|
||||||
import javafx.scene.Group;
|
import javafx.scene.Group;
|
||||||
import javafx.scene.paint.Color;
|
import javafx.scene.paint.Color;
|
||||||
import javafx.scene.paint.PhongMaterial;
|
import javafx.scene.paint.PhongMaterial;
|
||||||
import javafx.scene.shape.Circle;
|
|
||||||
import javafx.scene.shape.MeshView;
|
import javafx.scene.shape.MeshView;
|
||||||
import javafx.scene.transform.Rotate;
|
import javafx.scene.transform.Rotate;
|
||||||
import javafx.scene.transform.Scale;
|
import javafx.scene.transform.Scale;
|
||||||
@@ -56,7 +56,7 @@ public class ModelFactory {
|
|||||||
Group boatAssets = getUnmodifiedBoatModel(boatType, primaryColour);
|
Group boatAssets = getUnmodifiedBoatModel(boatType, primaryColour);
|
||||||
boatAssets.getTransforms().setAll(
|
boatAssets.getTransforms().setAll(
|
||||||
new Rotate(-90, new Point3D(0,0,1)),
|
new Rotate(-90, new Point3D(0,0,1)),
|
||||||
new Scale(0.05, 0.05, 0.05)
|
new Scale(0.06, 0.06, 0.06)
|
||||||
);
|
);
|
||||||
return new BoatModel(boatAssets, null, boatType);
|
return new BoatModel(boatAssets, null, boatType);
|
||||||
}
|
}
|
||||||
@@ -76,6 +76,9 @@ public class ModelFactory {
|
|||||||
private static MeshView importFile(String fileName) {
|
private static MeshView importFile(String fileName) {
|
||||||
StlMeshImporter importer = new StlMeshImporter();
|
StlMeshImporter importer = new StlMeshImporter();
|
||||||
importer.read(ModelFactory.class.getResource("/meshes/" + fileName));
|
importer.read(ModelFactory.class.getResource("/meshes/" + fileName));
|
||||||
|
MeshView importedFile = new MeshView(importer.getImport());
|
||||||
|
importedFile.setCache(true);
|
||||||
|
importedFile.setCacheHint(CacheHint.SCALE_AND_ROTATE);
|
||||||
return new MeshView(importer.getImport());
|
return new MeshView(importer.getImport());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -87,6 +90,8 @@ public class ModelFactory {
|
|||||||
ColModelImporter importer = new ColModelImporter();
|
ColModelImporter importer = new ColModelImporter();
|
||||||
importer.read(ModelFactory.class.getResource("/meshes/" + tokenType.filename));
|
importer.read(ModelFactory.class.getResource("/meshes/" + tokenType.filename));
|
||||||
assets = new Group(importer.getImport());
|
assets = new Group(importer.getImport());
|
||||||
|
assets.setCache(true);
|
||||||
|
assets.setCacheHint(CacheHint.SCALE_AND_ROTATE);
|
||||||
}
|
}
|
||||||
switch (tokenType) {
|
switch (tokenType) {
|
||||||
case VELOCITY_PICKUP:
|
case VELOCITY_PICKUP:
|
||||||
@@ -104,10 +109,14 @@ public class ModelFactory {
|
|||||||
case START_LINE:
|
case START_LINE:
|
||||||
case GATE_LINE:
|
case GATE_LINE:
|
||||||
return makeGate(assets);
|
return makeGate(assets);
|
||||||
|
case WAKE:
|
||||||
|
return makeWake(assets);
|
||||||
|
case TRAIL_SEGMENT:
|
||||||
|
return makeTrail(assets);
|
||||||
case PLAYER_IDENTIFIER:
|
case PLAYER_IDENTIFIER:
|
||||||
return makeIdentifierIcon(assets);
|
return makeIdentifierIcon(assets);
|
||||||
default:
|
default:
|
||||||
return new Model(assets, null);
|
return new Model(new Group(assets), null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,7 +129,7 @@ public class ModelFactory {
|
|||||||
new Translate(0,-1,0),
|
new Translate(0,-1,0),
|
||||||
new Rotate(0 ,new Point3D(1,1,1))
|
new Rotate(0 ,new Point3D(1,1,1))
|
||||||
);
|
);
|
||||||
return new Model(assets, new AnimationTimer() {
|
return new Model(new Group(assets), new AnimationTimer() {
|
||||||
|
|
||||||
private double rotation = 0;
|
private double rotation = 0;
|
||||||
private Group group = assets;
|
private Group group = assets;
|
||||||
@@ -139,17 +148,21 @@ public class ModelFactory {
|
|||||||
Group area = new Group(importer.getImport());
|
Group area = new Group(importer.getImport());
|
||||||
area.getChildren().add(marker);
|
area.getChildren().add(marker);
|
||||||
area.getTransforms().add(new Rotate(90, new Point3D(1, 0, 0)));
|
area.getTransforms().add(new Rotate(90, new Point3D(1, 0, 0)));
|
||||||
return new Model(area, null);
|
return new Model(new Group(area), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Model makeOcean(Group group) {
|
private static Model makeOcean(Group group) {
|
||||||
// group.setScaleY(Double.MAX_VALUE);
|
// group.setScaleY(Double.MAX_VALUE);
|
||||||
// group.setScaleX(Double.MAX_VALUE);
|
// group.setScaleX(Double.MAX_VALUE);
|
||||||
// group.getTransforms().add(new Rotate(90, new Point3D(1, 0, 0)));
|
group.getTransforms().addAll(
|
||||||
Circle ocean = new Circle(0,0,1000, Color.DEEPSKYBLUE);
|
new Rotate(90, new Point3D(1, 0, 0)),
|
||||||
ocean.setStroke(Color.TRANSPARENT);
|
new Scale(10,4,10)
|
||||||
group.getChildren().add(ocean);
|
);
|
||||||
return new Model(group, null);
|
// group.getChildren().add(new AmbientLight());
|
||||||
|
// Circle ocean = new Circle(0,0,500, Color.SKYBLUE);
|
||||||
|
// ocean.setStroke(Color.TRANSPARENT);
|
||||||
|
// group.getChildren().add(ocean);
|
||||||
|
return new Model(new Group(group), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Model makeBarrier(Group assets) {
|
private static Model makeBarrier(Group assets) {
|
||||||
@@ -157,14 +170,30 @@ public class ModelFactory {
|
|||||||
new Rotate(90, new Point3D(1,0,0)),
|
new Rotate(90, new Point3D(1,0,0)),
|
||||||
new Scale(1.5,1.5,1.5)
|
new Scale(1.5,1.5,1.5)
|
||||||
);
|
);
|
||||||
return new Model(assets, null);
|
return new Model(new Group(assets), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Model makeGate(Group assets) {
|
private static Model makeGate(Group assets) {
|
||||||
assets.getTransforms().addAll(
|
assets.getTransforms().addAll(
|
||||||
new Rotate(90, new Point3D(1,0,0))
|
new Rotate(90, new Point3D(1,0,0))
|
||||||
);
|
);
|
||||||
return new Model(assets, null);
|
return new Model(new Group(assets), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Model makeWake(Group assets) {
|
||||||
|
assets.getTransforms().setAll(
|
||||||
|
new Rotate(-90, new Point3D(0,0,1)),
|
||||||
|
new Rotate(90, new Point3D(1,0,0)),
|
||||||
|
new Scale(0.5, 0.5, 0.5)
|
||||||
|
);
|
||||||
|
return new Model(new Group(assets), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Model makeTrail(Group trailPiece) {
|
||||||
|
trailPiece.getTransforms().addAll(
|
||||||
|
new Rotate(90, new Point3D(0,0,1))
|
||||||
|
);
|
||||||
|
return new Model(new Group(trailPiece), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Model makeIdentifierIcon(Group assets) {
|
private static Model makeIdentifierIcon(Group assets) {
|
||||||
|
|||||||
@@ -11,12 +11,14 @@ public enum ModelType {
|
|||||||
START_MARKER ("start_marker.dae"),
|
START_MARKER ("start_marker.dae"),
|
||||||
PLAIN_MARKER ("plain_marker.dae"),
|
PLAIN_MARKER ("plain_marker.dae"),
|
||||||
MARK_AREA ("mark_area.dae"),
|
MARK_AREA ("mark_area.dae"),
|
||||||
OCEAN (null),
|
OCEAN ("ocean.dae"),
|
||||||
BORDER_PYLON ("barrier_pole.dae"),
|
BORDER_PYLON ("barrier_pole.dae"),
|
||||||
BORDER_BARRIER ("barrier_segment.dae"),
|
BORDER_BARRIER ("barrier_segment.dae"),
|
||||||
FINISH_LINE ("finish_line.dae"),
|
FINISH_LINE ("finish_line.dae"),
|
||||||
START_LINE ("start_line.dae"),
|
START_LINE ("start_line.dae"),
|
||||||
GATE_LINE ("gate_line.dae"),
|
GATE_LINE ("gate_line.dae"),
|
||||||
|
WAKE ("wake.dae"),
|
||||||
|
TRAIL_SEGMENT ("trail_segment.dae");
|
||||||
PLAYER_IDENTIFIER ("player_identifier.dae");
|
PLAYER_IDENTIFIER ("player_identifier.dae");
|
||||||
|
|
||||||
final String filename;
|
final String filename;
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
<asset>
|
<asset>
|
||||||
<contributor>
|
<contributor>
|
||||||
<author>Blender User</author>
|
<author>Blender User</author>
|
||||||
<authoring_tool>Blender 2.78.0 commit date:2017-02-24, commit time:14:33, hash:e92f235283</authoring_tool>
|
<authoring_tool>Blender 2.78.0 commit date:2016-09-26, commit time:12:42, hash:4bb1e22</authoring_tool>
|
||||||
</contributor>
|
</contributor>
|
||||||
<created>2017-09-11T02:11:56</created>
|
<created>2017-09-11T10:59:51</created>
|
||||||
<modified>2017-09-11T02:11:56</modified>
|
<modified>2017-09-11T10:59:51</modified>
|
||||||
<unit name="meter" meter="1"/>
|
<unit name="meter" meter="1"/>
|
||||||
<up_axis>Z_UP</up_axis>
|
<up_axis>Z_UP</up_axis>
|
||||||
</asset>
|
</asset>
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
<color sid="diffuse">0.64 0 0.01304383 1</color>
|
<color sid="diffuse">0.64 0 0.01304383 1</color>
|
||||||
</diffuse>
|
</diffuse>
|
||||||
<specular>
|
<specular>
|
||||||
<color sid="specular">0.5 0.5 0.5 1</color>
|
<color sid="specular">0 0 0 1</color>
|
||||||
</specular>
|
</specular>
|
||||||
<shininess>
|
<shininess>
|
||||||
<float sid="shininess">50</float>
|
<float sid="shininess">50</float>
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
<geometry id="Plane-mesh" name="Plane">
|
<geometry id="Plane-mesh" name="Plane">
|
||||||
<mesh>
|
<mesh>
|
||||||
<source id="Plane-mesh-positions">
|
<source id="Plane-mesh-positions">
|
||||||
<float_array id="Plane-mesh-positions-array" count="192">-1 1 0 1 1 0 -1 0 0 1 0 0 -1 -0.5 0 1 0.5 0 -1 0.5 0 1 -0.5 0 -1 -0.75 0 1 0.75 0 -1 0.25 0 1 -0.25 0 -1 -0.25 0 1 0.25 0 -1 0.75 0 1 -0.75 0 -1 -0.875 0 1 0.875 0 -1 0.125 0 1 -0.125 0 -1 -0.375 0 1 0.375 0 -1 0.625 0 1 -0.625 0 -1 -0.625 0 1 0.625 0 -1 0.375 0 1 -0.375 0 -1 -0.125 0 1 0.125 0 -1 0.875 0 1 -0.875 0 1 0.875 0.04037594 1 1 0.04037594 -1 1 0.04037594 1 -0.125 0.04037594 1 0 0.04037594 -1 0 0.04037594 1 0.375 0.04037594 1 0.5 0.04037594 1 -0.625 0.04037594 1 -0.5 0.04037594 -1 -0.5 0.04037594 -1 0.5 0.04037594 1 0.625 0.04037594 1 0.75 0.04037594 1 -0.375 0.04037594 1 -0.25 0.04037594 1 0.125 0.04037594 1 0.25 0.04037594 1 -0.875 0.04037594 1 -0.75 0.04037594 -1 0.25 0.04037594 -1 -0.75 0.04037594 -1 -0.25 0.04037594 -1 0.75 0.04037594 -1 -0.875 0.04037594 -1 0.125 0.04037594 -1 -0.375 0.04037594 -1 0.625 0.04037594 -1 -0.625 0.04037594 -1 0.375 0.04037594 -1 -0.125 0.04037594 -1 0.875 0.04037594</float_array>
|
<float_array id="Plane-mesh-positions-array" count="192">-1 1 0 1 1 0 -1 0 0 1 0 0 -1 -0.5 0 1 0.5 0 -1 0.5 0 1 -0.5 0 -1 -0.75 0 1 0.75 0 -1 0.25 0 1 -0.25 0 -1 -0.25 0 1 0.25 0 -1 0.75 0 1 -0.75 0 -1 -0.875 0 1 0.875 0 -1 0.125 0 1 -0.125 0 -1 -0.375 0 1 0.375 0 -1 0.625 0 1 -0.625 0 -1 -0.625 0 1 0.625 0 -1 0.375 0 1 -0.375 0 -1 -0.125 0 1 0.125 0 -1 0.875 0 1 -0.875 0 1 0.875 0.04037588 1 1 0.04037588 -1 1 0.04037588 1 -0.125 0.04037588 1 0 0.04037588 -1 0 0.04037588 1 0.375 0.04037588 1 0.5 0.04037588 1 -0.625 0.04037588 1 -0.5 0.04037588 -1 -0.5 0.04037588 -1 0.5 0.04037588 1 0.625 0.04037588 1 0.75 0.04037588 1 -0.375 0.04037588 1 -0.25 0.04037588 1 0.125 0.04037588 1 0.25 0.04037588 1 -0.875 0.04037588 1 -0.75 0.04037588 -1 0.25 0.04037588 -1 -0.75 0.04037588 -1 -0.25 0.04037588 -1 0.75 0.04037588 -1 -0.875 0.04037588 -1 0.125 0.04037588 -1 -0.375 0.04037588 -1 0.625 0.04037588 -1 -0.625 0.04037588 -1 0.375 0.04037588 -1 -0.125 0.04037588 -1 0.875 0.04037588</float_array>
|
||||||
<technique_common>
|
<technique_common>
|
||||||
<accessor source="#Plane-mesh-positions-array" count="64" stride="3">
|
<accessor source="#Plane-mesh-positions-array" count="64" stride="3">
|
||||||
<param name="X" type="float"/>
|
<param name="X" type="float"/>
|
||||||
|
|||||||
@@ -3,16 +3,16 @@
|
|||||||
<asset>
|
<asset>
|
||||||
<contributor>
|
<contributor>
|
||||||
<author>Blender User</author>
|
<author>Blender User</author>
|
||||||
<authoring_tool>Blender 2.78.0 commit date:2017-02-24, commit time:14:33, hash:e92f235283</authoring_tool>
|
<authoring_tool>Blender 2.78.0 commit date:2016-09-26, commit time:12:42, hash:4bb1e22</authoring_tool>
|
||||||
</contributor>
|
</contributor>
|
||||||
<created>2017-09-11T02:18:04</created>
|
<created>2017-09-11T11:00:38</created>
|
||||||
<modified>2017-09-11T02:18:04</modified>
|
<modified>2017-09-11T11:00:38</modified>
|
||||||
<unit name="meter" meter="1"/>
|
<unit name="meter" meter="1"/>
|
||||||
<up_axis>Z_UP</up_axis>
|
<up_axis>Z_UP</up_axis>
|
||||||
</asset>
|
</asset>
|
||||||
<library_images/>
|
<library_images/>
|
||||||
<library_effects>
|
<library_effects>
|
||||||
<effect id="Material_001-effect">
|
<effect id="Material_001_002-effect">
|
||||||
<profile_COMMON>
|
<profile_COMMON>
|
||||||
<technique sid="common">
|
<technique sid="common">
|
||||||
<phong>
|
<phong>
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
<color sid="diffuse">0.09194811 0.08404596 0.08642986 1</color>
|
<color sid="diffuse">0.09194811 0.08404596 0.08642986 1</color>
|
||||||
</diffuse>
|
</diffuse>
|
||||||
<specular>
|
<specular>
|
||||||
<color sid="specular">0.5 0.5 0.5 1</color>
|
<color sid="specular">0 0 0 1</color>
|
||||||
</specular>
|
</specular>
|
||||||
<shininess>
|
<shininess>
|
||||||
<float sid="shininess">50</float>
|
<float sid="shininess">50</float>
|
||||||
@@ -40,39 +40,39 @@
|
|||||||
</effect>
|
</effect>
|
||||||
</library_effects>
|
</library_effects>
|
||||||
<library_materials>
|
<library_materials>
|
||||||
<material id="Material_001-material" name="Material_001">
|
<material id="Material_001_002-material" name="Material_001_002">
|
||||||
<instance_effect url="#Material_001-effect"/>
|
<instance_effect url="#Material_001_002-effect"/>
|
||||||
</material>
|
</material>
|
||||||
</library_materials>
|
</library_materials>
|
||||||
<library_geometries>
|
<library_geometries>
|
||||||
<geometry id="Plane-mesh" name="Plane">
|
<geometry id="Plane_003-mesh" name="Plane.003">
|
||||||
<mesh>
|
<mesh>
|
||||||
<source id="Plane-mesh-positions">
|
<source id="Plane_003-mesh-positions">
|
||||||
<float_array id="Plane-mesh-positions-array" count="192">-1 1 0 1 1 0 -1 0 0 1 0 0 -1 -0.5 0 1 0.5 0 -1 0.5 0 1 -0.5 0 -1 -0.75 0 1 0.75 0 -1 0.25 0 1 -0.25 0 -1 -0.25 0 1 0.25 0 -1 0.75 0 1 -0.75 0 -1 -0.875 0 1 0.875 0 -1 0.125 0 1 -0.125 0 -1 -0.375 0 1 0.375 0 -1 0.625 0 1 -0.625 0 -1 -0.625 0 1 0.625 0 -1 0.375 0 1 -0.375 0 -1 -0.125 0 1 0.125 0 -1 0.875 0 1 -0.875 0 1 0.875 0.04037594 1 1 0.04037594 -1 1 0.04037594 1 -0.125 0.04037594 1 0 0.04037594 -1 0 0.04037594 1 0.375 0.04037594 1 0.5 0.04037594 1 -0.625 0.04037594 1 -0.5 0.04037594 -1 -0.5 0.04037594 -1 0.5 0.04037594 1 0.625 0.04037594 1 0.75 0.04037594 1 -0.375 0.04037594 1 -0.25 0.04037594 1 0.125 0.04037594 1 0.25 0.04037594 1 -0.875 0.04037594 1 -0.75 0.04037594 -1 0.25 0.04037594 -1 -0.75 0.04037594 -1 -0.25 0.04037594 -1 0.75 0.04037594 -1 -0.875 0.04037594 -1 0.125 0.04037594 -1 -0.375 0.04037594 -1 0.625 0.04037594 -1 -0.625 0.04037594 -1 0.375 0.04037594 -1 -0.125 0.04037594 -1 0.875 0.04037594</float_array>
|
<float_array id="Plane_003-mesh-positions-array" count="192">-1 1 0 1 1 0 -1 0 0 1 0 0 -1 -0.5 0 1 0.5 0 -1 0.5 0 1 -0.5 0 -1 -0.75 0 1 0.75 0 -1 0.25 0 1 -0.25 0 -1 -0.25 0 1 0.25 0 -1 0.75 0 1 -0.75 0 -1 -0.875 0 1 0.875 0 -1 0.125 0 1 -0.125 0 -1 -0.375 0 1 0.375 0 -1 0.625 0 1 -0.625 0 -1 -0.625 0 1 0.625 0 -1 0.375 0 1 -0.375 0 -1 -0.125 0 1 0.125 0 -1 0.875 0 1 -0.875 0 1 0.875 0.04037588 1 1 0.04037588 -1 1 0.04037588 1 -0.125 0.04037588 1 0 0.04037588 -1 0 0.04037588 1 0.375 0.04037588 1 0.5 0.04037588 1 -0.625 0.04037588 1 -0.5 0.04037588 -1 -0.5 0.04037588 -1 0.5 0.04037588 1 0.625 0.04037588 1 0.75 0.04037588 1 -0.375 0.04037588 1 -0.25 0.04037588 1 0.125 0.04037588 1 0.25 0.04037588 1 -0.875 0.04037588 1 -0.75 0.04037588 -1 0.25 0.04037588 -1 -0.75 0.04037588 -1 -0.25 0.04037588 -1 0.75 0.04037588 -1 -0.875 0.04037588 -1 0.125 0.04037588 -1 -0.375 0.04037588 -1 0.625 0.04037588 -1 -0.625 0.04037588 -1 0.375 0.04037588 -1 -0.125 0.04037588 -1 0.875 0.04037588</float_array>
|
||||||
<technique_common>
|
<technique_common>
|
||||||
<accessor source="#Plane-mesh-positions-array" count="64" stride="3">
|
<accessor source="#Plane_003-mesh-positions-array" count="64" stride="3">
|
||||||
<param name="X" type="float"/>
|
<param name="X" type="float"/>
|
||||||
<param name="Y" type="float"/>
|
<param name="Y" type="float"/>
|
||||||
<param name="Z" type="float"/>
|
<param name="Z" type="float"/>
|
||||||
</accessor>
|
</accessor>
|
||||||
</technique_common>
|
</technique_common>
|
||||||
</source>
|
</source>
|
||||||
<source id="Plane-mesh-normals">
|
<source id="Plane_003-mesh-normals">
|
||||||
<float_array id="Plane-mesh-normals-array" count="18">0 0 -1 0 0 1 0 -1 0 0 1 0 1 0 0 -1 0 0</float_array>
|
<float_array id="Plane_003-mesh-normals-array" count="18">0 0 -1 0 0 1 0 -1 0 0 1 0 1 0 0 -1 0 0</float_array>
|
||||||
<technique_common>
|
<technique_common>
|
||||||
<accessor source="#Plane-mesh-normals-array" count="6" stride="3">
|
<accessor source="#Plane_003-mesh-normals-array" count="6" stride="3">
|
||||||
<param name="X" type="float"/>
|
<param name="X" type="float"/>
|
||||||
<param name="Y" type="float"/>
|
<param name="Y" type="float"/>
|
||||||
<param name="Z" type="float"/>
|
<param name="Z" type="float"/>
|
||||||
</accessor>
|
</accessor>
|
||||||
</technique_common>
|
</technique_common>
|
||||||
</source>
|
</source>
|
||||||
<vertices id="Plane-mesh-vertices">
|
<vertices id="Plane_003-mesh-vertices">
|
||||||
<input semantic="POSITION" source="#Plane-mesh-positions"/>
|
<input semantic="POSITION" source="#Plane_003-mesh-positions"/>
|
||||||
</vertices>
|
</vertices>
|
||||||
<polylist material="Material_001-material" count="96">
|
<polylist material="Material_001_002-material" count="96">
|
||||||
<input semantic="VERTEX" source="#Plane-mesh-vertices" offset="0"/>
|
<input semantic="VERTEX" source="#Plane_003-mesh-vertices" offset="0"/>
|
||||||
<input semantic="NORMAL" source="#Plane-mesh-normals" offset="1"/>
|
<input semantic="NORMAL" source="#Plane_003-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 3 3 3 3 3 3 3 3 </vcount>
|
<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 3 3 3 3 3 3 3 3 </vcount>
|
||||||
<p>0 0 17 0 30 0 2 0 19 0 28 0 4 0 23 0 24 0 6 0 21 0 26 0 10 0 29 0 18 0 8 0 31 0 16 0 12 0 27 0 20 0 14 0 25 0 22 0 32 1 34 1 63 1 35 1 37 1 62 1 40 1 42 1 60 1 38 1 43 1 61 1 48 1 52 1 57 1 50 1 53 1 56 1 46 1 54 1 58 1 44 1 55 1 59 1 27 2 58 2 20 2 10 3 49 3 13 3 31 2 56 2 16 2 8 3 51 3 15 3 1 4 32 4 17 4 29 2 57 2 18 2 12 3 47 3 11 3 0 3 33 3 1 3 21 2 61 2 26 2 14 3 45 3 9 3 3 4 35 4 19 4 23 2 60 2 24 2 16 5 53 5 8 5 2 3 36 3 3 3 19 2 62 2 28 2 18 5 52 5 10 5 5 4 38 4 21 4 17 2 63 2 30 2 20 5 54 5 12 5 7 4 40 4 23 4 22 5 55 5 14 5 4 3 41 3 7 3 24 5 42 5 4 5 6 3 39 3 5 3 26 5 43 5 6 5 9 4 44 4 25 4 28 5 37 5 2 5 11 4 46 4 27 4 30 5 34 5 0 5 13 4 48 4 29 4 25 2 59 2 22 2 15 4 50 4 31 4 0 0 1 0 17 0 2 0 3 0 19 0 4 0 7 0 23 0 6 0 5 0 21 0 10 0 13 0 29 0 8 0 15 0 31 0 12 0 11 0 27 0 14 0 9 0 25 0 32 1 33 1 34 1 35 1 36 1 37 1 40 1 41 1 42 1 38 1 39 1 43 1 48 1 49 1 52 1 50 1 51 1 53 1 46 1 47 1 54 1 44 1 45 1 55 1 27 2 46 2 58 2 10 3 52 3 49 3 31 2 50 2 56 2 8 3 53 3 51 3 1 4 33 4 32 4 29 2 48 2 57 2 12 3 54 3 47 3 0 3 34 3 33 3 21 2 38 2 61 2 14 3 55 3 45 3 3 4 36 4 35 4 23 2 40 2 60 2 16 5 56 5 53 5 2 3 37 3 36 3 19 2 35 2 62 2 18 5 57 5 52 5 5 4 39 4 38 4 17 2 32 2 63 2 20 5 58 5 54 5 7 4 41 4 40 4 22 5 59 5 55 5 4 3 42 3 41 3 24 5 60 5 42 5 6 3 43 3 39 3 26 5 61 5 43 5 9 4 45 4 44 4 28 5 62 5 37 5 11 4 47 4 46 4 30 5 63 5 34 5 13 4 49 4 48 4 25 2 44 2 59 2 15 4 51 4 50 4</p>
|
<p>0 0 17 0 30 0 2 0 19 0 28 0 4 0 23 0 24 0 6 0 21 0 26 0 10 0 29 0 18 0 8 0 31 0 16 0 12 0 27 0 20 0 14 0 25 0 22 0 32 1 34 1 63 1 35 1 37 1 62 1 40 1 42 1 60 1 38 1 43 1 61 1 48 1 52 1 57 1 50 1 53 1 56 1 46 1 54 1 58 1 44 1 55 1 59 1 27 2 58 2 20 2 10 3 49 3 13 3 31 2 56 2 16 2 8 3 51 3 15 3 1 4 32 4 17 4 29 2 57 2 18 2 12 3 47 3 11 3 0 3 33 3 1 3 21 2 61 2 26 2 14 3 45 3 9 3 3 4 35 4 19 4 23 2 60 2 24 2 16 5 53 5 8 5 2 3 36 3 3 3 19 2 62 2 28 2 18 5 52 5 10 5 5 4 38 4 21 4 17 2 63 2 30 2 20 5 54 5 12 5 7 4 40 4 23 4 22 5 55 5 14 5 4 3 41 3 7 3 24 5 42 5 4 5 6 3 39 3 5 3 26 5 43 5 6 5 9 4 44 4 25 4 28 5 37 5 2 5 11 4 46 4 27 4 30 5 34 5 0 5 13 4 48 4 29 4 25 2 59 2 22 2 15 4 50 4 31 4 0 0 1 0 17 0 2 0 3 0 19 0 4 0 7 0 23 0 6 0 5 0 21 0 10 0 13 0 29 0 8 0 15 0 31 0 12 0 11 0 27 0 14 0 9 0 25 0 32 1 33 1 34 1 35 1 36 1 37 1 40 1 41 1 42 1 38 1 39 1 43 1 48 1 49 1 52 1 50 1 51 1 53 1 46 1 47 1 54 1 44 1 45 1 55 1 27 2 46 2 58 2 10 3 52 3 49 3 31 2 50 2 56 2 8 3 53 3 51 3 1 4 33 4 32 4 29 2 48 2 57 2 12 3 54 3 47 3 0 3 34 3 33 3 21 2 38 2 61 2 14 3 55 3 45 3 3 4 36 4 35 4 23 2 40 2 60 2 16 5 56 5 53 5 2 3 37 3 36 3 19 2 35 2 62 2 18 5 57 5 52 5 5 4 39 4 38 4 17 2 32 2 63 2 20 5 58 5 54 5 7 4 41 4 40 4 22 5 59 5 55 5 4 3 42 3 41 3 24 5 60 5 42 5 6 3 43 3 39 3 26 5 61 5 43 5 9 4 45 4 44 4 28 5 62 5 37 5 11 4 47 4 46 4 30 5 63 5 34 5 13 4 49 4 48 4 25 2 44 2 59 2 15 4 51 4 50 4</p>
|
||||||
</polylist>
|
</polylist>
|
||||||
@@ -84,10 +84,10 @@
|
|||||||
<visual_scene id="Scene" name="Scene">
|
<visual_scene id="Scene" name="Scene">
|
||||||
<node id="Plane" name="Plane" type="NODE">
|
<node id="Plane" name="Plane" type="NODE">
|
||||||
<matrix sid="transform">0.125 0 0 0 0 5.333333 0 -0.3333333 0 0 1 0.01986987 0 0 0 1</matrix>
|
<matrix sid="transform">0.125 0 0 0 0 5.333333 0 -0.3333333 0 0 1 0.01986987 0 0 0 1</matrix>
|
||||||
<instance_geometry url="#Plane-mesh" name="Plane">
|
<instance_geometry url="#Plane_003-mesh" name="Plane">
|
||||||
<bind_material>
|
<bind_material>
|
||||||
<technique_common>
|
<technique_common>
|
||||||
<instance_material symbol="Material_001-material" target="#Material_001-material"/>
|
<instance_material symbol="Material_001_002-material" target="#Material_001_002-material"/>
|
||||||
</technique_common>
|
</technique_common>
|
||||||
</bind_material>
|
</bind_material>
|
||||||
</instance_geometry>
|
</instance_geometry>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -3,16 +3,16 @@
|
|||||||
<asset>
|
<asset>
|
||||||
<contributor>
|
<contributor>
|
||||||
<author>Blender User</author>
|
<author>Blender User</author>
|
||||||
<authoring_tool>Blender 2.78.0 commit date:2017-02-24, commit time:14:33, hash:e92f235283</authoring_tool>
|
<authoring_tool>Blender 2.78.0 commit date:2016-09-26, commit time:12:42, hash:4bb1e22</authoring_tool>
|
||||||
</contributor>
|
</contributor>
|
||||||
<created>2017-09-11T02:12:19</created>
|
<created>2017-09-11T11:00:07</created>
|
||||||
<modified>2017-09-11T02:12:19</modified>
|
<modified>2017-09-11T11:00:07</modified>
|
||||||
<unit name="meter" meter="1"/>
|
<unit name="meter" meter="1"/>
|
||||||
<up_axis>Z_UP</up_axis>
|
<up_axis>Z_UP</up_axis>
|
||||||
</asset>
|
</asset>
|
||||||
<library_images/>
|
<library_images/>
|
||||||
<library_effects>
|
<library_effects>
|
||||||
<effect id="Material_001-effect">
|
<effect id="Material_001_001-effect">
|
||||||
<profile_COMMON>
|
<profile_COMMON>
|
||||||
<technique sid="common">
|
<technique sid="common">
|
||||||
<phong>
|
<phong>
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
<color sid="diffuse">0 0.2611 7.78272e-5 1</color>
|
<color sid="diffuse">0 0.2611 7.78272e-5 1</color>
|
||||||
</diffuse>
|
</diffuse>
|
||||||
<specular>
|
<specular>
|
||||||
<color sid="specular">0.5 0.5 0.5 1</color>
|
<color sid="specular">0 0 0 1</color>
|
||||||
</specular>
|
</specular>
|
||||||
<shininess>
|
<shininess>
|
||||||
<float sid="shininess">50</float>
|
<float sid="shininess">50</float>
|
||||||
@@ -40,39 +40,39 @@
|
|||||||
</effect>
|
</effect>
|
||||||
</library_effects>
|
</library_effects>
|
||||||
<library_materials>
|
<library_materials>
|
||||||
<material id="Material_001-material" name="Material_001">
|
<material id="Material_001_001-material" name="Material_001_001">
|
||||||
<instance_effect url="#Material_001-effect"/>
|
<instance_effect url="#Material_001_001-effect"/>
|
||||||
</material>
|
</material>
|
||||||
</library_materials>
|
</library_materials>
|
||||||
<library_geometries>
|
<library_geometries>
|
||||||
<geometry id="Plane-mesh" name="Plane">
|
<geometry id="Plane_001-mesh" name="Plane.001">
|
||||||
<mesh>
|
<mesh>
|
||||||
<source id="Plane-mesh-positions">
|
<source id="Plane_001-mesh-positions">
|
||||||
<float_array id="Plane-mesh-positions-array" count="192">-1 1 0 1 1 0 -1 0 0 1 0 0 -1 -0.5 0 1 0.5 0 -1 0.5 0 1 -0.5 0 -1 -0.75 0 1 0.75 0 -1 0.25 0 1 -0.25 0 -1 -0.25 0 1 0.25 0 -1 0.75 0 1 -0.75 0 -1 -0.875 0 1 0.875 0 -1 0.125 0 1 -0.125 0 -1 -0.375 0 1 0.375 0 -1 0.625 0 1 -0.625 0 -1 -0.625 0 1 0.625 0 -1 0.375 0 1 -0.375 0 -1 -0.125 0 1 0.125 0 -1 0.875 0 1 -0.875 0 1 0.875 0.04037594 1 1 0.04037594 -1 1 0.04037594 1 -0.125 0.04037594 1 0 0.04037594 -1 0 0.04037594 1 0.375 0.04037594 1 0.5 0.04037594 1 -0.625 0.04037594 1 -0.5 0.04037594 -1 -0.5 0.04037594 -1 0.5 0.04037594 1 0.625 0.04037594 1 0.75 0.04037594 1 -0.375 0.04037594 1 -0.25 0.04037594 1 0.125 0.04037594 1 0.25 0.04037594 1 -0.875 0.04037594 1 -0.75 0.04037594 -1 0.25 0.04037594 -1 -0.75 0.04037594 -1 -0.25 0.04037594 -1 0.75 0.04037594 -1 -0.875 0.04037594 -1 0.125 0.04037594 -1 -0.375 0.04037594 -1 0.625 0.04037594 -1 -0.625 0.04037594 -1 0.375 0.04037594 -1 -0.125 0.04037594 -1 0.875 0.04037594</float_array>
|
<float_array id="Plane_001-mesh-positions-array" count="192">-1 1 0 1 1 0 -1 0 0 1 0 0 -1 -0.5 0 1 0.5 0 -1 0.5 0 1 -0.5 0 -1 -0.75 0 1 0.75 0 -1 0.25 0 1 -0.25 0 -1 -0.25 0 1 0.25 0 -1 0.75 0 1 -0.75 0 -1 -0.875 0 1 0.875 0 -1 0.125 0 1 -0.125 0 -1 -0.375 0 1 0.375 0 -1 0.625 0 1 -0.625 0 -1 -0.625 0 1 0.625 0 -1 0.375 0 1 -0.375 0 -1 -0.125 0 1 0.125 0 -1 0.875 0 1 -0.875 0 1 0.875 0.04037588 1 1 0.04037588 -1 1 0.04037588 1 -0.125 0.04037588 1 0 0.04037588 -1 0 0.04037588 1 0.375 0.04037588 1 0.5 0.04037588 1 -0.625 0.04037588 1 -0.5 0.04037588 -1 -0.5 0.04037588 -1 0.5 0.04037588 1 0.625 0.04037588 1 0.75 0.04037588 1 -0.375 0.04037588 1 -0.25 0.04037588 1 0.125 0.04037588 1 0.25 0.04037588 1 -0.875 0.04037588 1 -0.75 0.04037588 -1 0.25 0.04037588 -1 -0.75 0.04037588 -1 -0.25 0.04037588 -1 0.75 0.04037588 -1 -0.875 0.04037588 -1 0.125 0.04037588 -1 -0.375 0.04037588 -1 0.625 0.04037588 -1 -0.625 0.04037588 -1 0.375 0.04037588 -1 -0.125 0.04037588 -1 0.875 0.04037588</float_array>
|
||||||
<technique_common>
|
<technique_common>
|
||||||
<accessor source="#Plane-mesh-positions-array" count="64" stride="3">
|
<accessor source="#Plane_001-mesh-positions-array" count="64" stride="3">
|
||||||
<param name="X" type="float"/>
|
<param name="X" type="float"/>
|
||||||
<param name="Y" type="float"/>
|
<param name="Y" type="float"/>
|
||||||
<param name="Z" type="float"/>
|
<param name="Z" type="float"/>
|
||||||
</accessor>
|
</accessor>
|
||||||
</technique_common>
|
</technique_common>
|
||||||
</source>
|
</source>
|
||||||
<source id="Plane-mesh-normals">
|
<source id="Plane_001-mesh-normals">
|
||||||
<float_array id="Plane-mesh-normals-array" count="18">0 0 -1 0 0 1 0 -1 0 0 1 0 1 0 0 -1 0 0</float_array>
|
<float_array id="Plane_001-mesh-normals-array" count="18">0 0 -1 0 0 1 0 -1 0 0 1 0 1 0 0 -1 0 0</float_array>
|
||||||
<technique_common>
|
<technique_common>
|
||||||
<accessor source="#Plane-mesh-normals-array" count="6" stride="3">
|
<accessor source="#Plane_001-mesh-normals-array" count="6" stride="3">
|
||||||
<param name="X" type="float"/>
|
<param name="X" type="float"/>
|
||||||
<param name="Y" type="float"/>
|
<param name="Y" type="float"/>
|
||||||
<param name="Z" type="float"/>
|
<param name="Z" type="float"/>
|
||||||
</accessor>
|
</accessor>
|
||||||
</technique_common>
|
</technique_common>
|
||||||
</source>
|
</source>
|
||||||
<vertices id="Plane-mesh-vertices">
|
<vertices id="Plane_001-mesh-vertices">
|
||||||
<input semantic="POSITION" source="#Plane-mesh-positions"/>
|
<input semantic="POSITION" source="#Plane_001-mesh-positions"/>
|
||||||
</vertices>
|
</vertices>
|
||||||
<polylist material="Material_001-material" count="96">
|
<polylist material="Material_001_001-material" count="96">
|
||||||
<input semantic="VERTEX" source="#Plane-mesh-vertices" offset="0"/>
|
<input semantic="VERTEX" source="#Plane_001-mesh-vertices" offset="0"/>
|
||||||
<input semantic="NORMAL" source="#Plane-mesh-normals" offset="1"/>
|
<input semantic="NORMAL" source="#Plane_001-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 3 3 3 3 3 3 3 3 </vcount>
|
<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 3 3 3 3 3 3 3 3 </vcount>
|
||||||
<p>0 0 17 0 30 0 2 0 19 0 28 0 4 0 23 0 24 0 6 0 21 0 26 0 10 0 29 0 18 0 8 0 31 0 16 0 12 0 27 0 20 0 14 0 25 0 22 0 32 1 34 1 63 1 35 1 37 1 62 1 40 1 42 1 60 1 38 1 43 1 61 1 48 1 52 1 57 1 50 1 53 1 56 1 46 1 54 1 58 1 44 1 55 1 59 1 27 2 58 2 20 2 10 3 49 3 13 3 31 2 56 2 16 2 8 3 51 3 15 3 1 4 32 4 17 4 29 2 57 2 18 2 12 3 47 3 11 3 0 3 33 3 1 3 21 2 61 2 26 2 14 3 45 3 9 3 3 4 35 4 19 4 23 2 60 2 24 2 16 5 53 5 8 5 2 3 36 3 3 3 19 2 62 2 28 2 18 5 52 5 10 5 5 4 38 4 21 4 17 2 63 2 30 2 20 5 54 5 12 5 7 4 40 4 23 4 22 5 55 5 14 5 4 3 41 3 7 3 24 5 42 5 4 5 6 3 39 3 5 3 26 5 43 5 6 5 9 4 44 4 25 4 28 5 37 5 2 5 11 4 46 4 27 4 30 5 34 5 0 5 13 4 48 4 29 4 25 2 59 2 22 2 15 4 50 4 31 4 0 0 1 0 17 0 2 0 3 0 19 0 4 0 7 0 23 0 6 0 5 0 21 0 10 0 13 0 29 0 8 0 15 0 31 0 12 0 11 0 27 0 14 0 9 0 25 0 32 1 33 1 34 1 35 1 36 1 37 1 40 1 41 1 42 1 38 1 39 1 43 1 48 1 49 1 52 1 50 1 51 1 53 1 46 1 47 1 54 1 44 1 45 1 55 1 27 2 46 2 58 2 10 3 52 3 49 3 31 2 50 2 56 2 8 3 53 3 51 3 1 4 33 4 32 4 29 2 48 2 57 2 12 3 54 3 47 3 0 3 34 3 33 3 21 2 38 2 61 2 14 3 55 3 45 3 3 4 36 4 35 4 23 2 40 2 60 2 16 5 56 5 53 5 2 3 37 3 36 3 19 2 35 2 62 2 18 5 57 5 52 5 5 4 39 4 38 4 17 2 32 2 63 2 20 5 58 5 54 5 7 4 41 4 40 4 22 5 59 5 55 5 4 3 42 3 41 3 24 5 60 5 42 5 6 3 43 3 39 3 26 5 61 5 43 5 9 4 45 4 44 4 28 5 62 5 37 5 11 4 47 4 46 4 30 5 63 5 34 5 13 4 49 4 48 4 25 2 44 2 59 2 15 4 51 4 50 4</p>
|
<p>0 0 17 0 30 0 2 0 19 0 28 0 4 0 23 0 24 0 6 0 21 0 26 0 10 0 29 0 18 0 8 0 31 0 16 0 12 0 27 0 20 0 14 0 25 0 22 0 32 1 34 1 63 1 35 1 37 1 62 1 40 1 42 1 60 1 38 1 43 1 61 1 48 1 52 1 57 1 50 1 53 1 56 1 46 1 54 1 58 1 44 1 55 1 59 1 27 2 58 2 20 2 10 3 49 3 13 3 31 2 56 2 16 2 8 3 51 3 15 3 1 4 32 4 17 4 29 2 57 2 18 2 12 3 47 3 11 3 0 3 33 3 1 3 21 2 61 2 26 2 14 3 45 3 9 3 3 4 35 4 19 4 23 2 60 2 24 2 16 5 53 5 8 5 2 3 36 3 3 3 19 2 62 2 28 2 18 5 52 5 10 5 5 4 38 4 21 4 17 2 63 2 30 2 20 5 54 5 12 5 7 4 40 4 23 4 22 5 55 5 14 5 4 3 41 3 7 3 24 5 42 5 4 5 6 3 39 3 5 3 26 5 43 5 6 5 9 4 44 4 25 4 28 5 37 5 2 5 11 4 46 4 27 4 30 5 34 5 0 5 13 4 48 4 29 4 25 2 59 2 22 2 15 4 50 4 31 4 0 0 1 0 17 0 2 0 3 0 19 0 4 0 7 0 23 0 6 0 5 0 21 0 10 0 13 0 29 0 8 0 15 0 31 0 12 0 11 0 27 0 14 0 9 0 25 0 32 1 33 1 34 1 35 1 36 1 37 1 40 1 41 1 42 1 38 1 39 1 43 1 48 1 49 1 52 1 50 1 51 1 53 1 46 1 47 1 54 1 44 1 45 1 55 1 27 2 46 2 58 2 10 3 52 3 49 3 31 2 50 2 56 2 8 3 53 3 51 3 1 4 33 4 32 4 29 2 48 2 57 2 12 3 54 3 47 3 0 3 34 3 33 3 21 2 38 2 61 2 14 3 55 3 45 3 3 4 36 4 35 4 23 2 40 2 60 2 16 5 56 5 53 5 2 3 37 3 36 3 19 2 35 2 62 2 18 5 57 5 52 5 5 4 39 4 38 4 17 2 32 2 63 2 20 5 58 5 54 5 7 4 41 4 40 4 22 5 59 5 55 5 4 3 42 3 41 3 24 5 60 5 42 5 6 3 43 3 39 3 26 5 61 5 43 5 9 4 45 4 44 4 28 5 62 5 37 5 11 4 47 4 46 4 30 5 63 5 34 5 13 4 49 4 48 4 25 2 44 2 59 2 15 4 51 4 50 4</p>
|
||||||
</polylist>
|
</polylist>
|
||||||
@@ -84,10 +84,10 @@
|
|||||||
<visual_scene id="Scene" name="Scene">
|
<visual_scene id="Scene" name="Scene">
|
||||||
<node id="Plane" name="Plane" type="NODE">
|
<node id="Plane" name="Plane" type="NODE">
|
||||||
<matrix sid="transform">0.125 0 0 0 0 5.333333 0 -0.3333333 0 0 1 0.01986987 0 0 0 1</matrix>
|
<matrix sid="transform">0.125 0 0 0 0 5.333333 0 -0.3333333 0 0 1 0.01986987 0 0 0 1</matrix>
|
||||||
<instance_geometry url="#Plane-mesh" name="Plane">
|
<instance_geometry url="#Plane_001-mesh" name="Plane">
|
||||||
<bind_material>
|
<bind_material>
|
||||||
<technique_common>
|
<technique_common>
|
||||||
<instance_material symbol="Material_001-material" target="#Material_001-material"/>
|
<instance_material symbol="Material_001_001-material" target="#Material_001_001-material"/>
|
||||||
</technique_common>
|
</technique_common>
|
||||||
</bind_material>
|
</bind_material>
|
||||||
</instance_geometry>
|
</instance_geometry>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user