Added ocean object

This commit is contained in:
Calum
2017-09-09 12:34:08 +12:00
parent c2c3c9eb53
commit 0e2946f20b
4 changed files with 118 additions and 4 deletions
@@ -6,13 +6,11 @@ import javafx.animation.AnimationTimer;
import javafx.geometry.Point3D;
import javafx.scene.AmbientLight;
import javafx.scene.Group;
import javafx.scene.Node;
import javafx.scene.paint.Color;
import javafx.scene.paint.PhongMaterial;
import javafx.scene.shape.MeshView;
import javafx.scene.transform.Rotate;
import javafx.scene.transform.Scale;
import seng302.model.token.TokenType;
/**
* Factory class for creating 3D models of boats.
@@ -89,6 +87,8 @@ public class ModelFactory {
case PLAIN_MARKER:
case START_MARKER:
return makeMarker(assets);
case OCEAN:
return makeOcean(assets);
default:
return new Model(assets, null);
}
@@ -121,4 +121,10 @@ public class ModelFactory {
area.getTransforms().add(new Rotate(90, new Point3D(1, 0, 0)));
return new Model(area, null);
}
private static Model makeOcean(Group plane) {
plane.setScaleY(100);
plane.setScaleX(100);
return new Model(plane, null);
}
}
@@ -10,7 +10,8 @@ public enum ModelType {
FINISH_MARKER ("finish_marker.dae"),
START_MARKER ("start_marker.dae"),
PLAIN_MARKER ("plain_marker.dae"),
MARK_AREA ("mark_area.dae");
MARK_AREA ("mark_area.dae"),
OCEAN ("ocean.dae");
final String filename;