parent
21e2e19e67
commit
81c8ece1c3
Binary file not shown.
After Width: | Height: | Size: 868 B |
@ -1,85 +1,47 @@ |
|||||||
# Exported from Wings 3D 2.2.6.1 |
# Exported from Wings 3D 2.2.6.1 |
||||||
mtllib staircase.mtl |
mtllib staircase.mtl |
||||||
o Cube1 |
o Cube1 |
||||||
#14 vertices, 24 faces |
#14 vertices, 20 faces |
||||||
v -1.00000000 0.0000000e+0 -1.00000000 |
v 1 0.0000000e+0 1 #1 |
||||||
v -1.00000000 0.0000000e+0 1.00000000 |
v 1 0.0000000e+0 0 #2 |
||||||
v -1.00000000 1.00000000 -1.00000000 |
v 1 0.50000000 1 #3 |
||||||
v -1.00000000 1.00000000 1.00000000 |
v 1 0.50000000 0 #4 |
||||||
v 1.00000000 0.0000000e+0 -1.00000000 |
v 0 0.0000000e+0 1 #5 |
||||||
v 1.00000000 0.0000000e+0 1.00000000 |
v 0 0.0000000e+0 0 #6 |
||||||
v 1.00000000 1.00000000 -1.00000000 |
v 0 0.50000000 1 #7 |
||||||
v 1.00000000 1.00000000 1.00000000 |
v 0 0.50000000 0 #8 |
||||||
v -1.00000000 1.00000000 0.0000000e+0 |
v 1 0.50000000 0.5 #9 |
||||||
v 1.00000000 1.00000000 0.0000000e+0 |
v 0 0.50000000 0.5 #10 |
||||||
v -1.00000000 2.00000000 -1.00000000 |
v 1 1.00000000 1 #11 |
||||||
v -1.00000000 2.00000000 0.0000000e+0 |
v 1 1.00000000 0.5 #12 |
||||||
v 1.00000000 2.00000000 0.0000000e+0 |
v 0 1.00000000 0.5 #13 |
||||||
v 1.00000000 2.00000000 -1.00000000 |
v 0 1.00000000 1 #14 |
||||||
vt -3.3222222e-3 -3.8777778e-3 |
vt 0 0 #1 |
||||||
vt -3.3222222e-3 0.49612222 |
vt 0 0.5 #2 |
||||||
vt -2.1666667e-3 3.5555556e-3 |
vt 1 0.5 #3 |
||||||
vt -2.1666667e-3 0.50355556 |
vt 1 0 #4 |
||||||
vt -1.5888889e-3 6.4011111e-2 |
vt 0 1 #5 |
||||||
vt -1.5888889e-3 0.56401111 |
vt 0.5 1 #6 |
||||||
vt -1.5888889e-3 1.06401111 |
vt 0.5 0.5 #7 |
||||||
vt 1.3530843e-16 3.2959746e-17 |
vt 1 1 #8 |
||||||
vt 1.3530843e-16 0.50000000 |
vt 1 0.5 #9 |
||||||
vt 5.7777778e-4 3.3888889e-3 |
f 2/1 8/3 4/2 #1 FRONT FRONT |
||||||
vt 5.7777778e-4 0.50338889 |
f 6/4 8/3 2/1 #2 |
||||||
vt 2.0539683e-3 -2.5777778e-3 |
f 13/8 12/5 9/2 #3 FRONT TOP |
||||||
vt 2.0539683e-3 0.49665556 |
f 10/9 13/8 9/2 #4 |
||||||
vt 2.0539683e-3 0.99588889 |
f 14/3 11/2 12/1 #5 TOP TOP |
||||||
vt 2.2111111e-3 0.49387778 |
f 13/4 14/3 12/1 #6 |
||||||
vt 2.2111111e-3 0.99387778 |
f 10/3 9/2 4/1 #7 TOP FRONT |
||||||
vt 5.5222222e-3 5.0888889e-3 |
f 8/4 10/3 4/1 #8 |
||||||
vt 5.5222222e-3 0.99548889 |
f 11/8 14/5 5/1 #9 BACK |
||||||
vt 0.50000000 0.50000000 |
f 1/4 11/8 5/1 #10 |
||||||
vt 0.50000000 1.00000000 |
f 6/8 2/5 1/1 #11 BOTTOM |
||||||
vt 0.50128730 0.49665556 |
f 5/4 6/8 1/1 #12 |
||||||
vt 0.50128730 0.99588889 |
f 10/7 14/8 13/6 #13 RIGHT TOP |
||||||
vt 0.99592222 5.0888889e-3 |
f 10/7 7/9 14/8 #14 |
||||||
vt 0.99592222 0.99548889 |
f 7/3 8/2 6/1 #15 RIGHT BOTTOM |
||||||
vt 0.99667778 -3.8777778e-3 |
f 5/4 7/3 6/1 #16 |
||||||
vt 0.99667778 0.49612222 |
f 3/2 12/6 11/5 #17 LEFT TOP |
||||||
vt 0.99783333 3.5555556e-3 |
f 9/7 12/6 3/2 #18 |
||||||
vt 0.99783333 0.50355556 |
f 1/1 4/3 3/2 #19 LEFT BOTTOM |
||||||
vt 0.99841111 6.4011111e-2 |
f 1/1 2/4 4/3 #20 |
||||||
vt 0.99841111 0.56401111 |
|
||||||
vt 0.99841111 1.06401111 |
|
||||||
vt 1.00000000 3.2959746e-17 |
|
||||||
vt 1.00000000 0.50000000 |
|
||||||
vt 1.00000000 1.00000000 |
|
||||||
vt 1.00052063 -2.5777778e-3 |
|
||||||
vt 1.00052063 0.49665556 |
|
||||||
vt 1.00057778 3.3888889e-3 |
|
||||||
vt 1.00057778 0.50338889 |
|
||||||
vt 1.00221111 0.49387778 |
|
||||||
vt 1.00221111 0.99387778 |
|
||||||
g Cube1_Cube1_auv |
|
||||||
usemtl Cube1_auv |
|
||||||
s 1 |
|
||||||
f 1/17/ 5/23/ 2/18/ |
|
||||||
f 1/12/ 9/21/ 3/13/ |
|
||||||
f 2/18/ 5/23/ 6/24/ |
|
||||||
f 2/15/ 6/39/ 4/16/ |
|
||||||
f 2/35/ 9/21/ 1/12/ |
|
||||||
f 3/6/ 5/31/ 1/7/ |
|
||||||
f 3/6/ 14/29/ 7/30/ |
|
||||||
f 4/16/ 6/39/ 8/40/ |
|
||||||
f 4/36/ 9/21/ 2/35/ |
|
||||||
f 4/10/ 10/38/ 9/11/ |
|
||||||
f 5/32/ 10/19/ 6/8/ |
|
||||||
f 6/8/ 10/19/ 8/9/ |
|
||||||
f 7/30/ 5/31/ 3/6/ |
|
||||||
f 7/33/ 10/19/ 5/32/ |
|
||||||
f 7/33/ 14/34/ 10/19/ |
|
||||||
f 8/37/ 10/38/ 4/10/ |
|
||||||
f 9/21/ 12/22/ 3/13/ |
|
||||||
f 10/25/ 12/2/ 9/1/ |
|
||||||
f 11/14/ 3/13/ 12/22/ |
|
||||||
f 11/5/ 14/29/ 3/6/ |
|
||||||
f 12/2/ 10/25/ 13/26/ |
|
||||||
f 12/3/ 14/28/ 11/4/ |
|
||||||
f 13/20/ 10/19/ 14/34/ |
|
||||||
f 13/27/ 14/28/ 12/3/ |
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,11 @@ |
|||||||
|
# Exported from Wings 3D 2.2.6.1 |
||||||
|
newmtl Cube1_auv |
||||||
|
Ns 19.999999999999996 |
||||||
|
d 1.0 |
||||||
|
illum 2 |
||||||
|
Kd 1.0 1.0 1.0 |
||||||
|
Ka 0.0 0.0 0.0 |
||||||
|
Ks 0.19 0.19 0.19 |
||||||
|
Ke 0.0 0.0 0.0 |
||||||
|
map_Kd Cube1_auv.png |
||||||
|
|
@ -0,0 +1,81 @@ |
|||||||
|
# Exported from Wings 3D 2.2.6.1 |
||||||
|
mtllib staircase_original.mtl |
||||||
|
o Cube1 |
||||||
|
#14 vertices, 20 faces |
||||||
|
v 0.50000000 0.0000000e+0 0.48571429 |
||||||
|
v 0.50000000 0.0000000e+0 -0.51428571 |
||||||
|
v 0.50000000 0.50000000 0.48571429 |
||||||
|
v 0.50000000 0.50000000 -0.51428571 |
||||||
|
v -0.50000000 0.0000000e+0 0.48571429 |
||||||
|
v -0.50000000 0.0000000e+0 -0.51428571 |
||||||
|
v -0.50000000 0.50000000 0.48571429 |
||||||
|
v -0.50000000 0.50000000 -0.51428571 |
||||||
|
v 0.50000000 0.50000000 -1.4285714e-2 |
||||||
|
v -0.50000000 0.50000000 -1.4285714e-2 |
||||||
|
v 0.50000000 1.00000000 0.48571429 |
||||||
|
v 0.50000000 1.00000000 -1.4285714e-2 |
||||||
|
v -0.50000000 1.00000000 -1.4285714e-2 |
||||||
|
v -0.50000000 1.00000000 0.48571429 |
||||||
|
vt -3.3222222e-3 -3.8777778e-3 |
||||||
|
vt -3.3222222e-3 0.49612222 |
||||||
|
vt -2.1666667e-3 3.5555556e-3 |
||||||
|
vt -2.1666667e-3 0.50355556 |
||||||
|
vt -1.5888889e-3 6.4011111e-2 |
||||||
|
vt -1.5888889e-3 0.56401111 |
||||||
|
vt -1.5888889e-3 1.06401111 |
||||||
|
vt 1.3530843e-16 3.2959746e-17 |
||||||
|
vt 1.3530843e-16 0.50000000 |
||||||
|
vt 5.7777778e-4 3.3888889e-3 |
||||||
|
vt 5.7777778e-4 0.50338889 |
||||||
|
vt 2.0539683e-3 -2.5777778e-3 |
||||||
|
vt 2.0539683e-3 0.49665556 |
||||||
|
vt 2.0539683e-3 0.99588889 |
||||||
|
vt 2.2111111e-3 0.49387778 |
||||||
|
vt 2.2111111e-3 0.99387778 |
||||||
|
vt 5.5222222e-3 5.0888889e-3 |
||||||
|
vt 5.5222222e-3 0.99548889 |
||||||
|
vt 0.50000000 0.50000000 |
||||||
|
vt 0.50000000 1.00000000 |
||||||
|
vt 0.50128730 0.49665556 |
||||||
|
vt 0.50128730 0.99588889 |
||||||
|
vt 0.99592222 5.0888889e-3 |
||||||
|
vt 0.99592222 0.99548889 |
||||||
|
vt 0.99667778 -3.8777778e-3 |
||||||
|
vt 0.99667778 0.49612222 |
||||||
|
vt 0.99783333 3.5555556e-3 |
||||||
|
vt 0.99783333 0.50355556 |
||||||
|
vt 0.99841111 6.4011111e-2 |
||||||
|
vt 0.99841111 0.56401111 |
||||||
|
vt 0.99841111 1.06401111 |
||||||
|
vt 1.00000000 3.2959746e-17 |
||||||
|
vt 1.00000000 0.50000000 |
||||||
|
vt 1.00000000 1.00000000 |
||||||
|
vt 1.00052063 -2.5777778e-3 |
||||||
|
vt 1.00052063 0.49665556 |
||||||
|
vt 1.00057778 3.3888889e-3 |
||||||
|
vt 1.00057778 0.50338889 |
||||||
|
vt 1.00221111 0.49387778 |
||||||
|
vt 1.00221111 0.99387778 |
||||||
|
g Cube1_Cube1_auv |
||||||
|
usemtl Cube1_auv |
||||||
|
s 1 |
||||||
|
f 1/7/ 3/6/ 11/5/ 5/31/ |
||||||
|
f 1/17/ 6/24/ 2/18/ |
||||||
|
f 2/35/ 4/36/ 1/12/ |
||||||
|
f 2/15/ 8/40/ 4/16/ |
||||||
|
f 3/13/ 1/12/ 4/36/ 9/21/ |
||||||
|
f 4/10/ 10/38/ 9/11/ |
||||||
|
f 5/23/ 6/24/ 1/17/ |
||||||
|
f 5/32/ 7/33/ 6/8/ |
||||||
|
f 6/8/ 7/33/ 10/19/ 8/9/ |
||||||
|
f 6/39/ 8/40/ 2/15/ |
||||||
|
f 7/33/ 14/34/ 10/19/ |
||||||
|
f 8/37/ 10/38/ 4/10/ |
||||||
|
f 9/21/ 12/22/ 3/13/ |
||||||
|
f 10/25/ 13/26/ 9/1/ |
||||||
|
f 11/14/ 3/13/ 12/22/ |
||||||
|
f 12/2/ 9/1/ 13/26/ |
||||||
|
f 12/3/ 14/28/ 11/4/ |
||||||
|
f 13/20/ 10/19/ 14/34/ |
||||||
|
f 13/27/ 14/28/ 12/3/ |
||||||
|
f 14/29/ 7/30/ 5/31/ 11/5/ |
@ -1,10 +1,10 @@ |
|||||||
package sig; |
package sig; |
||||||
|
|
||||||
public class FaceList { |
public class FaceList { |
||||||
boolean UP=false; //+Y
|
public boolean UP=false; //+Y
|
||||||
boolean DOWN=false; |
public boolean DOWN=false; |
||||||
boolean FORWARD=false; //+Z
|
public boolean FORWARD=false; //+Z
|
||||||
boolean RIGHT=false; //+X
|
public boolean RIGHT=false; //+X
|
||||||
boolean LEFT=false; |
public boolean LEFT=false; |
||||||
boolean BACKWARD=false; |
public boolean BACKWARD=false; |
||||||
} |
} |
||||||
|
@ -0,0 +1,58 @@ |
|||||||
|
package sig.models; |
||||||
|
|
||||||
|
import java.util.ArrayList; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
import sig.Block; |
||||||
|
import sig.BlockType; |
||||||
|
import sig.Mesh; |
||||||
|
import sig.Triangle; |
||||||
|
import sig.utils.OBJReader; |
||||||
|
|
||||||
|
public class Staircase extends Mesh{ |
||||||
|
public Staircase(BlockType type) { |
||||||
|
super(type); |
||||||
|
this.type = type; |
||||||
|
this.triangles=OBJReader.ReadOBJFile("models/staircase.obj",true); |
||||||
|
for (Triangle t : triangles) { |
||||||
|
t.tex=type.getTexture(BlockType.FRONT); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
protected List<Triangle> prepareRender(Block b) { |
||||||
|
List<Triangle> tris = new ArrayList<Triangle>(); |
||||||
|
if (!b.neighbors.UP) { |
||||||
|
} |
||||||
|
if (!b.neighbors.DOWN) { |
||||||
|
} |
||||||
|
if (!b.neighbors.LEFT) { |
||||||
|
tris.add(b.block.triangles.get(12)); |
||||||
|
tris.add(b.block.triangles.get(13)); |
||||||
|
tris.add(b.block.triangles.get(14)); |
||||||
|
tris.add(b.block.triangles.get(15)); |
||||||
|
} |
||||||
|
if (!b.neighbors.RIGHT) { |
||||||
|
tris.add(b.block.triangles.get(16)); |
||||||
|
tris.add(b.block.triangles.get(17)); |
||||||
|
tris.add(b.block.triangles.get(18)); |
||||||
|
tris.add(b.block.triangles.get(19)); |
||||||
|
} |
||||||
|
if (!b.neighbors.FORWARD) { |
||||||
|
} |
||||||
|
if (!b.neighbors.BACKWARD) { |
||||||
|
tris.add(b.block.triangles.get(0)); |
||||||
|
tris.add(b.block.triangles.get(1)); |
||||||
|
} |
||||||
|
tris.add(b.block.triangles.get(4)); |
||||||
|
tris.add(b.block.triangles.get(5)); |
||||||
|
tris.add(b.block.triangles.get(10)); |
||||||
|
tris.add(b.block.triangles.get(11)); |
||||||
|
tris.add(b.block.triangles.get(8)); |
||||||
|
tris.add(b.block.triangles.get(9)); |
||||||
|
tris.add(b.block.triangles.get(2)); |
||||||
|
tris.add(b.block.triangles.get(3)); |
||||||
|
tris.add(b.block.triangles.get(6)); |
||||||
|
tris.add(b.block.triangles.get(7)); |
||||||
|
return tris; |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue