|
|
|
|
@ -255,7 +255,10 @@ public class RaceController extends Controller {
|
|
|
|
|
Material markColor = new PhongMaterial(new Color(0.15,0.9,0.2,1));
|
|
|
|
|
CompoundMark nextMark = boat.getCurrentLeg().getEndCompoundMark();
|
|
|
|
|
view3D.getShape(nextMark.getMark1().getSourceID()).setMaterial(markColor);
|
|
|
|
|
if(nextMark.getMark2() != null) {
|
|
|
|
|
view3D.getShape(nextMark.getMark2().getSourceID()).setMaterial(markColor);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
boat.legProperty().addListener((o, prev, curr) -> swapColours(curr));
|
|
|
|
|
}
|
|
|
|
|
// Fix initial bird's-eye position
|
|
|
|
|
@ -315,18 +318,23 @@ public class RaceController extends Controller {
|
|
|
|
|
CompoundMark end = leg.getEndCompoundMark();
|
|
|
|
|
|
|
|
|
|
Shape3D start1 = view3D.getShape(start.getMark1().getSourceID());
|
|
|
|
|
Shape3D start2 = view3D.getShape(start.getMark2().getSourceID());
|
|
|
|
|
Shape3D end1 = view3D.getShape(end.getMark1().getSourceID());
|
|
|
|
|
Shape3D end2 = view3D.getShape(end.getMark2().getSourceID());
|
|
|
|
|
|
|
|
|
|
Material nextMark = start1.getMaterial();
|
|
|
|
|
Material lastMark = end1.getMaterial();
|
|
|
|
|
|
|
|
|
|
start1.setMaterial(lastMark);
|
|
|
|
|
if(start.getMark2() != null) {
|
|
|
|
|
Shape3D start2 = view3D.getShape(start.getMark2().getSourceID());
|
|
|
|
|
start2.setMaterial(lastMark);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
end1.setMaterial(nextMark);
|
|
|
|
|
if(end.getMark2() != null) {
|
|
|
|
|
Shape3D end2 = view3D.getShape(end.getMark2().getSourceID());
|
|
|
|
|
end2.setMaterial(nextMark);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Initialises the frame rate functionality. This allows for toggling the frame rate, and connect the fps label to the race's fps property.
|
|
|
|
|
|