mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2024-11-25 02:19:45 +01:00
added battlecruiser model
This commit is contained in:
parent
141d817421
commit
f02a3107a0
@ -37,6 +37,7 @@ class SeaSynchronizer extends ShipMapSynchronizer {
|
||||
private static final String KING_GEORGE_V_MODEL = "Models/KingGeorgeV/KingGeorgeV.j3o";//NON-NLS
|
||||
private static final String SMALL_BOAT_MODEL = "Models/BoatSmall/12219_boat_v2_L2.j3o";
|
||||
private static final String UBOAT_MODEL = "Models/UBoat/14084_WWII_Ship_German_Type_II_U-boat_v2_L1.j30";
|
||||
private static final String BATTLECRUISER_MODEL = "Models/Battlecruiser/10619_Battleship.j30";
|
||||
private static final String COLOR = "Color"; //NON-NLS
|
||||
private static final String SHIP = "ship"; //NON-NLS
|
||||
private static final String SHOT = "shot"; //NON-NLS
|
||||
@ -146,9 +147,11 @@ class SeaSynchronizer extends ShipMapSynchronizer {
|
||||
switch (ship.getLength()) {
|
||||
case 4:
|
||||
return createBattleship(ship);
|
||||
case 3:
|
||||
return createBattlecruiser(ship);
|
||||
|
||||
case 2:
|
||||
return createUBoat(ship);
|
||||
|
||||
case 1:
|
||||
return createSmallShip(ship);
|
||||
|
||||
@ -235,6 +238,15 @@ class SeaSynchronizer extends ShipMapSynchronizer {
|
||||
return model;
|
||||
}
|
||||
|
||||
private Spatial createBattlecruiser(Battleship ship) {
|
||||
final Spatial model = app.getAssetManager().loadModel(BATTLECRUISER_MODEL);
|
||||
|
||||
model.rotate(-HALF_PI, calculateRotationAngle(ship.getRot()), 0f);
|
||||
model.scale(0.0005f);
|
||||
model.setShadowMode(ShadowMode.CastAndReceive);
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates the rotation angle for the specified rotation.
|
||||
|
@ -0,0 +1,73 @@
|
||||
newmtl Battleship
|
||||
illum 4
|
||||
Kd 0.00 0.00 0.00
|
||||
Ka 0.00 0.00 0.00
|
||||
Tf 1.00 1.00 1.00
|
||||
map_Kd BattleshipC.jpg
|
||||
Ni 1.00
|
||||
Ks 0.00 0.00 0.00
|
||||
Ns 256.00
|
||||
newmtl blinn1SG
|
||||
illum 4
|
||||
Kd 0.50 0.50 0.50
|
||||
Ka 0.00 0.00 0.00
|
||||
Tf 1.00 1.00 1.00
|
||||
Ni 1.00
|
||||
Ks 0.00 0.00 0.00
|
||||
Ns 256.00
|
||||
newmtl blinn2SG
|
||||
illum 4
|
||||
Kd 0.50 0.50 0.50
|
||||
Ka 0.00 0.00 0.00
|
||||
Tf 1.00 1.00 1.00
|
||||
Ni 1.00
|
||||
Ks 0.00 0.00 0.00
|
||||
Ns 256.00
|
||||
newmtl blinn3SG
|
||||
illum 4
|
||||
Kd 0.50 0.50 0.50
|
||||
Ka 0.00 0.00 0.00
|
||||
Tf 1.00 1.00 1.00
|
||||
Ni 1.00
|
||||
Ks 0.50 0.50 0.50
|
||||
Ns 256.00
|
||||
newmtl blinn4SG
|
||||
illum 4
|
||||
Kd 0.50 0.50 0.50
|
||||
Ka 0.00 0.00 0.00
|
||||
Tf 1.00 1.00 1.00
|
||||
Ni 1.00
|
||||
Ks 0.50 0.50 0.50
|
||||
Ns 256.00
|
||||
newmtl blinn5SG
|
||||
illum 4
|
||||
Kd 0.50 0.50 0.50
|
||||
Ka 0.00 0.00 0.00
|
||||
Tf 1.00 1.00 1.00
|
||||
Ni 1.00
|
||||
Ks 0.50 0.50 0.50
|
||||
Ns 256.00
|
||||
newmtl blinn6SG
|
||||
illum 4
|
||||
Kd 0.50 0.50 0.50
|
||||
Ka 0.00 0.00 0.00
|
||||
Tf 1.00 1.00 1.00
|
||||
Ni 1.00
|
||||
Ks 0.50 0.50 0.50
|
||||
Ns 256.00
|
||||
newmtl blinn7SG
|
||||
illum 4
|
||||
Kd 0.50 0.50 0.50
|
||||
Ka 0.00 0.00 0.00
|
||||
Tf 1.00 1.00 1.00
|
||||
Ni 1.00
|
||||
Ks 0.50 0.50 0.50
|
||||
Ns 256.00
|
||||
newmtl blinn8SG
|
||||
illum 4
|
||||
Kd 0.50 0.50 0.50
|
||||
Ka 0.00 0.00 0.00
|
||||
Tf 1.00 1.00 1.00
|
||||
Ni 1.00
|
||||
Ks 0.50 0.50 0.50
|
||||
Ns 256.00
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
After Width: | Height: | Size: 360 KiB |
@ -44,6 +44,7 @@ public class ModelExporter extends SimpleApplication {
|
||||
export("Models/KingGeorgeV/King_George_V.obj", "KingGeorgeV.j3o");//NON-NLS
|
||||
export("Models/BoatSmall/12219_boat_v2_L2.obj", "BoatSmall.j3o");
|
||||
export("Models/UBoat/14084_WWII_Ship_German_Type_II_U-boat_v2_L1.obj", "14084_WWII_Ship_German_Type_II_U-boat_v2_L1.j3o");
|
||||
export("Models/Battlecruiser/10619_Battleship.obj", "10619_Battleship.j3o");
|
||||
|
||||
stop();
|
||||
}
|
||||
|
@ -0,0 +1,73 @@
|
||||
newmtl Battleship
|
||||
illum 4
|
||||
Kd 0.00 0.00 0.00
|
||||
Ka 0.00 0.00 0.00
|
||||
Tf 1.00 1.00 1.00
|
||||
map_Kd BattleshipC.jpg
|
||||
Ni 1.00
|
||||
Ks 0.00 0.00 0.00
|
||||
Ns 256.00
|
||||
newmtl blinn1SG
|
||||
illum 4
|
||||
Kd 0.50 0.50 0.50
|
||||
Ka 0.00 0.00 0.00
|
||||
Tf 1.00 1.00 1.00
|
||||
Ni 1.00
|
||||
Ks 0.00 0.00 0.00
|
||||
Ns 256.00
|
||||
newmtl blinn2SG
|
||||
illum 4
|
||||
Kd 0.50 0.50 0.50
|
||||
Ka 0.00 0.00 0.00
|
||||
Tf 1.00 1.00 1.00
|
||||
Ni 1.00
|
||||
Ks 0.00 0.00 0.00
|
||||
Ns 256.00
|
||||
newmtl blinn3SG
|
||||
illum 4
|
||||
Kd 0.50 0.50 0.50
|
||||
Ka 0.00 0.00 0.00
|
||||
Tf 1.00 1.00 1.00
|
||||
Ni 1.00
|
||||
Ks 0.50 0.50 0.50
|
||||
Ns 256.00
|
||||
newmtl blinn4SG
|
||||
illum 4
|
||||
Kd 0.50 0.50 0.50
|
||||
Ka 0.00 0.00 0.00
|
||||
Tf 1.00 1.00 1.00
|
||||
Ni 1.00
|
||||
Ks 0.50 0.50 0.50
|
||||
Ns 256.00
|
||||
newmtl blinn5SG
|
||||
illum 4
|
||||
Kd 0.50 0.50 0.50
|
||||
Ka 0.00 0.00 0.00
|
||||
Tf 1.00 1.00 1.00
|
||||
Ni 1.00
|
||||
Ks 0.50 0.50 0.50
|
||||
Ns 256.00
|
||||
newmtl blinn6SG
|
||||
illum 4
|
||||
Kd 0.50 0.50 0.50
|
||||
Ka 0.00 0.00 0.00
|
||||
Tf 1.00 1.00 1.00
|
||||
Ni 1.00
|
||||
Ks 0.50 0.50 0.50
|
||||
Ns 256.00
|
||||
newmtl blinn7SG
|
||||
illum 4
|
||||
Kd 0.50 0.50 0.50
|
||||
Ka 0.00 0.00 0.00
|
||||
Tf 1.00 1.00 1.00
|
||||
Ni 1.00
|
||||
Ks 0.50 0.50 0.50
|
||||
Ns 256.00
|
||||
newmtl blinn8SG
|
||||
illum 4
|
||||
Kd 0.50 0.50 0.50
|
||||
Ka 0.00 0.00 0.00
|
||||
Tf 1.00 1.00 1.00
|
||||
Ni 1.00
|
||||
Ks 0.50 0.50 0.50
|
||||
Ns 256.00
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
After Width: | Height: | Size: 360 KiB |
Loading…
Reference in New Issue
Block a user