Added View3D control for rendering 3D shapes under a PerspectiveCamera, which is not currently working.
#story[1196]
This commit is contained in:
@@ -6,8 +6,10 @@ import javafx.scene.control.ButtonType;
|
||||
import javafx.scene.control.SplitPane;
|
||||
import javafx.scene.image.ImageView;
|
||||
import javafx.scene.layout.AnchorPane;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import mock.app.Event;
|
||||
import mock.exceptions.EventConstructionException;
|
||||
import visualiser.model.View3D;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.Socket;
|
||||
@@ -44,11 +46,18 @@ public class HostController extends Controller {
|
||||
@FXML
|
||||
AnchorPane specPane;
|
||||
|
||||
@FXML
|
||||
GridPane playerContainer;
|
||||
|
||||
private Event game;
|
||||
|
||||
private View3D fancyStuff;
|
||||
|
||||
@Override
|
||||
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 {
|
||||
|
||||
@FXML
|
||||
AnchorPane lobbyWrapper;
|
||||
private AnchorPane lobbyWrapper;
|
||||
@FXML
|
||||
private TableView<RaceConnection> lobbyTable;
|
||||
@FXML
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
package visualiser.Controllers;
|
||||
|
||||
import javafx.animation.AnimationTimer;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Group;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.RadioButton;
|
||||
import javafx.scene.layout.AnchorPane;
|
||||
import javafx.scene.layout.Pane;
|
||||
import javafx.scene.shape.Box;
|
||||
import javafx.scene.shape.CullFace;
|
||||
import javafx.scene.transform.Rotate;
|
||||
import javafx.stage.Modality;
|
||||
import javafx.stage.Stage;
|
||||
import visualiser.app.App;
|
||||
@@ -38,8 +32,6 @@ public class TitleController extends Controller {
|
||||
@FXML
|
||||
RadioButton nightModeRD;
|
||||
|
||||
Group group3d;
|
||||
|
||||
/**
|
||||
* Method called when the 'host a game' button is pressed.
|
||||
* Opens the next window allowing a user to host their own game.
|
||||
@@ -89,31 +81,6 @@ public class TitleController extends Controller {
|
||||
|
||||
@Override
|
||||
public void initialize(URL location, ResourceBundle resources) {
|
||||
System.out.println("Initializing...");
|
||||
|
||||
Box 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);
|
||||
Rotate rx = new Rotate(20, 0, 0, 0, Rotate.X_AXIS);
|
||||
box.getTransforms().add(ry);
|
||||
box.getTransforms().add(rx);
|
||||
|
||||
group3d = new Group(box);
|
||||
|
||||
titleWrapper.getChildren().add(0, group3d);
|
||||
group3d.toFront();
|
||||
|
||||
AnimationTimer rotation = new AnimationTimer() {
|
||||
@Override
|
||||
public void handle(long now) {
|
||||
ry.setAngle(ry.getAngle() + 0.1);
|
||||
}
|
||||
};
|
||||
|
||||
rotation.start();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user