working with broken rendering on windows
This commit is contained in:
parent
a913a807f3
commit
5859972935
126
assets/ice/ice1.obj
Executable file
126
assets/ice/ice1.obj
Executable file
@ -0,0 +1,126 @@
|
||||
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
|
||||
# File Created: 20.10.2018 07:44:13
|
||||
|
||||
#
|
||||
# object Ice_1
|
||||
#
|
||||
|
||||
v 249.7259 7.8863 214.1153
|
||||
v 247.4231 7.5110 213.4892
|
||||
v 248.8877 7.5110 215.5002
|
||||
v 250.0411 7.5110 215.2909
|
||||
v 250.8434 7.8352 214.4192
|
||||
v 248.8877 6.3298 215.5002
|
||||
v 249.8081 6.3298 215.7727
|
||||
v 251.3438 7.5110 216.6923
|
||||
v 253.1286 7.5110 215.1596
|
||||
v 251.3438 6.3298 216.6923
|
||||
v 251.9728 7.5110 212.6065
|
||||
v 253.5077 7.5110 210.8802
|
||||
v 252.2605 7.5110 209.9265
|
||||
v 251.0889 7.1639 211.8627
|
||||
v 253.5667 6.3298 215.1596
|
||||
v 253.5077 7.5110 214.5762
|
||||
v 253.5077 6.3298 214.5762
|
||||
v 252.3615 6.3298 212.4325
|
||||
v 253.5077 6.3298 210.8802
|
||||
v 252.2605 6.3298 209.9265
|
||||
v 248.8877 7.5110 211.6122
|
||||
v 248.8877 6.3298 210.8802
|
||||
v 248.1723 6.3298 213.4892
|
||||
# 23 vertices
|
||||
|
||||
vn -0.0552 0.9982 -0.0219
|
||||
vn -0.0594 0.9970 -0.0488
|
||||
vn -0.0923 0.9738 0.2080
|
||||
vn -0.0690 0.9648 0.2538
|
||||
vn 0.0386 0.9980 0.0507
|
||||
vn 0.1785 0.0000 0.9839
|
||||
vn -0.4568 0.3423 0.8211
|
||||
vn -0.5635 0.4049 0.7201
|
||||
vn -0.2592 0.4082 0.8753
|
||||
vn 0.0024 0.9901 0.1407
|
||||
vn 0.0848 0.9962 0.0209
|
||||
vn -0.5937 0.1575 0.7892
|
||||
vn -0.5138 0.0000 0.8579
|
||||
vn -0.0551 0.9887 -0.1397
|
||||
vn 0.0000 1.0000 -0.0000
|
||||
vn -0.0418 0.9972 0.0627
|
||||
vn -0.0666 0.9972 -0.0333
|
||||
vn 0.6884 0.2198 0.6913
|
||||
vn 0.6515 0.0000 0.7587
|
||||
vn 0.6261 0.0624 0.7772
|
||||
vn 0.6387 0.2369 0.7320
|
||||
vn 0.8007 0.2970 0.5203
|
||||
vn 0.9949 0.0000 -0.1006
|
||||
vn 0.8304 0.2436 -0.5011
|
||||
vn 0.7888 0.0000 -0.6147
|
||||
vn 0.8133 0.1013 -0.5730
|
||||
vn 0.8298 0.3384 -0.4437
|
||||
vn 0.7841 0.0518 0.6184
|
||||
vn 0.7393 0.1464 0.6573
|
||||
vn 0.7607 0.1039 0.6408
|
||||
vn 0.8045 0.0000 0.5940
|
||||
vn 0.6074 0.0000 -0.7944
|
||||
vn -0.4471 0.0000 -0.8945
|
||||
vn -0.2337 0.5122 -0.8265
|
||||
vn -0.7367 0.3562 -0.5748
|
||||
vn -0.8227 -0.5218 -0.2256
|
||||
vn -0.7193 -0.4562 0.5239
|
||||
vn -0.9422 0.0000 0.3352
|
||||
vn 0.1385 0.9802 0.1412
|
||||
# 39 vertex normals
|
||||
|
||||
vt 0.3748 0.3182 0.0000
|
||||
vt 0.0000 0.5090 0.0000
|
||||
vt 0.0000 0.0000 0.0000
|
||||
vt 0.1550 0.0000 0.0000
|
||||
vt 0.5567 0.2256 0.0000
|
||||
vt 0.5243 0.0000 0.0000
|
||||
vt 1.0000 0.0000 0.0000
|
||||
vt 1.0000 0.6640 0.0000
|
||||
vt 1.0000 1.0000 0.0000
|
||||
vt 0.8480 1.0000 0.0000
|
||||
vt 0.6293 0.6848 0.0000
|
||||
vt 1.0000 0.2000 0.0000
|
||||
vt 0.0000 1.0000 0.0000
|
||||
# 13 texture coords
|
||||
|
||||
o Ice_1
|
||||
g Ice_1
|
||||
f 1/1/1 2/2/2 3/3/3
|
||||
f 1/1/1 3/3/3 4/4/4
|
||||
f 5/5/5 1/1/1 4/4/4
|
||||
f 4/4/6 3/3/6 6/3/6
|
||||
f 7/4/7 4/4/8 6/3/9
|
||||
f 8/6/10 9/7/11 5/5/5
|
||||
f 4/4/4 8/6/10 5/5/5
|
||||
f 8/6/12 4/4/8 7/4/7
|
||||
f 10/6/13 8/6/12 7/4/7
|
||||
f 11/8/14 12/9/15 13/10/16
|
||||
f 14/11/17 11/8/14 13/10/16
|
||||
f 9/7/18 8/6/19 10/6/20
|
||||
f 15/7/21 9/7/18 10/6/20
|
||||
f 16/12/22 9/7/18 15/7/21
|
||||
f 17/12/23 16/12/23 15/7/23
|
||||
f 11/8/24 16/12/25 17/12/26
|
||||
f 18/8/27 11/8/24 17/12/26
|
||||
f 12/9/28 11/8/29 18/8/30
|
||||
f 19/9/31 12/9/28 18/8/30
|
||||
f 13/10/32 12/9/32 19/9/32
|
||||
f 20/10/32 13/10/32 19/9/32
|
||||
f 21/13/33 13/10/33 20/10/33
|
||||
f 22/13/34 21/13/34 20/10/34
|
||||
f 2/2/35 21/13/35 22/13/35
|
||||
f 23/2/36 2/2/36 22/13/36
|
||||
f 3/3/37 2/2/37 23/2/37
|
||||
f 6/3/38 3/3/38 23/2/38
|
||||
f 14/11/17 13/10/16 21/13/39
|
||||
f 2/2/2 1/1/1 14/11/17
|
||||
f 21/13/39 2/2/2 14/11/17
|
||||
f 1/1/1 5/5/5 11/8/14
|
||||
f 14/11/17 1/1/1 11/8/14
|
||||
f 9/7/11 16/12/15 11/8/14
|
||||
f 5/5/5 9/7/11 11/8/14
|
||||
# 34 faces
|
||||
|
108
assets/ice/ice2.obj
Executable file
108
assets/ice/ice2.obj
Executable file
@ -0,0 +1,108 @@
|
||||
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
|
||||
# File Created: 20.10.2018 07:44:53
|
||||
|
||||
#
|
||||
# object Ice_2
|
||||
#
|
||||
|
||||
v 239.3672 7.6954 215.9851
|
||||
v 241.0293 7.1686 216.9803
|
||||
v 245.4640 8.2625 213.4797
|
||||
v 238.3711 7.4455 215.6902
|
||||
v 240.6964 8.2625 211.7293
|
||||
v 238.3711 6.4266 215.6902
|
||||
v 239.3672 6.4266 215.9851
|
||||
v 243.4350 7.6954 217.6903
|
||||
v 246.2103 7.6954 215.9153
|
||||
v 241.0293 6.4266 216.9803
|
||||
v 243.3711 7.6954 210.6902
|
||||
v 242.0213 7.6954 209.6581
|
||||
v 243.4350 6.4266 217.6903
|
||||
v 246.2103 6.4266 215.9153
|
||||
v 245.4640 6.4266 213.4797
|
||||
v 243.3711 6.4266 210.6902
|
||||
v 242.0213 6.4266 209.6581
|
||||
v 238.3711 7.4088 210.6902
|
||||
v 238.3711 6.4266 210.6902
|
||||
v 236.7861 7.0433 213.5138
|
||||
v 236.7861 6.4266 213.5138
|
||||
# 21 vertices
|
||||
|
||||
vn 0.0683 0.9244 0.3753
|
||||
vn -0.0291 0.9640 0.2644
|
||||
vn 0.0068 0.9837 0.1798
|
||||
vn -0.1982 0.9802 -0.0054
|
||||
vn -0.1775 0.9605 -0.2145
|
||||
vn 0.0113 0.9990 -0.0443
|
||||
vn -0.1290 0.9864 -0.1016
|
||||
vn -0.4007 0.0000 0.9162
|
||||
vn -0.2839 0.0000 0.9589
|
||||
vn -0.4020 0.0000 0.9157
|
||||
vn -0.1394 0.9880 0.0659
|
||||
vn 0.1213 0.9743 0.1897
|
||||
vn -0.4035 0.0000 0.9150
|
||||
vn -0.4016 0.0000 0.9158
|
||||
vn 0.3126 0.8574 -0.4089
|
||||
vn 0.0145 0.9574 -0.2886
|
||||
vn -0.2831 0.0000 0.9591
|
||||
vn 0.5388 0.0000 0.8424
|
||||
vn 0.8897 0.0000 -0.4566
|
||||
vn 0.9561 0.0000 -0.2930
|
||||
vn 0.8913 0.0000 -0.4533
|
||||
vn 0.7151 0.0000 -0.6991
|
||||
vn 0.7103 0.0000 -0.7039
|
||||
vn 0.6074 0.0000 -0.7944
|
||||
vn -0.2721 0.0000 -0.9623
|
||||
vn -0.8720 0.0000 -0.4895
|
||||
vn -0.8084 0.0000 0.5887
|
||||
vn -0.2735 0.9550 -0.1151
|
||||
vn -0.2367 0.9715 -0.0071
|
||||
# 29 vertex normals
|
||||
|
||||
vt 0.1550 0.0000 0.0000
|
||||
vt 0.5243 0.0000 0.0000
|
||||
vt 1.0000 0.6640 0.0000
|
||||
vt 0.0000 0.0000 0.0000
|
||||
vt 0.6185 0.7922 0.0000
|
||||
vt 1.0000 0.0000 0.0000
|
||||
vt 1.0000 0.2000 0.0000
|
||||
vt 1.0000 1.0000 0.0000
|
||||
vt 0.8480 1.0000 0.0000
|
||||
vt 0.0000 1.0000 0.0000
|
||||
vt 0.0000 0.5090 0.0000
|
||||
# 11 texture coords
|
||||
|
||||
o Ice_2
|
||||
g Ice_2
|
||||
f 1/1/1 2/2/2 3/3/3
|
||||
f 4/4/4 1/1/5 3/3/6
|
||||
f 5/5/7 4/4/4 3/3/6
|
||||
f 1/1/8 4/4/9 6/4/9
|
||||
f 7/1/10 1/1/8 6/4/9
|
||||
f 8/6/11 9/7/12 3/3/3
|
||||
f 2/2/2 8/6/11 3/3/3
|
||||
f 2/2/13 1/1/8 7/1/10
|
||||
f 10/2/14 2/2/13 7/1/10
|
||||
f 3/3/6 11/8/15 12/9/16
|
||||
f 5/5/7 3/3/6 12/9/16
|
||||
f 8/6/17 2/2/13 10/2/14
|
||||
f 13/6/17 8/6/17 10/2/14
|
||||
f 9/7/18 8/6/18 13/6/18
|
||||
f 14/7/18 9/7/18 13/6/18
|
||||
f 3/3/19 9/7/20 14/7/20
|
||||
f 15/3/21 3/3/19 14/7/20
|
||||
f 11/8/22 3/3/19 15/3/21
|
||||
f 16/8/23 11/8/22 15/3/21
|
||||
f 12/9/24 11/8/22 16/8/23
|
||||
f 17/9/24 12/9/24 16/8/23
|
||||
f 18/10/25 12/9/25 17/9/25
|
||||
f 19/10/25 18/10/25 17/9/25
|
||||
f 20/11/26 18/10/26 19/10/26
|
||||
f 21/11/26 20/11/26 19/10/26
|
||||
f 4/4/27 20/11/27 21/11/27
|
||||
f 6/4/27 4/4/27 21/11/27
|
||||
f 5/5/7 12/9/16 18/10/28
|
||||
f 18/10/28 20/11/29 4/4/4
|
||||
f 5/5/7 18/10/28 4/4/4
|
||||
# 30 faces
|
||||
|
105
assets/ice/ice3.obj
Executable file
105
assets/ice/ice3.obj
Executable file
@ -0,0 +1,105 @@
|
||||
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
|
||||
# File Created: 20.10.2018 07:45:05
|
||||
|
||||
#
|
||||
# object Ice_3
|
||||
#
|
||||
|
||||
v 240.4719 6.7284 226.6828
|
||||
v 241.3221 6.8316 226.6132
|
||||
v 242.6708 6.9175 225.0305
|
||||
v 240.1126 7.0452 226.4883
|
||||
v 240.9513 7.6752 223.8761
|
||||
v 240.1126 6.2594 226.4883
|
||||
v 240.4719 6.2594 226.6828
|
||||
v 242.1897 6.6617 227.0814
|
||||
v 242.9400 6.6617 226.6368
|
||||
v 241.3221 6.2594 226.6132
|
||||
v 243.2341 7.2379 223.5277
|
||||
v 241.4291 7.2379 222.5102
|
||||
v 242.1897 6.2594 227.0814
|
||||
v 242.9400 6.2594 226.6368
|
||||
v 242.6708 6.2594 225.0305
|
||||
v 243.2341 6.2594 223.5277
|
||||
v 241.4291 6.2594 222.5102
|
||||
v 240.1126 7.0168 223.1909
|
||||
v 240.1126 6.2594 223.1909
|
||||
v 239.5410 6.7350 225.0530
|
||||
v 239.5410 6.2594 225.0530
|
||||
# 21 vertices
|
||||
|
||||
vn -0.1246 0.9908 -0.0524
|
||||
vn -0.0380 0.9990 0.0219
|
||||
vn 0.0547 0.9928 0.1067
|
||||
vn 0.3020 0.8369 0.4566
|
||||
vn 0.3564 0.7480 0.5599
|
||||
vn 0.3129 0.9285 0.1999
|
||||
vn 0.3704 0.9271 0.0568
|
||||
vn -0.4761 0.0000 0.8794
|
||||
vn 0.1015 0.9840 0.1465
|
||||
vn 0.0847 0.9861 0.1429
|
||||
vn 0.0816 0.0000 0.9967
|
||||
vn -0.0973 0.9802 0.1725
|
||||
vn -0.4749 0.0000 0.8800
|
||||
vn 0.5098 0.0000 0.8603
|
||||
vn 0.9862 0.0000 -0.1653
|
||||
vn 0.9364 0.0000 0.3510
|
||||
vn 0.4911 0.0000 -0.8711
|
||||
vn -0.4593 0.0000 -0.8883
|
||||
vn -0.9560 0.0000 -0.2934
|
||||
vn -0.9290 0.0000 0.3700
|
||||
vn -0.5239 0.8362 -0.1622
|
||||
vn -0.3466 0.8513 -0.3938
|
||||
vn -0.4829 0.8545 -0.1914
|
||||
vn -0.4621 0.8868 -0.0076
|
||||
vn -0.5370 0.8435 -0.0073
|
||||
vn 0.4656 0.8771 -0.1179
|
||||
# 26 vertex normals
|
||||
|
||||
vt 0.1550 0.0000 0.0000
|
||||
vt 0.5243 0.0000 0.0000
|
||||
vt 1.0000 0.6640 0.0000
|
||||
vt 0.0000 0.0000 0.0000
|
||||
vt 0.6185 0.7922 0.0000
|
||||
vt 1.0000 0.0000 0.0000
|
||||
vt 1.0000 0.2000 0.0000
|
||||
vt 1.0000 1.0000 0.0000
|
||||
vt 0.8480 1.0000 0.0000
|
||||
vt 0.0000 1.0000 0.0000
|
||||
vt 0.0000 0.5090 0.0000
|
||||
# 11 texture coords
|
||||
|
||||
o Ice_3
|
||||
g Ice_3
|
||||
f 1/1/1 2/2/2 3/3/3
|
||||
f 4/4/4 1/1/5 3/3/6
|
||||
f 5/5/7 4/4/4 3/3/6
|
||||
f 1/1/8 4/4/8 6/4/8
|
||||
f 7/1/8 1/1/8 6/4/8
|
||||
f 8/6/9 9/7/10 3/3/3
|
||||
f 2/2/2 8/6/9 3/3/3
|
||||
f 2/2/11 1/1/11 7/1/11
|
||||
f 10/2/11 2/2/11 7/1/11
|
||||
f 3/3/12 11/8/12 12/9/12
|
||||
f 8/6/13 2/2/13 10/2/13
|
||||
f 13/6/13 8/6/13 10/2/13
|
||||
f 9/7/14 8/6/14 13/6/14
|
||||
f 14/7/14 9/7/14 13/6/14
|
||||
f 3/3/15 9/7/15 14/7/15
|
||||
f 15/3/15 3/3/15 14/7/15
|
||||
f 11/8/16 3/3/16 15/3/16
|
||||
f 16/8/16 11/8/16 15/3/16
|
||||
f 12/9/17 11/8/17 16/8/17
|
||||
f 17/9/17 12/9/17 16/8/17
|
||||
f 18/10/18 12/9/18 17/9/18
|
||||
f 19/10/18 18/10/18 17/9/18
|
||||
f 20/11/19 18/10/19 19/10/19
|
||||
f 21/11/19 20/11/19 19/10/19
|
||||
f 4/4/20 20/11/20 21/11/20
|
||||
f 6/4/20 4/4/20 21/11/20
|
||||
f 5/5/21 12/9/22 18/10/23
|
||||
f 18/10/23 20/11/24 4/4/25
|
||||
f 5/5/21 18/10/23 4/4/25
|
||||
f 12/9/26 5/5/7 3/3/6
|
||||
# 30 faces
|
||||
|
117
assets/ice/ice4.obj
Executable file
117
assets/ice/ice4.obj
Executable file
@ -0,0 +1,117 @@
|
||||
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
|
||||
# File Created: 20.10.2018 07:45:21
|
||||
|
||||
#
|
||||
# object Ice_4
|
||||
#
|
||||
|
||||
v 249.9632 7.0497 226.1821
|
||||
v 251.2973 6.9911 226.5492
|
||||
v 255.1938 7.0922 224.8695
|
||||
v 248.6761 7.2425 226.4269
|
||||
v 250.4937 7.0562 223.8687
|
||||
v 248.6761 6.3177 226.4269
|
||||
v 249.4547 6.3177 226.6173
|
||||
v 253.1777 6.7912 226.4100
|
||||
v 253.9260 6.7912 226.2562
|
||||
v 251.2973 6.3177 226.5492
|
||||
v 254.2987 6.8854 222.8857
|
||||
v 251.5293 7.4693 222.8315
|
||||
v 253.1777 6.3177 226.4100
|
||||
v 253.9260 6.3177 226.6370
|
||||
v 255.1938 6.3177 224.8695
|
||||
v 254.2987 6.3177 222.8857
|
||||
v 251.5293 6.3177 222.5310
|
||||
v 248.6761 7.2092 223.1976
|
||||
v 248.6761 6.3177 223.1976
|
||||
v 247.4371 6.8775 225.0212
|
||||
v 247.4371 6.3177 225.0212
|
||||
# 21 vertices
|
||||
|
||||
vn 0.0166 0.9950 0.0984
|
||||
vn 0.0304 0.9910 0.1302
|
||||
vn 0.0747 0.9642 0.2545
|
||||
vn 0.1911 0.0298 0.9811
|
||||
vn 0.2205 0.2895 0.9314
|
||||
vn 0.2253 0.3498 0.9093
|
||||
vn -0.0050 0.9911 0.1327
|
||||
vn -0.0694 0.9971 -0.0304
|
||||
vn -0.0264 0.9958 0.0880
|
||||
vn 0.1868 0.0000 0.9824
|
||||
vn -0.1902 0.5960 0.7802
|
||||
vn -0.1892 0.5956 0.7807
|
||||
vn -0.1907 0.5962 0.7799
|
||||
vn 0.1134 0.9366 0.3315
|
||||
vn 0.0530 0.9647 0.2579
|
||||
vn -0.1887 0.5954 0.7809
|
||||
vn 0.0554 0.0000 0.9985
|
||||
vn 0.0571 0.0000 0.9984
|
||||
vn 0.0369 0.0000 0.9993
|
||||
vn 0.2060 0.9593 -0.1930
|
||||
vn 0.1358 0.0000 0.9907
|
||||
vn 0.1241 0.0000 0.9923
|
||||
vn 0.2013 0.0000 0.9795
|
||||
vn -0.2300 0.6099 0.7584
|
||||
vn 0.5754 0.5126 0.6373
|
||||
vn 0.8126 0.0000 0.5829
|
||||
vn 0.9115 0.0000 -0.4113
|
||||
vn -0.0244 0.2365 -0.9713
|
||||
vn 0.0196 0.0000 -0.9998
|
||||
vn 0.0465 0.0649 -0.9968
|
||||
vn -0.0188 0.2291 -0.9732
|
||||
vn -0.2093 0.0598 -0.9760
|
||||
vn -0.2275 0.0000 -0.9738
|
||||
vn -0.8271 0.0000 -0.5620
|
||||
vn -0.7502 0.0000 0.6612
|
||||
vn -0.0645 0.9476 0.3130
|
||||
vn -0.0361 0.9972 0.0657
|
||||
vn -0.2722 0.9622 -0.0099
|
||||
# 38 vertex normals
|
||||
|
||||
vt 0.1550 0.0000 0.0000
|
||||
vt 0.5243 0.0000 0.0000
|
||||
vt 1.0000 0.6640 0.0000
|
||||
vt 0.0000 0.0000 0.0000
|
||||
vt 0.6185 0.7922 0.0000
|
||||
vt 1.0000 0.0000 0.0000
|
||||
vt 1.0000 0.2000 0.0000
|
||||
vt 1.0000 1.0000 0.0000
|
||||
vt 0.8480 1.0000 0.0000
|
||||
vt 0.0000 1.0000 0.0000
|
||||
vt 0.0000 0.5090 0.0000
|
||||
# 11 texture coords
|
||||
|
||||
o Ice_4
|
||||
g Ice_4
|
||||
f 1/1/1 2/2/2 3/3/3
|
||||
f 4/4/4 1/1/5 3/3/6
|
||||
f 5/5/7 4/4/8 3/3/9
|
||||
f 1/1/5 4/4/4 6/4/10
|
||||
f 7/1/11 1/1/12 6/4/13
|
||||
f 8/6/14 9/7/15 3/3/3
|
||||
f 2/2/2 8/6/14 3/3/3
|
||||
f 2/2/16 1/1/12 7/1/11
|
||||
f 10/2/17 2/2/18 7/1/19
|
||||
f 3/3/20 11/8/20 12/9/20
|
||||
f 8/6/21 2/2/18 10/2/17
|
||||
f 13/6/22 8/6/21 10/2/17
|
||||
f 9/7/23 8/6/21 13/6/22
|
||||
f 14/7/24 9/7/24 13/6/24
|
||||
f 3/3/25 9/7/25 14/7/25
|
||||
f 15/3/26 3/3/26 14/7/26
|
||||
f 11/8/27 3/3/27 15/3/27
|
||||
f 16/8/27 11/8/27 15/3/27
|
||||
f 12/9/28 11/8/29 16/8/30
|
||||
f 17/9/31 12/9/28 16/8/30
|
||||
f 18/10/32 12/9/28 17/9/31
|
||||
f 19/10/33 18/10/32 17/9/31
|
||||
f 20/11/34 18/10/34 19/10/34
|
||||
f 21/11/34 20/11/34 19/10/34
|
||||
f 4/4/35 20/11/35 21/11/35
|
||||
f 6/4/35 4/4/35 21/11/35
|
||||
f 5/5/7 12/9/36 18/10/37
|
||||
f 18/10/37 20/11/38 4/4/8
|
||||
f 5/5/7 18/10/37 4/4/8
|
||||
f 12/9/36 5/5/7 3/3/9
|
||||
# 30 faces
|
||||
|
145
assets/ice/ice5.obj
Executable file
145
assets/ice/ice5.obj
Executable file
@ -0,0 +1,145 @@
|
||||
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
|
||||
# File Created: 20.10.2018 07:45:35
|
||||
|
||||
#
|
||||
# object Ice_5
|
||||
#
|
||||
|
||||
v 245.2771 8.3486 231.5131
|
||||
v 243.5435 7.8485 235.2913
|
||||
v 248.3428 7.2404 236.8709
|
||||
v 250.0585 8.0224 233.0896
|
||||
v 243.6397 7.4607 236.9857
|
||||
v 243.7497 7.2163 238.4480
|
||||
v 243.6397 6.2886 236.9857
|
||||
v 243.5178 6.2886 238.7202
|
||||
v 250.4314 7.4863 231.7220
|
||||
v 253.2363 7.2702 234.1374
|
||||
v 250.8516 7.0081 229.7729
|
||||
v 246.6379 7.1421 238.5415
|
||||
v 246.6379 6.2886 238.5415
|
||||
v 247.0308 7.7482 228.7937
|
||||
v 249.8221 6.8887 239.6790
|
||||
v 249.8221 6.2886 239.9467
|
||||
v 251.8291 6.8887 237.7732
|
||||
v 251.8291 6.2886 238.0801
|
||||
v 253.2363 6.2886 234.1374
|
||||
v 251.7204 6.2886 228.9358
|
||||
v 247.0308 6.2886 227.9075
|
||||
v 242.1992 7.4184 229.7535
|
||||
v 242.1992 6.2886 229.7535
|
||||
v 242.4257 6.9980 234.5352
|
||||
v 241.5778 6.2886 234.5352
|
||||
v 248.8761 7.1856 237.0476
|
||||
# 26 vertices
|
||||
|
||||
vn -0.1019 0.9938 -0.0446
|
||||
vn 0.0622 0.9801 0.1884
|
||||
vn 0.0398 0.9824 0.1823
|
||||
vn 0.1751 0.9845 -0.0112
|
||||
vn 0.0506 0.9802 0.1915
|
||||
vn 0.0454 0.9886 0.1437
|
||||
vn -0.9895 0.1434 -0.0165
|
||||
vn -0.9972 0.0000 0.0750
|
||||
vn -0.9964 0.0822 0.0228
|
||||
vn -0.9724 0.2230 -0.0683
|
||||
vn 0.2697 0.9352 -0.2295
|
||||
vn 0.1724 0.9835 0.0546
|
||||
vn 0.3397 0.9005 -0.2714
|
||||
vn -0.1436 0.0289 0.9892
|
||||
vn -0.0236 0.2869 0.9577
|
||||
vn -0.0075 0.2311 0.9729
|
||||
vn -0.1464 0.0233 0.9889
|
||||
vn 0.0992 0.9682 -0.2299
|
||||
vn -0.3720 0.3282 0.8683
|
||||
vn -0.3738 0.3779 0.8470
|
||||
vn 0.8278 0.2531 0.5006
|
||||
vn 0.6552 0.3078 0.6900
|
||||
vn 0.6524 0.3149 0.6894
|
||||
vn 0.7627 0.2837 0.5812
|
||||
vn 0.9403 0.0175 0.3399
|
||||
vn 0.9418 0.0000 0.3361
|
||||
vn 0.8776 0.0000 -0.4795
|
||||
vn 0.4423 0.8537 -0.2747
|
||||
vn 0.5363 0.8294 -0.1563
|
||||
vn 0.0107 0.5190 -0.8547
|
||||
vn -0.0276 0.5188 -0.8545
|
||||
vn 0.1842 0.5101 -0.8402
|
||||
vn -0.2010 0.5084 -0.8373
|
||||
vn -0.3569 0.0000 -0.9341
|
||||
vn -0.9989 0.0000 0.0473
|
||||
vn -0.6417 0.7669 0.0075
|
||||
vn -0.5904 0.8060 0.0422
|
||||
vn -0.6395 0.7643 -0.0831
|
||||
vn -0.6610 0.7258 0.1904
|
||||
vn -0.7652 0.0000 0.6438
|
||||
vn -0.2564 0.9646 -0.0615
|
||||
vn -0.6281 0.7762 0.0554
|
||||
vn 0.0341 0.9968 0.0723
|
||||
vn 0.0632 0.9846 0.1633
|
||||
vn 0.0576 0.9965 0.0607
|
||||
vn 0.0653 0.9913 0.1142
|
||||
# 46 vertex normals
|
||||
|
||||
vt 0.6185 0.7922 0.0000
|
||||
vt 0.2701 0.3460 0.0000
|
||||
vt 0.5332 0.2972 0.0000
|
||||
vt 0.8477 0.7152 0.0000
|
||||
vt 0.0000 0.0000 0.0000
|
||||
vt 0.1550 0.0000 0.0000
|
||||
vt 0.9313 0.8159 0.0000
|
||||
vt 1.0000 0.6640 0.0000
|
||||
vt 1.0000 1.0000 0.0000
|
||||
vt 0.5243 0.0000 0.0000
|
||||
vt 0.8480 1.0000 0.0000
|
||||
vt 1.0000 0.0000 0.0000
|
||||
vt 1.0000 0.2000 0.0000
|
||||
vt 0.0000 1.0000 0.0000
|
||||
vt 0.0000 0.5090 0.0000
|
||||
vt 0.6856 0.2252 0.0000
|
||||
# 16 texture coords
|
||||
|
||||
o Ice_5
|
||||
g Ice_5
|
||||
f 1/1/1 2/2/2 3/3/3
|
||||
f 4/4/4 1/1/1 3/3/3
|
||||
f 5/5/5 6/6/6 3/3/3
|
||||
f 6/6/7 5/5/8 7/5/9
|
||||
f 8/6/10 6/6/7 7/5/9
|
||||
f 9/7/11 10/8/12 11/9/13
|
||||
f 12/10/14 6/6/15 8/6/16
|
||||
f 13/10/17 12/10/14 8/6/16
|
||||
f 9/7/11 11/9/13 14/11/18
|
||||
f 15/12/19 12/10/14 13/10/17
|
||||
f 16/12/20 15/12/19 13/10/17
|
||||
f 17/13/21 15/12/22 16/12/23
|
||||
f 18/13/24 17/13/21 16/12/23
|
||||
f 10/8/25 17/13/21 18/13/24
|
||||
f 19/8/26 10/8/25 18/13/24
|
||||
f 11/9/27 10/8/27 19/8/27
|
||||
f 20/9/28 11/9/13 19/8/29
|
||||
f 14/11/18 11/9/13 20/9/28
|
||||
f 21/11/30 14/11/31 20/9/32
|
||||
f 22/14/33 14/11/31 21/11/30
|
||||
f 23/14/34 22/14/34 21/11/34
|
||||
f 24/15/35 22/14/35 23/14/35
|
||||
f 25/15/36 24/15/37 23/14/38
|
||||
f 5/5/39 24/15/37 25/15/36
|
||||
f 7/5/40 5/5/40 25/15/40
|
||||
f 1/1/1 14/11/18 22/14/41
|
||||
f 2/2/42 24/15/37 5/5/39
|
||||
f 9/7/11 4/4/4 10/8/12
|
||||
f 6/6/6 12/10/43 26/16/44
|
||||
f 3/3/3 6/6/6 26/16/44
|
||||
f 14/11/18 1/1/1 4/4/4
|
||||
f 9/7/11 14/11/18 4/4/4
|
||||
f 12/10/43 15/12/45 17/13/46
|
||||
f 26/16/44 12/10/43 17/13/46
|
||||
f 1/1/1 22/14/41 24/15/37
|
||||
f 2/2/42 1/1/1 24/15/37
|
||||
f 4/4/4 3/3/3 26/16/44
|
||||
f 10/8/12 4/4/4 26/16/44
|
||||
f 26/16/44 17/13/46 10/8/12
|
||||
f 3/3/3 2/2/2 5/5/5
|
||||
# 40 faces
|
||||
|
129
assets/ice/ice6.obj
Executable file
129
assets/ice/ice6.obj
Executable file
@ -0,0 +1,129 @@
|
||||
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
|
||||
# File Created: 20.10.2018 07:45:51
|
||||
|
||||
#
|
||||
# object Ice_6
|
||||
#
|
||||
|
||||
v 262.5823 7.4714 214.5545
|
||||
v 263.0677 7.3834 215.2081
|
||||
v 264.9830 7.9394 213.6937
|
||||
v 262.1364 7.9394 212.8909
|
||||
v 260.4662 6.8925 216.5952
|
||||
v 259.1323 6.8923 214.9885
|
||||
v 258.8304 6.4266 215.2502
|
||||
v 260.2981 6.4266 217.1669
|
||||
v 261.6676 7.0380 216.3133
|
||||
v 263.6499 6.9109 216.8983
|
||||
v 261.6676 6.4266 216.3133
|
||||
v 263.4377 7.4721 211.8105
|
||||
v 263.6499 6.4266 216.8983
|
||||
v 265.4077 7.4721 215.4357
|
||||
v 265.9368 6.4266 215.4357
|
||||
v 265.3218 6.4266 213.4288
|
||||
v 263.5973 6.4266 211.1302
|
||||
v 262.4850 7.4721 210.7352
|
||||
v 262.4850 6.4266 210.2797
|
||||
v 260.2008 7.2359 212.7225
|
||||
v 260.2008 6.4266 212.7225
|
||||
v 258.8077 6.9348 213.4568
|
||||
v 258.8077 6.4266 213.4568
|
||||
# 23 vertices
|
||||
|
||||
vn -0.1045 0.9656 0.2381
|
||||
vn -0.0714 0.9675 0.2426
|
||||
vn -0.0765 0.9600 0.2692
|
||||
vn -0.2198 0.9737 0.0592
|
||||
vn -0.5572 0.7092 0.4320
|
||||
vn -0.5841 0.6510 0.4848
|
||||
vn -0.5783 0.6646 0.4731
|
||||
vn -0.5524 0.7183 0.4230
|
||||
vn -0.0433 0.9597 0.2776
|
||||
vn -0.0442 0.9581 0.2831
|
||||
vn -0.0371 0.9107 0.4113
|
||||
vn 0.0577 0.7655 0.6408
|
||||
vn 0.5290 0.0000 0.8486
|
||||
vn 0.1335 0.9581 -0.2536
|
||||
vn 0.0863 0.9481 -0.3061
|
||||
vn 0.1439 0.9596 -0.2418
|
||||
vn -0.2830 0.0000 0.9591
|
||||
vn 0.5353 0.2350 0.8113
|
||||
vn 0.6396 0.0000 0.7687
|
||||
vn 0.6113 0.0745 0.7879
|
||||
vn 0.5198 0.2631 0.8128
|
||||
vn 0.8405 0.3056 -0.4473
|
||||
vn 0.8881 0.4494 -0.0960
|
||||
vn 0.9133 0.3629 -0.1849
|
||||
vn 0.8323 0.2988 -0.4669
|
||||
vn 0.6938 0.4328 -0.5755
|
||||
vn 0.6623 0.4340 -0.6107
|
||||
vn 0.6160 0.3987 -0.6794
|
||||
vn 0.5740 0.3271 -0.7507
|
||||
vn -0.6117 0.0339 -0.7903
|
||||
vn -0.6427 0.3060 -0.7023
|
||||
vn -0.6640 0.2514 -0.7042
|
||||
vn -0.6068 0.0000 -0.7949
|
||||
vn -0.4663 0.0000 -0.8846
|
||||
vn -0.9783 0.0000 0.2073
|
||||
vn -0.8363 0.5481 0.0106
|
||||
vn -0.3116 0.9170 -0.2492
|
||||
vn -0.3055 0.9504 -0.0588
|
||||
vn -0.1780 0.9819 0.0650
|
||||
vn -0.1904 0.9751 0.1141
|
||||
vn -0.0635 0.9581 0.2793
|
||||
vn 0.1994 0.9639 -0.1767
|
||||
# 42 vertex normals
|
||||
|
||||
vt 0.5392 0.3019 0.0000
|
||||
vt 0.7065 0.2544 0.0000
|
||||
vt 1.0000 0.6640 0.0000
|
||||
vt 0.6185 0.7922 0.0000
|
||||
vt 0.1550 0.0000 0.0000
|
||||
vt 0.0000 0.0000 0.0000
|
||||
vt 0.5243 0.0000 0.0000
|
||||
vt 1.0000 0.0000 0.0000
|
||||
vt 1.0000 1.0000 0.0000
|
||||
vt 1.0000 0.2000 0.0000
|
||||
vt 0.8480 1.0000 0.0000
|
||||
vt 0.0000 1.0000 0.0000
|
||||
vt 0.0000 0.5090 0.0000
|
||||
# 13 texture coords
|
||||
|
||||
o Ice_6
|
||||
g Ice_6
|
||||
f 1/1/1 2/2/2 3/3/3
|
||||
f 4/4/4 1/1/1 3/3/3
|
||||
f 5/5/5 6/6/6 7/6/7
|
||||
f 8/5/8 5/5/5 7/6/7
|
||||
f 2/2/2 9/7/9 10/8/10
|
||||
f 9/7/9 5/5/11 8/5/12
|
||||
f 11/7/13 9/7/13 8/5/13
|
||||
f 4/4/14 3/3/15 12/9/16
|
||||
f 10/8/17 9/7/17 11/7/17
|
||||
f 13/8/17 10/8/17 11/7/17
|
||||
f 14/10/18 10/8/19 13/8/20
|
||||
f 15/10/21 14/10/18 13/8/20
|
||||
f 3/3/22 14/10/23 15/10/24
|
||||
f 16/3/25 3/3/22 15/10/24
|
||||
f 12/9/26 3/3/22 16/3/25
|
||||
f 17/9/27 12/9/26 16/3/25
|
||||
f 18/11/28 12/9/26 17/9/27
|
||||
f 19/11/29 18/11/28 17/9/27
|
||||
f 20/12/30 18/11/31 19/11/32
|
||||
f 21/12/33 20/12/30 19/11/32
|
||||
f 22/13/34 20/12/30 21/12/33
|
||||
f 23/13/34 22/13/34 21/12/33
|
||||
f 6/6/35 22/13/35 23/13/35
|
||||
f 7/6/36 6/6/36 23/13/36
|
||||
f 4/4/4 18/11/37 20/12/38
|
||||
f 20/12/38 22/13/39 6/6/40
|
||||
f 4/4/4 20/12/38 6/6/40
|
||||
f 5/5/11 9/7/9 2/2/2
|
||||
f 1/1/1 5/5/11 2/2/2
|
||||
f 6/6/40 5/5/11 1/1/1
|
||||
f 4/4/4 6/6/40 1/1/1
|
||||
f 14/10/41 3/3/3 2/2/2
|
||||
f 10/8/10 14/10/41 2/2/2
|
||||
f 12/9/16 18/11/42 4/4/14
|
||||
# 34 faces
|
||||
|
46
assets/ices.json
Normal file
46
assets/ices.json
Normal file
@ -0,0 +1,46 @@
|
||||
{
|
||||
"ices": [
|
||||
{
|
||||
"position": [ -20, 0, -50 ],
|
||||
"scale": 1,
|
||||
"angle": 0,
|
||||
"type": 1,
|
||||
"texture": 1
|
||||
},
|
||||
{
|
||||
"position": [ 30, 0, 30 ],
|
||||
"scale": 0.3,
|
||||
"angle": 0,
|
||||
"type": 2,
|
||||
"texture": 2
|
||||
},
|
||||
{
|
||||
"position": [ -10, 0, 50 ],
|
||||
"scale": 0.1,
|
||||
"angle": 0,
|
||||
"type": 3,
|
||||
"texture": 3
|
||||
},
|
||||
{
|
||||
"position": [ 0, 0, 50 ],
|
||||
"scale": 0.1,
|
||||
"angle": 0,
|
||||
"type": 4,
|
||||
"texture": 1
|
||||
},
|
||||
{
|
||||
"position": [ 30, 0, 30 ],
|
||||
"scale": 0.2,
|
||||
"angle": 0,
|
||||
"type": 5,
|
||||
"texture": 2
|
||||
},
|
||||
{
|
||||
"position": [ 50, 0, -50 ],
|
||||
"scale": 2,
|
||||
"angle": 0,
|
||||
"type": 6,
|
||||
"texture": 3
|
||||
}
|
||||
]
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
<Ices>
|
||||
|
||||
<Ice><ModelName>ice1.lm1</ModelName><PosX>0.0</PosX><PosZ>13.0</PosZ><Angle>110</Angle><Scale>2.0</Scale></Ice>
|
||||
<Ice><ModelName>ice2.lm1</ModelName><PosX>-3.0</PosX><PosZ>14.0</PosZ><Angle>70</Angle></Ice>
|
||||
<Ice><ModelName>ice3.lm1</ModelName><PosX>-4.0</PosX><PosZ>15.0</PosZ><Angle>160</Angle><Scale>2.0</Scale></Ice>
|
||||
<Ice><ModelName>ice6.lm1</ModelName><PosX>7.0</PosX><PosZ>13.5</PosZ><Angle>240</Angle></Ice>
|
||||
<Ice><ModelName>ice4.lm1</ModelName><PosX>4.0</PosX><PosZ>15.0</PosZ><Scale>1.4</Scale></Ice>
|
||||
<Ice><ModelName>ice5.lm1</ModelName><PosX>-6.0</PosX><PosZ>14.0</PosZ><Angle>60</Angle></Ice>
|
||||
<Ice><ModelName>ice6.lm1</ModelName><PosX>-1.0</PosX><PosZ>14.0</PosZ></Ice>
|
||||
<Ice><ModelName>ice1.lm1</ModelName><PosX>5.0</PosX><PosZ>13.0</PosZ><Scale>1.3</Scale></Ice>
|
||||
<Ice><ModelName>ice3.lm1</ModelName><PosX>-5.0</PosX><PosZ>15.0</PosZ><Angle>30</Angle></Ice>
|
||||
|
||||
|
||||
<Ice><ModelName>ice6.lm1</ModelName><PosX>9.0</PosX><PosZ>12.0</PosZ></Ice>
|
||||
<Ice><ModelName>ice4.lm1</ModelName><PosX>11.0</PosX><PosZ>11.0</PosZ><Angle>130</Angle><Scale>2.1</Scale></Ice>
|
||||
|
||||
|
||||
<Ice><ModelName>ice4.lm1</ModelName><PosX>13.0</PosX><PosZ>10.0</PosZ><Angle>240</Angle><Scale>1.5</Scale></Ice>
|
||||
|
||||
<Ice><ModelName>ice1.lm1</ModelName><PosX>14.0</PosX><PosZ>6.0</PosZ></Ice>
|
||||
<Ice><ModelName>ice2.lm1</ModelName><PosX>16.0</PosX><PosZ>4.5</PosZ><Scale>1.8</Scale></Ice>
|
||||
<Ice><ModelName>ice3.lm1</ModelName><PosX>18.0</PosX><PosZ>2.0</PosZ><Angle>340</Angle></Ice>
|
||||
|
||||
<Ice><ModelName>ice4.lm1</ModelName><PosX>17.0</PosX><PosZ>2.0</PosZ><Scale>2.0</Scale></Ice>
|
||||
<Ice><ModelName>ice2.lm1</ModelName><PosX>18.0</PosX><PosZ>-1.5</PosZ><Angle>60</Angle><Scale>1.5</Scale></Ice>
|
||||
<Ice><ModelName>ice1.lm1</ModelName><PosX>15.0</PosX><PosZ>-5.5</PosZ><Angle>130</Angle><Scale>2.0</Scale></Ice>
|
||||
<Ice><ModelName>ice5.lm1</ModelName><PosX>12.0</PosX><PosZ>-8.0</PosZ><Angle>160</Angle></Ice>
|
||||
|
||||
</Ices>
|
15660
assets/mountain/mountain2.obj
Executable file
15660
assets/mountain/mountain2.obj
Executable file
File diff suppressed because it is too large
Load Diff
@ -10,13 +10,14 @@ varying vec2 texCoord;
|
||||
|
||||
varying vec3 camVec;
|
||||
varying vec3 normVec;
|
||||
varying vec3 posVec;
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
vec3 nvec = normalize(normVec);
|
||||
|
||||
float cosf = max(0.0, dot(nvec, -LightDirection));
|
||||
float cosf = max(0.0, dot(nvec, LightDirection));
|
||||
|
||||
//gl_FragColor = vec4((texture2D(Texture, texCoord).rgb * (cosf * 0.75 + 0.25)), 1.0); //day
|
||||
//gl_FragColor = vec4((texture2D(Texture, texCoord).rgb * (cosf * 0.5 + 0.25)), 1.0); //twilight
|
||||
|
@ -10,6 +10,7 @@ uniform vec3 CamPos;
|
||||
varying vec2 texCoord;
|
||||
varying vec3 camVec;
|
||||
varying vec3 normVec;
|
||||
varying vec3 posVec;
|
||||
|
||||
void main()
|
||||
{
|
||||
@ -27,4 +28,6 @@ void main()
|
||||
camVec = cVec * rot;
|
||||
|
||||
normVec = Normal;
|
||||
|
||||
posVec = vPosition;
|
||||
}
|
@ -32,6 +32,9 @@ extern bool SnowPref;
|
||||
|
||||
boost::mutex m2;
|
||||
|
||||
TPanoramicCamera mCamera;
|
||||
const float cameraDistance = 100.f;
|
||||
std::vector<int> iceIndexes;
|
||||
|
||||
class LoadingQueueVisitor : public boost::static_visitor<void>
|
||||
{
|
||||
@ -67,43 +70,74 @@ TAndroidApplication::TAndroidApplication()
|
||||
|
||||
void TAndroidApplication::Serialize(boost::property_tree::ptree& propertyTree)
|
||||
{
|
||||
BOOST_FOREACH(boost::property_tree::ptree::value_type &v, propertyTree.get_child("Ices"))
|
||||
{
|
||||
|
||||
std::string modelName = v.second.get<std::string>("ModelName");
|
||||
float posx = v.second.get<float>("PosX");
|
||||
float posz = v.second.get<float>("PosZ");
|
||||
|
||||
float angle = v.second.get<float>("Angle", 0.f);
|
||||
float scale = v.second.get<float>("Scale", 1.f);
|
||||
|
||||
Matrix4f iceTransformation = Affine3f(Scaling(scale)).matrix();
|
||||
Matrix3f rotation(Quaternionf(0, cos(angle*pi / 360.f), 0, sin(angle*pi / 360.f)).toRotationMatrix());
|
||||
iceTransformation = Affine3f(rotation).matrix() * iceTransformation;
|
||||
iceTransformation = Affine3f(Translation3f(posx, 0, posz)).matrix() * iceTransformation;
|
||||
|
||||
iceTransformations.push_back(iceTransformation);
|
||||
}
|
||||
}
|
||||
|
||||
float myMin(float a, float b)
|
||||
{
|
||||
return a < b ? a : b;
|
||||
}
|
||||
|
||||
float myMax(float a, float b)
|
||||
{
|
||||
return a > b ? a : b;
|
||||
}
|
||||
|
||||
void TAndroidApplication::LoadModels()
|
||||
{
|
||||
|
||||
auto objData = loadObjFile("mountain/mountain.obj", "");
|
||||
auto objData = loadObjFile("mountain/mountain2.obj", "");
|
||||
mountain = ObjDataToRenderPairs(objData)[0][0];
|
||||
|
||||
mountainTransformation = Affine3f(Scaling(0.5f)).matrix();
|
||||
Matrix3f rotation(Quaternionf(0, 1 * sin(pi / 8 + pi / 2), 0, 1 * cos(pi / 8 + pi / 2)).toRotationMatrix());
|
||||
mountainTransformation = Affine3f(rotation).matrix() * mountainTransformation;
|
||||
ResourceManager->TexList.AddTexture("mountain.png");
|
||||
mountain.first.SamplerMap[CONST_STRING_TEXTURE_UNIFORM] = "mountain.png";
|
||||
|
||||
objData = loadObjFile("ice/ice.obj", "");
|
||||
ice = ObjDataToRenderPairs(objData)[0][0];
|
||||
Vector3f size = objData.models[0].maxCorner - objData.models[0].minCorner;
|
||||
float radius = myMax(size[0], myMax(size[1], size[2])) / 2;
|
||||
|
||||
mountainTransformation = Affine3f(Scaling(cameraDistance / radius * 0.25f)).matrix();
|
||||
//Matrix3f rotation(Quaternionf(0, 1 * sin(pi / 8 + pi / 2), 0, 1 * cos(pi / 8 + pi / 2)).toRotationMatrix());
|
||||
//mountainTransformation = Affine3f(rotation).matrix() * mountainTransformation;
|
||||
//mountainTransformation = Affine3f(Translation3f(0, 0, -size[2] / 2.f)).matrix() * mountainTransformation;
|
||||
|
||||
for (int i = 1; i <= 6; ++i)
|
||||
{
|
||||
objData = loadObjFile("ice/ice" + std::to_string(i) + ".obj", "");
|
||||
ices[i - 1] = ObjDataToRenderPairs(objData)[0][0].second;
|
||||
}
|
||||
|
||||
size = objData.models[0].maxCorner - objData.models[0].minCorner;
|
||||
Vector3f centerShift = -(objData.models[0].maxCorner + objData.models[0].minCorner) / 2;
|
||||
radius = myMax(size[0], myMax(size[1], size[2])) / 2;
|
||||
|
||||
ResourceManager->TexList.AddTexture("ice/Textures/ice1.png");
|
||||
ResourceManager->TexList.AddTexture("ice/Textures/ice2.png");
|
||||
ResourceManager->TexList.AddTexture("ice/Textures/ice3.png");
|
||||
|
||||
std::shared_ptr<boost::property_tree::ptree> p = FileToPropertyTree("ices.xml");
|
||||
std::shared_ptr<boost::property_tree::ptree> p = FileToPropertyTree("ices.json");
|
||||
|
||||
Serialize(*p);
|
||||
for (auto ice : p->get_child("ices"))
|
||||
{
|
||||
TRenderParams params;
|
||||
|
||||
Vector3f position = JSONVectorReader::readVector3f(ice.second.get_child("position"));
|
||||
float scale = ice.second.get<float>("scale");
|
||||
float angle = ice.second.get<float>("angle");
|
||||
iceIndexes.push_back(ice.second.get<int>("type"));
|
||||
|
||||
params.SamplerMap[CONST_STRING_TEXTURE_UNIFORM] = "ice" + ice.second.get<std::string>("texture") + ".png";
|
||||
|
||||
iceParams.push_back(params);
|
||||
|
||||
Matrix4f iceTransformation = Affine3f(Translation3f(centerShift)).matrix();
|
||||
iceTransformation = Affine3f(Scaling(cameraDistance / radius * 0.1f * scale)).matrix() * iceTransformation;
|
||||
//Matrix3f rotation(Quaternionf(0, cos(angle*pi / 360.f), 0, sin(angle*pi / 360.f)).toRotationMatrix());
|
||||
//iceTransformation = Affine3f(rotation).matrix() * iceTransformation;
|
||||
iceTransformation = Affine3f(Translation3f(position)).matrix() * iceTransformation;
|
||||
|
||||
iceTransformations.push_back(iceTransformation);
|
||||
}
|
||||
|
||||
//Serialize(*p);
|
||||
}
|
||||
|
||||
void TAndroidApplication::AddFrameBuffers()
|
||||
@ -118,51 +152,29 @@ void TAndroidApplication::DrawSceneWithoutWater(bool inv)
|
||||
|
||||
|
||||
Renderer->PushProjectionMatrix(1,1);
|
||||
Renderer->LoadIdentity();
|
||||
Renderer->PushSpecialMatrix(Matrix4f::Identity());
|
||||
|
||||
if (inv)
|
||||
if (TimeOfDayPref == 2)
|
||||
{
|
||||
|
||||
|
||||
if (TimeOfDayPref == 2)
|
||||
{
|
||||
glBindTexture(GL_TEXTURE_2D, ResourceManager->TexList["sky_night.png"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
glBindTexture(GL_TEXTURE_2D, ResourceManager->TexList["sky.png"]);
|
||||
}
|
||||
Renderer->DrawRect(Vector2f(0.0f, 0.56f), Vector2f(1.f, 0.f), Vector2f(0.5f + SkyTexShift, 0.f), Vector2f(1.f + SkyTexShift, 1.f));
|
||||
|
||||
if (TimeOfDayPref == 1)
|
||||
{
|
||||
glClear(GL_DEPTH_BUFFER_BIT);
|
||||
glBindTexture(GL_TEXTURE_2D, ResourceManager->TexList["final_cloud.png"]);
|
||||
Renderer->DrawRect(Vector2f(0.0f, 0.56f), Vector2f(4.f, 0.f), Vector2f(0.0f + SkyTexShift + CloudTimer, 0.f), Vector2f(1.f + SkyTexShift + CloudTimer, 0.5f));
|
||||
}
|
||||
glBindTexture(GL_TEXTURE_2D, ResourceManager->TexList["sky_night.png"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (TimeOfDayPref == 2)
|
||||
{
|
||||
glBindTexture(GL_TEXTURE_2D, ResourceManager->TexList["sky_night.png"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
glBindTexture(GL_TEXTURE_2D, ResourceManager->TexList["sky.png"]);
|
||||
}
|
||||
Renderer->DrawRect(Vector2f(0.0f, 0.54f), Vector2f(1.f, 1.f), Vector2f(0.5f + SkyTexShift, 0.f), Vector2f(1.f + SkyTexShift, 1.f));
|
||||
glBindTexture(GL_TEXTURE_2D, ResourceManager->TexList["sky.png"]);
|
||||
}
|
||||
|
||||
if (TimeOfDayPref == 1)
|
||||
{
|
||||
glClear(GL_DEPTH_BUFFER_BIT);
|
||||
glBindTexture(GL_TEXTURE_2D, ResourceManager->TexList["final_cloud.png"]);
|
||||
Renderer->DrawRect(Vector2f(0.0f, 0.54f), Vector2f(4.f, 1.f), Vector2f(0.0f + SkyTexShift + CloudTimer, 0.f), Vector2f(1.f + SkyTexShift + CloudTimer, 0.5f));
|
||||
}
|
||||
Renderer->DrawRect(Vector2f(0.0f, 0.56f), Vector2f(1.f, 0.f), Vector2f(0.5f + SkyTexShift, 0.f), Vector2f(1.f + SkyTexShift, 1.f));
|
||||
|
||||
if (TimeOfDayPref == 1)
|
||||
{
|
||||
glClear(GL_DEPTH_BUFFER_BIT);
|
||||
glBindTexture(GL_TEXTURE_2D, ResourceManager->TexList["final_cloud.png"]);
|
||||
Renderer->DrawRect(Vector2f(0.0f, 0.56f), Vector2f(4.f, 0.f), Vector2f(0.0f + SkyTexShift + CloudTimer, 0.f), Vector2f(1.f + SkyTexShift + CloudTimer, 0.5f));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Renderer->PopMatrix();
|
||||
Renderer->PopProjectionMatrix();
|
||||
|
||||
glClear(GL_DEPTH_BUFFER_BIT);
|
||||
@ -170,12 +182,16 @@ void TAndroidApplication::DrawSceneWithoutWater(bool inv)
|
||||
|
||||
if (inv)
|
||||
{
|
||||
Renderer->PushMatrix();
|
||||
Renderer->TranslateMatrix(Vector3f(0,0.1f,0));
|
||||
Renderer->ScaleMatrix(Vector3f(1, -1, 1));
|
||||
}
|
||||
|
||||
Renderer->PushShader("SimplelightShader");
|
||||
|
||||
RenderUniform3fv("LightDirection", Vector3f(1, 1, 1).data());
|
||||
|
||||
|
||||
Vector3f dayColor = Vector3f(0,0,0);
|
||||
Vector3f nightColor = Vector3f(0, 0.1f, 0.2f);
|
||||
|
||||
@ -200,35 +216,45 @@ void TAndroidApplication::DrawSceneWithoutWater(bool inv)
|
||||
}
|
||||
|
||||
|
||||
Renderer->PushPerspectiveProjectionMatrix(pi/6, Renderer->GetMatrixWidth() / Renderer->GetMatrixHeight(), 1.f, 450.f);
|
||||
Renderer->PushPerspectiveProjectionMatrix(pi/6, Renderer->GetMatrixWidth() / Renderer->GetMatrixHeight(), 1.f, 450.f);
|
||||
Renderer->PushMatrix();
|
||||
//mCamera.SetCamView();
|
||||
|
||||
{
|
||||
Renderer->PushMatrix();
|
||||
Renderer->AddMatrix(mountainTransformation);
|
||||
|
||||
//RenderUniform4fv("light")
|
||||
|
||||
TRenderParamsSetter setter(mountain.first);
|
||||
Renderer->DrawTriangleList(mountain.second);
|
||||
|
||||
Renderer->PopMatrix();
|
||||
}
|
||||
|
||||
{
|
||||
for (int i = 0; i < iceTransformations.size(); i++)
|
||||
{
|
||||
Renderer->PushSpecialMatrix(mountainTransformation);
|
||||
Renderer->PushMatrix();
|
||||
Renderer->AddMatrix(iceTransformations[i]);
|
||||
|
||||
//RenderUniform4fv("light")
|
||||
|
||||
TRenderParamsSetter setter(mountain.first);
|
||||
Renderer->DrawTriangleList(mountain.second);
|
||||
auto& renderPair = ices[iceIndexes[i] - 1];
|
||||
TRenderParamsSetter setter(iceParams[i]);
|
||||
Renderer->DrawTriangleList(ices[iceIndexes[i] - 1]);
|
||||
|
||||
Renderer->PopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
TRenderParamsSetter setter(ice.first);
|
||||
Renderer->PopMatrix();
|
||||
Renderer->PopProjectionMatrix();\
|
||||
|
||||
for (int i = 0; i < iceTransformations.size(); i++)
|
||||
{
|
||||
Renderer->PushSpecialMatrix(iceTransformations[i]);
|
||||
if (inv)
|
||||
{
|
||||
Renderer->PopMatrix();
|
||||
}
|
||||
|
||||
Renderer->DrawTriangleList(ice.second);
|
||||
|
||||
Renderer->PopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
Renderer->PopProjectionMatrix();
|
||||
|
||||
Renderer->PopShader();
|
||||
Renderer->PopShader();
|
||||
}
|
||||
|
||||
void TAndroidApplication::DrawSnow()
|
||||
@ -252,7 +278,7 @@ void TAndroidApplication::DrawSnow()
|
||||
|
||||
void TAndroidApplication::DrawAllScene(bool toScreen)
|
||||
{
|
||||
glClearColor(0.f, 0.f, 0.f, 1.0f);
|
||||
glClearColor(1.f, 0.f, 1.f, 1.0f);
|
||||
//glClearColor(1.f, 1.f, 1.f, 1.0f);
|
||||
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
|
||||
|
||||
@ -378,21 +404,24 @@ void TAndroidApplication::InnerInit()
|
||||
|
||||
CheckGlError();
|
||||
|
||||
|
||||
boost::get<TPanoramicCamera>(Renderer->Camera).MovePhi(pi/32);
|
||||
boost::get<TPanoramicCamera>(Renderer->Camera).MovePhi(pi / 32);
|
||||
mCamera.MovePhi(pi/32);
|
||||
|
||||
|
||||
if (Renderer->GetScreenWidth() > Renderer->GetScreenHeight())
|
||||
{
|
||||
boost::get<TPanoramicCamera>(Renderer->Camera).MoveDist(30.f);
|
||||
mCamera.MoveDist(cameraDistance);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
boost::get<TPanoramicCamera>(Renderer->Camera).MoveDist(45.f);
|
||||
boost::get<TPanoramicCamera>(Renderer->Camera).MoveDist(30.f);
|
||||
mCamera.MoveDist(cameraDistance);
|
||||
}
|
||||
|
||||
boost::get<TPanoramicCamera>(Renderer->Camera).CalcCamVec();
|
||||
mCamera.CalcCamVec();
|
||||
|
||||
CheckGlError();
|
||||
|
||||
@ -400,7 +429,7 @@ void TAndroidApplication::InnerInit()
|
||||
|
||||
//ResourceManager->LightManager.SetLightDirection(Vector3f(1, -1, 0));
|
||||
|
||||
//AddFrameBuffers();
|
||||
AddFrameBuffers();
|
||||
|
||||
//Renderer->SetPerspectiveFullScreenViewport();
|
||||
|
||||
@ -450,13 +479,13 @@ void TAndroidApplication::InnerDraw()
|
||||
m2.lock();
|
||||
if (!Loaded)
|
||||
{
|
||||
glClearColor(0.f, 0.f, 0.f, 1.0f);
|
||||
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
|
||||
glBindTexture(GL_TEXTURE_2D, ResourceManager->TexList["ScreenshotTexture"]);
|
||||
Renderer->PushProjectionMatrix(1,1);
|
||||
Renderer->LoadIdentity();
|
||||
Renderer->DrawRect(Vector2f(0, 0), Vector2f(1.f, 1.f));
|
||||
Renderer->PopProjectionMatrix();
|
||||
//glClearColor(0.f, 0.f, 0.f, 1.0f);
|
||||
//glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
|
||||
//glBindTexture(GL_TEXTURE_2D, ResourceManager->TexList["ScreenshotTexture"]);
|
||||
//Renderer->PushProjectionMatrix(1,1);
|
||||
//Renderer->LoadIdentity();
|
||||
//Renderer->DrawRect(Vector2f(0, 0), Vector2f(1.f, 1.f));
|
||||
//Renderer->PopProjectionMatrix();
|
||||
|
||||
}
|
||||
else
|
||||
@ -467,15 +496,15 @@ void TAndroidApplication::InnerDraw()
|
||||
|
||||
if (makeShot)
|
||||
{
|
||||
makeShot = false;
|
||||
//makeShot = false;
|
||||
|
||||
Renderer->SwitchToFrameBuffer("ScreenshotFrame");
|
||||
//Renderer->SwitchToFrameBuffer("ScreenshotFrame");
|
||||
|
||||
DrawAllScene(false);
|
||||
//DrawAllScene(false);
|
||||
|
||||
ResourceManager->TexList.SaveTexDataToPlainBmpToUserData("file.bmp", ResourceManager->FrameManager.ReadFromBufferToTexData("ScreenshotFrame"));
|
||||
//ResourceManager->TexList.SaveTexDataToPlainBmpToUserData("file.bmp", ResourceManager->FrameManager.ReadFromBufferToTexData("ScreenshotFrame"));
|
||||
|
||||
Renderer->SwitchToScreen();
|
||||
//Renderer->SwitchToScreen();
|
||||
|
||||
}
|
||||
}
|
||||
@ -539,12 +568,13 @@ void TAndroidApplication::InnerUpdate(size_t dt)
|
||||
|
||||
}
|
||||
|
||||
void TAndroidApplication::InnerOnMove(Vector2f shift)
|
||||
void TAndroidApplication::InnerOnMove(Vector2f pos, Vector2f shift)
|
||||
{
|
||||
|
||||
shift = Vector2f(shift[0]*Renderer->GetMatrixWidth()/static_cast<float>(Renderer->GetScreenWidth()), shift[1]*Renderer->GetMatrixHeight()/static_cast<float>(Renderer->GetScreenHeight()));
|
||||
|
||||
boost::get<TPanoramicCamera>(Renderer->Camera).MoveAlpha(-pi*shift[0]*0.1f);
|
||||
boost::get<TPanoramicCamera>(Renderer->Camera).MoveAlpha(-pi * shift[0] * 0.01f);
|
||||
mCamera.MoveAlpha(-pi*shift[0]*0.01f);
|
||||
}
|
||||
|
||||
void TAndroidApplication::OnMouseDown(TMouseState& mouseState)
|
||||
|
@ -50,7 +50,8 @@ public:
|
||||
TRenderPair mountain;
|
||||
Matrix4f mountainTransformation;
|
||||
|
||||
TRenderPair ice;
|
||||
std::array<TTriangleList, 6> ices;
|
||||
std::vector<TRenderParams> iceParams;
|
||||
std::vector<Matrix4f> iceTransformations;
|
||||
|
||||
float WaterTimer;
|
||||
@ -69,7 +70,7 @@ public:
|
||||
|
||||
virtual void InnerUpdate(size_t dt);
|
||||
|
||||
virtual void InnerOnMove(Vector2f shift);
|
||||
virtual void InnerOnMove(Vector2f pos, Vector2f shift) override;
|
||||
|
||||
virtual void OnMouseDown(TMouseState& mouseState);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user