mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Experimented with parallel camera in 3d gameview. Works ok for rendering boats in isometric view.
#test
This commit is contained in:
@@ -7,7 +7,7 @@ package seng302.visualiser.fxObjects.assets_3D;
|
||||
*/
|
||||
public enum BoatMeshType {
|
||||
|
||||
DINGHY ("dinghy_hull.stl", "dinghy_mast.stl", 0, "dinghy_sail.stl", -1.36653);
|
||||
DINGHY ("dinghy_hull.stl", "dinghy_mast.stl", -1.36653, "dinghy_sail.stl", -1.36653);
|
||||
|
||||
final String hullFile, mastFile, sailFile;
|
||||
final double mastOffset, sailOffset;
|
||||
|
||||
@@ -33,14 +33,14 @@ public class BoatModel extends Model {
|
||||
* Rotates the sail of this model by the given amount.
|
||||
* @param degrees The rotation of the sail in degrees
|
||||
*/
|
||||
public void RotateSail(double degrees) {
|
||||
public void rotateSail(double degrees) {
|
||||
MeshView mast = getMeshViewChild(MAST_INDEX);
|
||||
MeshView sail = getMeshViewChild(SAIL_INDEX);
|
||||
mast.getTransforms().setAll(
|
||||
new Rotate(degrees, meshType.mastOffset, 0,0, new Point3D(0, 0, 1))
|
||||
new Rotate(degrees, -meshType.mastOffset, 0,0, new Point3D(0, 0, 1))
|
||||
);
|
||||
sail.getTransforms().setAll(
|
||||
new Rotate(degrees, meshType.sailOffset, 0,0, new Point3D(0, 0, 1))
|
||||
new Rotate(degrees, -meshType.sailOffset, 0,0, new Point3D(0, 0, 1))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user