mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2024-11-28 18:59:47 +01:00
Added boat model for 2x1 boats
This commit is contained in:
parent
de0b2a4054
commit
c339f3fc9d
@ -36,6 +36,7 @@ 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 KING_GEORGE_V_MODEL = "Models/KingGeorgeV/KingGeorgeV.j3o"; //NON-NLS
|
private static final String KING_GEORGE_V_MODEL = "Models/KingGeorgeV/KingGeorgeV.j3o"; //NON-NLS
|
||||||
private static final String SMALL_SHIP_MODEL = "Models/SmallShip/SmallShip.j3o"; //NON-NLS
|
private static final String SMALL_SHIP_MODEL = "Models/SmallShip/SmallShip.j3o"; //NON-NLS
|
||||||
|
private static final String U_BOAT_MODEL = "Models/WWII_ship_German_Type_II_U-boat_v2/WW2Uboat.j3o"; //NON-NLS
|
||||||
private static final String COLOR = "Color"; //NON-NLS
|
private static final String COLOR = "Color"; //NON-NLS
|
||||||
private static final String SHIP = "ship"; //NON-NLS
|
private static final String SHIP = "ship"; //NON-NLS
|
||||||
private static final String SHOT = "shot"; //NON-NLS
|
private static final String SHOT = "shot"; //NON-NLS
|
||||||
@ -145,6 +146,8 @@ class SeaSynchronizer extends ShipMapSynchronizer {
|
|||||||
switch (ship.getLength()) {
|
switch (ship.getLength()) {
|
||||||
case 4:
|
case 4:
|
||||||
return createBattleship(ship);
|
return createBattleship(ship);
|
||||||
|
case 2:
|
||||||
|
return createMediumship(ship);
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
return createSmallship(ship);
|
return createSmallship(ship);
|
||||||
@ -217,6 +220,17 @@ class SeaSynchronizer extends ShipMapSynchronizer {
|
|||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Spatial createMediumship(Battleship ship) {
|
||||||
|
final Spatial model = app.getAssetManager().loadModel(U_BOAT_MODEL);
|
||||||
|
|
||||||
|
model.rotate(-HALF_PI, calculateRotationAngle(ship.getRot()), 0f);
|
||||||
|
model.scale(0.27f);
|
||||||
|
model.setShadowMode(ShadowMode.CastAndReceive);
|
||||||
|
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculates the rotation angle for the specified rotation.
|
* Calculates the rotation angle for the specified rotation.
|
||||||
|
Binary file not shown.
After Width: | Height: | Size: 168 KiB |
Binary file not shown.
@ -43,6 +43,7 @@ public class ModelExporter extends SimpleApplication {
|
|||||||
public void simpleInitApp() {
|
public void simpleInitApp() {
|
||||||
export("Models/KingGeorgeV/King_George_V.obj", "KingGeorgeV.j3o"); //NON-NLS
|
export("Models/KingGeorgeV/King_George_V.obj", "KingGeorgeV.j3o"); //NON-NLS
|
||||||
export("Models/SmallShip/12219_boat_v2_L2.obj", "SmallShip.j3o"); //NON-NLS
|
export("Models/SmallShip/12219_boat_v2_L2.obj", "SmallShip.j3o"); //NON-NLS
|
||||||
|
export("Models/WWII_ship_German_Type_II_U-boat_v2/14084_WWII_Ship_German_Type_II_U-boat_v2_L1.obj", "WW2Uboat.j3o"); //NON-NLS
|
||||||
|
|
||||||
stop();
|
stop();
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
|
||||||
|
# File Created: 29.03.2012 14:25:39
|
||||||
|
|
||||||
|
newmtl default
|
||||||
|
Ns 35.0000
|
||||||
|
Ni 1.5000
|
||||||
|
d 1.0000
|
||||||
|
Tr 0.0000
|
||||||
|
Tf 1.0000 1.0000 1.0000
|
||||||
|
illum 2
|
||||||
|
Ka 1.0000 1.0000 1.0000
|
||||||
|
Kd 1.0000 1.0000 1.0000
|
||||||
|
Ks 0.5400 0.5400 0.5400
|
||||||
|
Ke 0.0000 0.0000 0.0000
|
||||||
|
map_Ka 14084_WWII_ship_German_Type_II_U-boat_diff.jpg
|
||||||
|
map_Kd 14084_WWII_ship_German_Type_II_U-boat_diff.jpg
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
After Width: | Height: | Size: 168 KiB |
Loading…
Reference in New Issue
Block a user