Fixed issue where wind arrow, accordion, time, etc. were not being displayed. Fixed issue where zooming would crash when done outside of tutorial. #story[1189]

main
David Wu 8 years ago
parent bad6422ca9
commit 9a96131a33

@ -12,6 +12,7 @@ import javafx.scene.chart.LineChart;
import javafx.scene.control.*; import javafx.scene.control.*;
import javafx.scene.input.KeyCode; import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent; import javafx.scene.input.KeyEvent;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.GridPane; import javafx.scene.layout.GridPane;
import javafx.scene.layout.StackPane; import javafx.scene.layout.StackPane;
import javafx.scene.shape.MeshView; import javafx.scene.shape.MeshView;
@ -83,6 +84,7 @@ public class RaceController extends Controller {
@FXML private SplitPane racePane; @FXML private SplitPane racePane;
/** /**
* This is the pane we place the actual arrow control inside of. * This is the pane we place the actual arrow control inside of.
*/ */
@ -209,6 +211,7 @@ public class RaceController extends Controller {
view3D.setYaw(0); view3D.setYaw(0);
view3D.setPitch(60); view3D.setPitch(60);
view3D.enableTracking(); view3D.enableTracking();
//newPane.getChildren().add(view3D);
canvasBase.add(view3D, 0, 0); canvasBase.add(view3D, 0, 0);
// Set up projection from GPS to view // Set up projection from GPS to view
@ -255,21 +258,25 @@ public class RaceController extends Controller {
if(key != null) { if(key != null) {
switch (key.toString()) { switch (key.toString()) {
case "Zoom In": case "Zoom In":
if (currentState.equals(TutorialState.ZOOMIN)) { if (isTutorial) {
try { if (currentState.equals(TutorialState.ZOOMIN)) {
checkTutorialState(); try {
} catch (Exception e1) { checkTutorialState();
e1.printStackTrace(); } catch (Exception e1) {
e1.printStackTrace();
}
} }
} }
view3D.updateDistance(-10); view3D.updateDistance(-10);
break; break;
case "Zoom Out": case "Zoom Out":
if (currentState.equals(TutorialState.ZOOMOUT)) { if(isTutorial) {
try { if (currentState.equals(TutorialState.ZOOMOUT)) {
checkTutorialState(); try {
} catch (Exception e1) { checkTutorialState();
e1.printStackTrace(); } catch (Exception e1) {
e1.printStackTrace();
}
} }
} }
view3D.updateDistance(10); view3D.updateDistance(10);

@ -17,8 +17,8 @@
<Mark SeqId="2" Name="PIN" TargetLat="32.290148" TargetLng="-64.854996" SourceID="102"/> <Mark SeqId="2" Name="PIN" TargetLat="32.290148" TargetLng="-64.854996" SourceID="102"/>
</CompoundMark> </CompoundMark>
<CompoundMark CompoundMarkID="2" Name="Finish Line"> <CompoundMark CompoundMarkID="2" Name="Finish Line">
<Mark Name="FL" SeqId="1" TargetLat="32.315911" TargetLng="-64.846996" SourceID="108"/> <Mark Name="FL" SeqId="1" TargetLat="42.315911" TargetLng="-64.846996" SourceID="108"/>
<Mark Name="FR" SeqId="2" TargetLat="32.315911" TargetLng="-64.848996" SourceID="109"/> <Mark Name="FR" SeqId="2" TargetLat="42.315911" TargetLng="-64.848996" SourceID="109"/>
</CompoundMark> </CompoundMark>
</Course> </Course>
<CourseLimit> <CourseLimit>

@ -30,81 +30,88 @@
<SplitPane fx:id="racePane" dividerPositions="1.0" prefHeight="431.0" prefWidth="610.0" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="visualiser.Controllers.RaceController"> <SplitPane fx:id="racePane" dividerPositions="1.0" prefHeight="431.0" prefWidth="610.0" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="visualiser.Controllers.RaceController">
<items> <items>
<GridPane fx:id="canvasBase"> <StackPane fx:id="newPane" prefHeight="150.0" prefWidth="200.0">
<columnConstraints> <children>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" /> <AnchorPane>
</columnConstraints> <children>
<rowConstraints> <GridPane fx:id="canvasBase" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> <columnConstraints>
</rowConstraints> <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" />
<children> </columnConstraints>
<Pane prefHeight="200.0" prefWidth="400.0" GridPane.halignment="LEFT" GridPane.valignment="TOP"> <rowConstraints>
<children> <RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
<Accordion> </rowConstraints>
<panes> </GridPane>
<TitledPane animated="false" prefHeight="395.0" prefWidth="222.0" text="Annotation Control"> <Pane prefHeight="200.0" prefWidth="400.0">
<content> <children>
<AnchorPane fx:id="annotationPane" minHeight="0.0" minWidth="0.0"> <Accordion>
<children> <panes>
<CheckBox fx:id="showName" layoutY="39.0" mnemonicParsing="false" selected="true" text="Show Boat Name" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="0.0" /> <TitledPane animated="false" prefHeight="395.0" prefWidth="222.0" text="Annotation Control">
<CheckBox fx:id="showAbbrev" layoutY="61.0" mnemonicParsing="false" selected="true" text="Show Boat Abbreviation" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="25.0" /> <content>
<CheckBox fx:id="showSpeed" layoutY="90.0" mnemonicParsing="false" selected="true" text="Show Boat Speed" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="50.0" /> <AnchorPane fx:id="annotationPane" minHeight="0.0" minWidth="0.0">
<CheckBox fx:id="showBoatPath" mnemonicParsing="false" selected="true" text="Show Boat Paths" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="75.0" /> <children>
<CheckBox fx:id="showTime" mnemonicParsing="false" selected="true" text="Show Boat Leg Time" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="100.0" /> <CheckBox fx:id="showName" layoutY="39.0" mnemonicParsing="false" selected="true" text="Show Boat Name" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="0.0" />
<CheckBox fx:id="showEstTime" mnemonicParsing="false" selected="true" text="Show Est. Time to Next Mark" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="125.0" /> <CheckBox fx:id="showAbbrev" layoutY="61.0" mnemonicParsing="false" selected="true" text="Show Boat Abbreviation" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="25.0" />
<CheckBox fx:id="showGuideline" mnemonicParsing="false" text="Show Guideline" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="150.0" /> <CheckBox fx:id="showSpeed" layoutY="90.0" mnemonicParsing="false" selected="true" text="Show Boat Speed" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="50.0" />
<Separator layoutX="19.6" layoutY="175.6" prefHeight="0.0" prefWidth="200.0" AnchorPane.leftAnchor="10.0" AnchorPane.topAnchor="175.0" /> <CheckBox fx:id="showBoatPath" mnemonicParsing="false" selected="true" text="Show Boat Paths" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="75.0" />
<Label text="Annotations" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="175.0" /> <CheckBox fx:id="showTime" mnemonicParsing="false" selected="true" text="Show Boat Leg Time" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="100.0" />
<RadioButton fx:id="hideAnnoRBtn" mnemonicParsing="false" text="Hidden" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="200.0"> <CheckBox fx:id="showEstTime" mnemonicParsing="false" selected="true" text="Show Est. Time to Next Mark" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="125.0" />
<toggleGroup> <CheckBox fx:id="showGuideline" mnemonicParsing="false" text="Show Guideline" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="150.0" />
<ToggleGroup fx:id="annoToggleGroup" /> <Separator layoutX="19.6" layoutY="175.6" prefHeight="0.0" prefWidth="200.0" AnchorPane.leftAnchor="10.0" AnchorPane.topAnchor="175.0" />
</toggleGroup></RadioButton> <Label text="Annotations" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="175.0" />
<RadioButton fx:id="showAnnoRBtn" mnemonicParsing="false" text="Visible" toggleGroup="$annoToggleGroup" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="225.0" /> <RadioButton fx:id="hideAnnoRBtn" mnemonicParsing="false" text="Hidden" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="200.0">
<RadioButton fx:id="partialAnnoRBtn" mnemonicParsing="false" text="Partial" toggleGroup="$annoToggleGroup" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="250.0" /> <toggleGroup>
<RadioButton fx:id="importantAnnoRBtn" mnemonicParsing="false" text="Important" toggleGroup="$annoToggleGroup" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="275.0" /> <ToggleGroup fx:id="annoToggleGroup" />
<Button fx:id="saveAnno" layoutX="11.0" layoutY="126.0" mnemonicParsing="false" text="Save Important Annotations" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="300.0" /> </toggleGroup>
</children> </RadioButton>
</AnchorPane> <RadioButton fx:id="showAnnoRBtn" mnemonicParsing="false" text="Visible" toggleGroup="$annoToggleGroup" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="225.0" />
</content> <RadioButton fx:id="partialAnnoRBtn" mnemonicParsing="false" text="Partial" toggleGroup="$annoToggleGroup" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="250.0" />
</TitledPane> <RadioButton fx:id="importantAnnoRBtn" mnemonicParsing="false" text="Important" toggleGroup="$annoToggleGroup" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="275.0" />
<TitledPane animated="false" text="FPS Control"> <Button fx:id="saveAnno" layoutX="11.0" layoutY="126.0" mnemonicParsing="false" text="Save Important Annotations" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="300.0" />
<content> </children>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0"> </AnchorPane>
<children> </content>
<CheckBox fx:id="showFPS" layoutX="-14.0" layoutY="13.0" mnemonicParsing="false" selected="true" text="Show FPS" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="0.0" /> </TitledPane>
</children> <TitledPane animated="false" text="FPS Control">
</AnchorPane> <content>
</content> <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">
</TitledPane> <children>
</panes> <CheckBox fx:id="showFPS" layoutX="-14.0" layoutY="13.0" mnemonicParsing="false" selected="true" text="Show FPS" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="0.0" />
</Accordion> </children>
</children> </AnchorPane>
</Pane> </content>
<Label fx:id="timer" layoutX="45.0" layoutY="146.0" maxHeight="20.0" text="0:0" AnchorPane.bottomAnchor="0.0" AnchorPane.rightAnchor="0.0" GridPane.halignment="RIGHT" GridPane.valignment="BOTTOM"> </TitledPane>
<font> </panes>
<Font name="System Bold" size="15.0" /> </Accordion>
</font> </children>
</Label> </Pane>
<Label fx:id="FPS" text="FPS: 0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" GridPane.halignment="LEFT" GridPane.valignment="BOTTOM"> <Label fx:id="timer" maxHeight="20.0" text="0:0" AnchorPane.bottomAnchor="0.0" AnchorPane.rightAnchor="0.0">
<font> <font>
<Font name="System Bold" size="15.0" /> <Font name="System Bold" size="15.0" />
</font> </font>
</Label> </Label>
<Label fx:id="timeZone" text="Label" GridPane.halignment="RIGHT" GridPane.valignment="BOTTOM"> <Label fx:id="FPS" text="FPS: 0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0">
<GridPane.margin> <font>
<Font name="System Bold" size="15.0" />
</font>
</Label>
<Label fx:id="timeZone" text="Label" AnchorPane.bottomAnchor="0.0" AnchorPane.rightAnchor="0.0">
<font>
<Font name="System Bold" size="15.0" />
</font>
<padding>
<Insets bottom="20.0" /> <Insets bottom="20.0" />
</GridPane.margin> </padding>
<font> </Label>
<Font name="System Bold" size="15.0" /> <StackPane fx:id="arrowPane" alignment="TOP_RIGHT" mouseTransparent="true" prefHeight="150.0" prefWidth="150.0" snapToPixel="false" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
</font> <children>
</Label> <fx:include fx:id="arrow" source="arrow.fxml" />
<StackPane fx:id="arrowPane" alignment="TOP_RIGHT" mouseTransparent="true" prefHeight="150.0" prefWidth="150.0" snapToPixel="false"> </children>
<children> </StackPane>
<fx:include fx:id="arrow" source="arrow.fxml" /> </children>
</children> </AnchorPane>
</StackPane> </children>
</children> </StackPane>
</GridPane>
<AnchorPane layoutX="450.0" minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="200.0" GridPane.columnIndex="1"> <AnchorPane layoutX="450.0" minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="200.0" GridPane.columnIndex="1">
<children> <children>
<TableView fx:id="boatInfoTable" layoutX="-2.0" prefHeight="265.0" prefWidth="242.0" AnchorPane.bottomAnchor="164.0" AnchorPane.leftAnchor="-2.0" AnchorPane.rightAnchor="-62.0" AnchorPane.topAnchor="0.0"> <TableView fx:id="boatInfoTable" layoutX="-2.0" prefHeight="265.0" prefWidth="242.0" AnchorPane.bottomAnchor="164.0" AnchorPane.leftAnchor="-2.0" AnchorPane.rightAnchor="-62.0" AnchorPane.topAnchor="0.0">

Loading…
Cancel
Save