Merge branch 'story86-3D' into story77_lobby
# Conflicts: # racevisionGame/src/main/resources/visualiser/scenes/hostlobby.fxml
This commit is contained in:
+10
-1
@@ -54,6 +54,11 @@
|
|||||||
<version>9.0</version>
|
<version>9.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>InteractiveMesh</groupId>
|
||||||
|
<artifactId>STLImporter</artifactId>
|
||||||
|
<version>0_4_1</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
@@ -72,7 +77,11 @@
|
|||||||
<url>http://download.osgeo.org/webdav/geotools/</url>
|
<url>http://download.osgeo.org/webdav/geotools/</url>
|
||||||
</repository>
|
</repository>
|
||||||
|
|
||||||
|
<repository>
|
||||||
|
<id>interactivemesh</id>
|
||||||
|
<name>Interactive Mesh </name>
|
||||||
|
<url>http://umbrasheep.com:8888/repository/internal/</url>
|
||||||
|
</repository>
|
||||||
|
|
||||||
|
|
||||||
</repositories>
|
</repositories>
|
||||||
|
|||||||
@@ -6,8 +6,10 @@ import javafx.scene.control.ButtonType;
|
|||||||
import javafx.scene.control.SplitPane;
|
import javafx.scene.control.SplitPane;
|
||||||
import javafx.scene.image.ImageView;
|
import javafx.scene.image.ImageView;
|
||||||
import javafx.scene.layout.AnchorPane;
|
import javafx.scene.layout.AnchorPane;
|
||||||
|
import javafx.scene.layout.GridPane;
|
||||||
import mock.app.Event;
|
import mock.app.Event;
|
||||||
import mock.exceptions.EventConstructionException;
|
import mock.exceptions.EventConstructionException;
|
||||||
|
import visualiser.model.View3D;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
@@ -44,11 +46,18 @@ public class HostController extends Controller {
|
|||||||
@FXML
|
@FXML
|
||||||
AnchorPane specPane;
|
AnchorPane specPane;
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
GridPane playerContainer;
|
||||||
|
|
||||||
private Event game;
|
private Event game;
|
||||||
|
|
||||||
|
private View3D fancyStuff;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initialize(URL location, ResourceBundle resources) {
|
public void initialize(URL location, ResourceBundle resources) {
|
||||||
|
fancyStuff = new View3D();
|
||||||
|
playerContainer.add(fancyStuff, 0,0);
|
||||||
|
fancyStuff.spinBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import java.util.ResourceBundle;
|
|||||||
public class LobbyController extends Controller {
|
public class LobbyController extends Controller {
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
AnchorPane lobbyWrapper;
|
private AnchorPane lobbyWrapper;
|
||||||
@FXML
|
@FXML
|
||||||
private TableView<RaceConnection> lobbyTable;
|
private TableView<RaceConnection> lobbyTable;
|
||||||
@FXML
|
@FXML
|
||||||
|
|||||||
@@ -81,7 +81,6 @@ public class TitleController extends Controller {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initialize(URL location, ResourceBundle resources) {
|
public void initialize(URL location, ResourceBundle resources) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package visualiser.model;
|
||||||
|
|
||||||
|
import com.interactivemesh.jfx.importer.Importer;
|
||||||
|
import javafx.scene.layout.Pane;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by fwy13 on 29/08/17.
|
||||||
|
*/
|
||||||
|
public class BoatDisplay3D extends Pane {
|
||||||
|
|
||||||
|
|
||||||
|
public BoatDisplay3D(String filePath){
|
||||||
|
super();
|
||||||
|
// Shape3D
|
||||||
|
// this.getChildren().add();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package visualiser.model;
|
||||||
|
|
||||||
|
import javafx.animation.AnimationTimer;
|
||||||
|
import javafx.scene.Group;
|
||||||
|
import javafx.scene.PerspectiveCamera;
|
||||||
|
import javafx.scene.SubScene;
|
||||||
|
import javafx.scene.layout.Pane;
|
||||||
|
import javafx.scene.shape.Box;
|
||||||
|
import javafx.scene.shape.CullFace;
|
||||||
|
import javafx.scene.transform.Rotate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by connortaylorbrown on 30/08/17.
|
||||||
|
*/
|
||||||
|
public class View3D extends Pane {
|
||||||
|
SubScene scene;
|
||||||
|
PerspectiveCamera camera;
|
||||||
|
Box box;
|
||||||
|
|
||||||
|
public View3D() {
|
||||||
|
scene = new SubScene(this, 500, 500);
|
||||||
|
camera = new PerspectiveCamera();
|
||||||
|
scene.setCamera(camera);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void spinBox() {
|
||||||
|
camera.getTransforms().add(new Rotate(-20, Rotate.X_AXIS));
|
||||||
|
|
||||||
|
box = new Box(50,50,50);
|
||||||
|
box.setTranslateX(100);
|
||||||
|
box.setTranslateY(100);
|
||||||
|
box.setCullFace(CullFace.BACK);
|
||||||
|
|
||||||
|
Rotate ry = new Rotate(0, 0,0,0, Rotate.Y_AXIS);
|
||||||
|
box.getTransforms().add(ry);
|
||||||
|
|
||||||
|
this.getChildren().add(camera);
|
||||||
|
this.getChildren().add(box);
|
||||||
|
|
||||||
|
AnimationTimer rotation = new AnimationTimer() {
|
||||||
|
@Override
|
||||||
|
public void handle(long now) {
|
||||||
|
ry.setAngle(ry.getAngle() + 0.1);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
rotation.start();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,9 +9,11 @@
|
|||||||
<?import javafx.geometry.Insets?>
|
<?import javafx.geometry.Insets?>
|
||||||
<?import javafx.scene.control.Button?>
|
<?import javafx.scene.control.Button?>
|
||||||
<?import javafx.scene.control.Label?>
|
<?import javafx.scene.control.Label?>
|
||||||
|
<?import javafx.scene.control.SplitPane?>
|
||||||
<?import javafx.scene.control.TableColumn?>
|
<?import javafx.scene.control.TableColumn?>
|
||||||
<?import javafx.scene.control.TableView?>
|
<?import javafx.scene.control.TableView?>
|
||||||
<?import javafx.scene.control.TextField?>
|
<?import javafx.scene.image.Image?>
|
||||||
|
<?import javafx.scene.image.ImageView?>
|
||||||
<?import javafx.scene.layout.AnchorPane?>
|
<?import javafx.scene.layout.AnchorPane?>
|
||||||
<?import javafx.scene.layout.ColumnConstraints?>
|
<?import javafx.scene.layout.ColumnConstraints?>
|
||||||
<?import javafx.scene.layout.GridPane?>
|
<?import javafx.scene.layout.GridPane?>
|
||||||
@@ -143,16 +145,27 @@
|
|||||||
<Insets left="20.0" />
|
<Insets left="20.0" />
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
</Button>
|
</Button>
|
||||||
<Button alignment="CENTER_RIGHT" contentDisplay="RIGHT" mnemonicParsing="false" onAction="#startBtnPressed" text="Start Game" GridPane.columnIndex="2" GridPane.halignment="RIGHT" GridPane.rowIndex="4">
|
<Button alignment="CENTER_RIGHT" contentDisplay="RIGHT" mnemonicParsing="false" onAction="#startBtnPressed" text="Start Game" GridPane.columnIndex="2" GridPane.halignment="RIGHT" GridPane.rowIndex="2">
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets right="20.0" />
|
<Insets right="20.0" />
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
</Button>
|
</Button>
|
||||||
<Label alignment="CENTER" contentDisplay="CENTER" text="Map: MapNameHere" textFill="WHITE" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="4">
|
<Label alignment="CENTER" contentDisplay="CENTER" text="Map: MapNameHere" textFill="WHITE" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="2">
|
||||||
<font>
|
<font>
|
||||||
<Font size="16.0" />
|
<Font size="16.0" />
|
||||||
</font>
|
</font>
|
||||||
</Label>
|
</Label>
|
||||||
|
<GridPane fx:id="playerContainer" GridPane.columnSpan="3" GridPane.rowIndex="1">
|
||||||
|
<columnConstraints>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||||
|
</columnConstraints>
|
||||||
|
<rowConstraints>
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
</rowConstraints>
|
||||||
|
</GridPane>
|
||||||
</children>
|
</children>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
<Label alignment="TOP_CENTER" text="Get Ready For The Next Race" textFill="#fffdfd" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="20.0">
|
<Label alignment="TOP_CENTER" text="Get Ready For The Next Race" textFill="#fffdfd" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="20.0">
|
||||||
|
|||||||
Reference in New Issue
Block a user