mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2024-11-28 20:09:45 +01:00
added last boat und finished task 9
This commit is contained in:
parent
70ed981ea2
commit
2b8bfb82ba
@ -35,7 +35,9 @@ import static pp.util.FloatMath.PI;
|
|||||||
class SeaSynchronizer extends ShipMapSynchronizer {
|
class SeaSynchronizer extends ShipMapSynchronizer {
|
||||||
private static final String UNSHADED = "Common/MatDefs/Misc/Unshaded.j3md"; //NON-NLS
|
private static final String UNSHADED = "Common/MatDefs/Misc/Unshaded.j3md"; //NON-NLS
|
||||||
|
|
||||||
|
|
||||||
private static final String UX23 = "Models/UX23/UX23.j3o";
|
private static final String UX23 = "Models/UX23/UX23.j3o";
|
||||||
|
private static final String BOJE = "Models/Boje/Boje.j3o";
|
||||||
|
|
||||||
private static final String ALIENSHIP = "Models/Alienship/Alienship.j3o";
|
private static final String ALIENSHIP = "Models/Alienship/Alienship.j3o";
|
||||||
private static final String MARLOW66 = "Models/Marlow66/Marlow66.j3o";
|
private static final String MARLOW66 = "Models/Marlow66/Marlow66.j3o";
|
||||||
@ -149,6 +151,9 @@ class SeaSynchronizer extends ShipMapSynchronizer {
|
|||||||
switch (ship.getLength()) {
|
switch (ship.getLength()) {
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
|
return createBoje(ship);
|
||||||
|
|
||||||
|
case 2:
|
||||||
return createUX23(ship);
|
return createUX23(ship);
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
@ -166,7 +171,7 @@ class SeaSynchronizer extends ShipMapSynchronizer {
|
|||||||
final Spatial model = app.getAssetManager().loadModel(ALIENSHIP);
|
final Spatial model = app.getAssetManager().loadModel(ALIENSHIP);
|
||||||
|
|
||||||
model.rotate(-HALF_PI, calculateRotationAngle(ship.getRot()), 0f);
|
model.rotate(-HALF_PI, calculateRotationAngle(ship.getRot()), 0f);
|
||||||
model.scale(0.0005f);
|
model.scale(0.05f);
|
||||||
model.setShadowMode(ShadowMode.CastAndReceive);
|
model.setShadowMode(ShadowMode.CastAndReceive);
|
||||||
|
|
||||||
return model;}
|
return model;}
|
||||||
@ -175,7 +180,7 @@ class SeaSynchronizer extends ShipMapSynchronizer {
|
|||||||
|
|
||||||
model.rotate(-HALF_PI, calculateRotationAngle(ship.getRot()), 0f);
|
model.rotate(-HALF_PI, calculateRotationAngle(ship.getRot()), 0f);
|
||||||
// model.move(0f, -0.05f, 0f);
|
// model.move(0f, -0.05f, 0f);
|
||||||
model.scale(0.0027f);
|
model.scale(0.27f);
|
||||||
model.setShadowMode(ShadowMode.CastAndReceive);
|
model.setShadowMode(ShadowMode.CastAndReceive);
|
||||||
|
|
||||||
return model;
|
return model;
|
||||||
@ -187,12 +192,22 @@ class SeaSynchronizer extends ShipMapSynchronizer {
|
|||||||
|
|
||||||
model.rotate(0f, calculateRotationAngle(ship.getRot()), 0f);
|
model.rotate(0f, calculateRotationAngle(ship.getRot()), 0f);
|
||||||
model.move(0f, 0.25f, 0f);
|
model.move(0f, 0.25f, 0f);
|
||||||
model.scale(0.0085f);
|
model.scale(0.0185f);
|
||||||
model.setShadowMode(ShadowMode.CastAndReceive);
|
model.setShadowMode(ShadowMode.CastAndReceive);
|
||||||
|
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Spatial createBoje(Battleship ship) {
|
||||||
|
final Spatial model = app.getAssetManager().loadModel(BOJE);
|
||||||
|
|
||||||
|
model.rotate(0f, calculateRotationAngle(ship.getRot()), 0f);
|
||||||
|
model.move(0.25f, 0.00f, 0.25f);
|
||||||
|
model.scale(1.1f);
|
||||||
|
model.setShadowMode(ShadowMode.CastAndReceive);
|
||||||
|
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Binary file not shown.
@ -45,7 +45,7 @@ public class ModelExporter extends SimpleApplication {
|
|||||||
export("Models/Alienship/Alienship.obj", "Alienship.j3o");//NON-NLS
|
export("Models/Alienship/Alienship.obj", "Alienship.j3o");//NON-NLS
|
||||||
export("Models/Marlow66/Marlow66.obj", "Marlow66.j3o");//NON-NLS
|
export("Models/Marlow66/Marlow66.obj", "Marlow66.j3o");//NON-NLS
|
||||||
export("Models/UX23/UX23.obj", "UX23.j3o");//NON-NLS
|
export("Models/UX23/UX23.obj", "UX23.j3o");//NON-NLS
|
||||||
export("Models/KingGeorgeV/King_George_V.obj", "KingGeorgeV.j3o");//NON-NLS
|
export("Models/Boje/Boje.obj", "Boje.j3o");//NON-NLS
|
||||||
|
|
||||||
stop();
|
stop();
|
||||||
}
|
}
|
||||||
|
20188
Projekte/battleship/converter/src/main/resources/Models/Boje/Boje.obj
Normal file
20188
Projekte/battleship/converter/src/main/resources/Models/Boje/Boje.obj
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user