Removed dead code from fxObjects and GameView 3D

#chore
This commit is contained in:
Calum
2017-09-14 12:05:20 +12:00
parent 0a62c538ca
commit 20d73d8f2f
5 changed files with 24 additions and 18 deletions
@@ -6,6 +6,7 @@ import javafx.scene.paint.Color;
import javafx.scene.paint.Paint;
import javafx.scene.shape.Arc;
import javafx.scene.shape.ArcType;
import javafx.scene.shape.Circle;
import javafx.scene.shape.Polygon;
import javafx.scene.shape.Polyline;
import javafx.scene.shape.StrokeLineCap;
@@ -53,15 +54,18 @@ public class MarkArrowFactory {
public static Model constructExitArrow3D (
RoundingSide roundingSide, double angle, ModelType type) {
Model exitArrow = ModelFactory.importModel(type);
// angle = Math.toRadians(angle-65);
angle = Math.toRadians(angle);
int multiplier = roundingSide == RoundingSide.STARBOARD ? 1 : -1;
double xStart = multiplier * 5 * Math.sin(angle + Math.PI / 2);
double yStart = multiplier * 5 * Math.cos(angle + Math.PI / 2);
exitArrow.getAssets().getTransforms().addAll(
new Translate(xStart, yStart, 0),
new Rotate(Math.toDegrees(angle), new Point3D(0,0,1))
);
return exitArrow;
double xStart = multiplier * 6 * Math.sin(angle + Math.PI / 2);
double yStart = multiplier * 6 * Math.cos(angle + Math.PI / 2);
// exitArrow.getAssets().getTransforms().addAll(
// new Translate(xStart, yStart, 0),
// new Rotate(Math.toDegrees(Math.toDegrees(angle)), new Point3D(0,0,1))
// );
Circle c = new Circle(xStart, yStart, 1, Color.RED);
c.setStroke(Color.TRANSPARENT);
return new Model(new Group(c), null);
}
@@ -228,8 +228,7 @@ public class ModelFactory {
private static Model makeArrow(Group assets) {
assets.getTransforms().addAll(
new Rotate(90, new Point3D(1,0,0)),
new Scale(0.1, 0.1, 0.1)
new Rotate(90, new Point3D(1,0,0))
);
return new Model(new Group(assets), null);
}
@@ -21,8 +21,8 @@ public enum ModelType {
TRAIL_SEGMENT ("trail_segment.dae"),
PLAYER_IDENTIFIER ("player_identifier.dae"),
PLAIN_ARROW ("arrow.dae"),
START_ARROW ("finish_arrow.dae"),
FINISH_ARROW ("start_arrow.dae");
START_ARROW ("start_arrow.dae"),
FINISH_ARROW ("finish_arrow.dae");
final String filename;