added last boat und finished task 9

This commit is contained in:
Tamino Mueller 2024-10-11 02:47:38 +02:00
parent 70ed981ea2
commit 2b8bfb82ba
7 changed files with 20207 additions and 4 deletions

View File

@ -35,7 +35,9 @@ import static pp.util.FloatMath.PI;
class SeaSynchronizer extends ShipMapSynchronizer {
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 BOJE = "Models/Boje/Boje.j3o";
private static final String ALIENSHIP = "Models/Alienship/Alienship.j3o";
private static final String MARLOW66 = "Models/Marlow66/Marlow66.j3o";
@ -149,6 +151,9 @@ class SeaSynchronizer extends ShipMapSynchronizer {
switch (ship.getLength()) {
case 1:
return createBoje(ship);
case 2:
return createUX23(ship);
case 3:
@ -166,7 +171,7 @@ class SeaSynchronizer extends ShipMapSynchronizer {
final Spatial model = app.getAssetManager().loadModel(ALIENSHIP);
model.rotate(-HALF_PI, calculateRotationAngle(ship.getRot()), 0f);
model.scale(0.0005f);
model.scale(0.05f);
model.setShadowMode(ShadowMode.CastAndReceive);
return model;}
@ -175,7 +180,7 @@ class SeaSynchronizer extends ShipMapSynchronizer {
model.rotate(-HALF_PI, calculateRotationAngle(ship.getRot()), 0f);
// model.move(0f, -0.05f, 0f);
model.scale(0.0027f);
model.scale(0.27f);
model.setShadowMode(ShadowMode.CastAndReceive);
return model;
@ -187,12 +192,22 @@ class SeaSynchronizer extends ShipMapSynchronizer {
model.rotate(0f, calculateRotationAngle(ship.getRot()), 0f);
model.move(0f, 0.25f, 0f);
model.scale(0.0085f);
model.scale(0.0185f);
model.setShadowMode(ShadowMode.CastAndReceive);
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;
}
/**

View File

@ -45,7 +45,7 @@ public class ModelExporter extends SimpleApplication {
export("Models/Alienship/Alienship.obj", "Alienship.j3o");//NON-NLS
export("Models/Marlow66/Marlow66.obj", "Marlow66.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();
}

File diff suppressed because it is too large Load Diff