This commit is contained in:
sfroitzheim 2014-11-17 15:44:31 +01:00
commit 8f64f75b67
40 changed files with 14536 additions and 358 deletions

2
.gitignore vendored
View File

@ -1,3 +1,5 @@
binaries
build
Makefile
CMakeLists.txt.user
*.cbp

720
Levels/Geometry/Block.obj Normal file
View File

@ -0,0 +1,720 @@
# Blender v2.71 (sub 0) OBJ File: 'ruins_block.blend'
# www.blender.org
o Block_Cube
v -1.000000 -1.000000 1.000000
v -1.000000 -1.000000 -1.000000
v -1.000000 1.000000 1.000000
v -1.000000 1.000000 -1.000000
v -1.000000 -1.000000 1.000000
v -1.000000 -1.000000 -1.000000
v -1.000000 1.000000 1.000000
v -1.000000 1.000000 -1.000000
v 1.000000 -0.973911 -0.973911
v 0.973911 -1.000000 -1.000000
v 0.973911 -1.000000 -1.000000
v 0.999735 -0.977624 -0.975900
v 0.998943 -0.981261 -0.978115
v 0.997642 -0.984749 -0.980509
v 0.995859 -0.988016 -0.983034
v 0.993628 -0.990996 -0.985640
v 0.990996 -0.993628 -0.988272
v 0.988016 -0.995859 -0.990877
v 0.984749 -0.997642 -0.993402
v 0.981261 -0.998943 -0.995797
v 0.977624 -0.999735 -0.998011
v 0.977624 -0.998011 -0.999734
v 0.981261 -0.995797 -0.998943
v 0.984749 -0.993402 -0.997642
v 0.988016 -0.990877 -0.995858
v 0.990996 -0.988272 -0.993628
v 0.993628 -0.985640 -0.990996
v 0.995859 -0.983034 -0.988016
v 0.997642 -0.980509 -0.984749
v 0.998943 -0.978115 -0.981261
v 0.999735 -0.975900 -0.977624
v 0.973911 -1.000000 1.000000
v 1.000000 -0.973911 0.973911
v 0.973911 -1.000000 1.000000
v 0.977624 -0.999735 0.998011
v 0.981261 -0.998943 0.995797
v 0.984749 -0.997642 0.993402
v 0.988016 -0.995859 0.990877
v 0.990996 -0.993628 0.988272
v 0.993628 -0.990996 0.985640
v 0.995859 -0.988016 0.983034
v 0.997642 -0.984749 0.980509
v 0.998943 -0.981261 0.978115
v 0.999735 -0.977624 0.975900
v 0.999735 -0.975900 0.977624
v 0.998943 -0.978115 0.981261
v 0.997642 -0.980509 0.984749
v 0.995859 -0.983034 0.988016
v 0.993628 -0.985640 0.990996
v 0.990996 -0.988272 0.993628
v 0.988016 -0.990877 0.995859
v 0.984749 -0.993402 0.997642
v 0.981261 -0.995797 0.998943
v 0.977624 -0.998011 0.999735
v 1.000000 0.973911 -0.973911
v 0.973912 1.000000 -0.999999
v 0.973912 1.000000 -0.999999
v 0.999735 0.975900 -0.977623
v 0.998944 0.978115 -0.981261
v 0.997643 0.980509 -0.984748
v 0.995859 0.983034 -0.988015
v 0.993628 0.985640 -0.990995
v 0.990996 0.988272 -0.993627
v 0.988016 0.990877 -0.995858
v 0.984749 0.993402 -0.997642
v 0.981262 0.995797 -0.998943
v 0.977625 0.998011 -0.999734
v 0.977625 0.999735 -0.998010
v 0.981262 0.998943 -0.995796
v 0.984749 0.997642 -0.993402
v 0.988016 0.995859 -0.990876
v 0.990996 0.993628 -0.988271
v 0.993628 0.990996 -0.985639
v 0.995859 0.988016 -0.983034
v 0.997643 0.984749 -0.980508
v 0.998944 0.981261 -0.978114
v 0.999735 0.977624 -0.975900
v 0.973911 1.000000 1.000001
v 0.999999 0.973911 0.973912
v 0.973911 1.000000 1.000001
v 0.977623 0.998011 0.999735
v 0.981261 0.995797 0.998944
v 0.984748 0.993402 0.997643
v 0.988015 0.990877 0.995859
v 0.990995 0.988272 0.993628
v 0.993627 0.985640 0.990996
v 0.995858 0.983034 0.988017
v 0.997642 0.980509 0.984750
v 0.998942 0.978115 0.981262
v 0.999734 0.975900 0.977625
v 0.999734 0.977624 0.975901
v 0.998942 0.981261 0.978115
v 0.997642 0.984749 0.980510
v 0.995858 0.988016 0.983035
v 0.993627 0.990996 0.985640
v 0.990995 0.993628 0.988272
v 0.988015 0.995859 0.990878
v 0.984748 0.997642 0.993403
v 0.981261 0.998943 0.995797
v 0.977623 0.999735 0.998011
v -2.999704 -0.973911 0.973911
v -2.973616 -1.000000 0.999999
v -2.973616 -1.000000 0.999999
v -2.999439 -0.977624 0.975900
v -2.998648 -0.981262 0.978114
v -2.997347 -0.984749 0.980508
v -2.995563 -0.988016 0.983034
v -2.993332 -0.990996 0.985639
v -2.990700 -0.993628 0.988271
v -2.987720 -0.995859 0.990876
v -2.984453 -0.997643 0.993402
v -2.980966 -0.998944 0.995796
v -2.977329 -0.999735 0.998010
v -2.977329 -0.998011 0.999734
v -2.980966 -0.995797 0.998943
v -2.984453 -0.993403 0.997642
v -2.987720 -0.990877 0.995858
v -2.990700 -0.988272 0.993627
v -2.993332 -0.985640 0.990995
v -2.995563 -0.983035 0.988015
v -2.997347 -0.980509 0.984748
v -2.998648 -0.978115 0.981261
v -2.999439 -0.975901 0.977624
v -2.973615 -1.000000 -1.000001
v -2.999704 -0.973911 -0.973912
v -2.973615 -1.000000 -1.000001
v -2.977328 -0.999735 -0.998012
v -2.980965 -0.998944 -0.995798
v -2.984453 -0.997643 -0.993403
v -2.987720 -0.995859 -0.990878
v -2.990700 -0.993628 -0.988273
v -2.993332 -0.990996 -0.985640
v -2.995562 -0.988016 -0.983035
v -2.997346 -0.984749 -0.980510
v -2.998647 -0.981262 -0.978115
v -2.999438 -0.977624 -0.975901
v -2.999438 -0.975901 -0.977625
v -2.998647 -0.978115 -0.981262
v -2.997346 -0.980509 -0.984750
v -2.995562 -0.983035 -0.988017
v -2.993332 -0.985640 -0.990997
v -2.990700 -0.988272 -0.993629
v -2.987720 -0.990877 -0.995859
v -2.984453 -0.993403 -0.997643
v -2.980965 -0.995797 -0.998944
v -2.977328 -0.998011 -0.999735
v -2.999705 0.973911 0.973910
v -2.973616 1.000000 0.999999
v -2.973616 1.000000 0.999999
v -2.999439 0.975900 0.977623
v -2.998648 0.978114 0.981260
v -2.997347 0.980509 0.984748
v -2.995563 0.983034 0.988015
v -2.993333 0.985639 0.990995
v -2.990700 0.988271 0.993627
v -2.987721 0.990877 0.995858
v -2.984454 0.993402 0.997642
v -2.980966 0.995796 0.998942
v -2.977329 0.998011 0.999734
v -2.977329 0.999734 0.998010
v -2.980966 0.998943 0.995796
v -2.984454 0.997642 0.993402
v -2.987721 0.995858 0.990876
v -2.990700 0.993628 0.988271
v -2.993333 0.990996 0.985639
v -2.995563 0.988016 0.983034
v -2.997347 0.984749 0.980508
v -2.998648 0.981261 0.978114
v -2.999439 0.977624 0.975900
v -2.973616 1.000000 -1.000000
v -2.999704 0.973911 -0.973912
v -2.973616 1.000000 -1.000000
v -2.977329 0.998011 -0.999735
v -2.980966 0.995796 -0.998944
v -2.984453 0.993402 -0.997643
v -2.987720 0.990877 -0.995859
v -2.990700 0.988271 -0.993628
v -2.993332 0.985639 -0.990996
v -2.995563 0.983034 -0.988016
v -2.997347 0.980509 -0.984749
v -2.998648 0.978114 -0.981262
v -2.999439 0.975900 -0.977625
v -2.999439 0.977624 -0.975901
v -2.998648 0.981261 -0.978115
v -2.997347 0.984749 -0.980509
v -2.995563 0.988016 -0.983035
v -2.993332 0.990996 -0.985640
v -2.990700 0.993628 -0.988272
v -2.987720 0.995858 -0.990877
v -2.984453 0.997642 -0.993403
v -2.980966 0.998943 -0.995797
v -2.977329 0.999734 -0.998011
vt 0.839733 0.000000
vt 0.848833 0.013044
vt -0.537296 -0.000000
vt -0.546397 0.013044
vt 0.151167 0.000000
vt 0.839733 0.013044
vt 0.839733 0.986956
vt 0.160267 0.986956
vt 0.160267 0.013044
vt 0.848833 0.000000
vt 0.160370 0.000000
vt 0.151270 0.013045
vt 1.537399 0.000000
vt 1.546500 0.013044
vt 0.974265 0.996942
vt -0.001961 0.996942
vt -0.001961 -0.003057
vt 0.974264 -0.003058
vt 0.848834 -0.013044
vt -0.546397 -0.013044
vt -0.537296 -1.000000
vt 0.839733 -1.000000
vt 0.947629 -0.000000
vt 0.003341 -0.000000
vt 0.003341 1.000000
vt 0.947629 1.000000
vt 0.839732 1.000000
vt -0.537296 1.000000
vt 0.151167 1.000000
vt 0.841028 0.000995
vt 0.841028 0.000133
vt 0.842297 0.002102
vt 0.842297 0.000528
vt 0.848011 0.003299
vt 0.846532 0.001179
vt 0.847367 0.000528
vt 0.848465 0.002102
vt 0.847389 0.004562
vt 0.845651 0.002071
vt 0.846610 0.005864
vt 0.844742 0.003186
vt 0.845692 0.007180
vt 0.843824 0.004502
vt 0.844653 0.008483
vt 0.842915 0.005992
vt 0.843513 0.009746
vt 0.842034 0.007626
vt 0.842297 0.010943
vt 0.841199 0.009369
vt 0.840427 0.011188
vt 0.841028 0.012050
vt 0.158972 0.012050
vt 0.159573 0.011188
vt 0.157703 0.010943
vt 0.158801 0.009369
vt 0.156487 0.009746
vt 0.157966 0.007626
vt 0.155347 0.008483
vt 0.157085 0.005992
vt 0.154308 0.007180
vt 0.156176 0.004502
vt 0.153389 0.005864
vt 0.155258 0.003186
vt 0.152611 0.004562
vt 0.154349 0.002071
vt 0.151989 0.003299
vt 0.153468 0.001179
vt 0.151535 0.002102
vt 0.152633 0.000528
vt 0.841028 0.999867
vt 0.841028 0.999005
vt 0.842297 0.999472
vt 0.842297 0.997898
vt 0.846532 0.998821
vt 0.848011 0.996701
vt 0.848464 0.997898
vt 0.847367 0.999472
vt 0.845651 0.997929
vt 0.847388 0.995438
vt 0.844742 0.996814
vt 0.846610 0.994136
vt 0.843824 0.995498
vt 0.845692 0.992820
vt 0.842915 0.994008
vt 0.844653 0.991517
vt 0.842034 0.992374
vt 0.843513 0.990254
vt 0.841199 0.990631
vt 0.842296 0.989057
vt 0.841028 0.987950
vt 0.840426 0.988812
vt 0.159573 0.988812
vt 0.158972 0.987950
vt 0.158801 0.990631
vt 0.157703 0.989057
vt 0.157966 0.992374
vt 0.156487 0.990254
vt 0.157085 0.994008
vt 0.155347 0.991517
vt 0.156176 0.995498
vt 0.154307 0.992820
vt 0.155258 0.996814
vt 0.153389 0.994136
vt 0.154349 0.997929
vt 0.152611 0.995438
vt 0.153468 0.998821
vt 0.151989 0.996701
vt 0.152633 0.999472
vt 0.151535 0.997898
vt 0.841028 1.000132
vt 0.841028 1.000994
vt 0.159075 0.000133
vt 0.159075 0.000995
vt 0.157807 0.000529
vt 0.157807 0.002102
vt 0.159075 0.999006
vt 0.157807 0.997899
vt 0.157807 0.999472
vt 0.159075 0.999868
vt 0.159075 -0.000994
vt 0.159075 -0.000132
vt 0.160370 1.000000
vt 0.846610 0.992820
vt 0.846610 0.007180
vt 0.845692 0.005864
vt 0.845692 0.994136
vt 0.844653 0.004562
vt 0.844653 0.995438
vt 0.843513 0.003299
vt 0.843513 0.996701
vt 0.153493 0.007180
vt 0.153493 0.992820
vt 0.154411 0.994136
vt 0.154411 0.005864
vt 0.155450 0.995439
vt 0.155450 0.004562
vt 0.156590 0.996702
vt 0.156590 0.003299
vt 0.160370 2.000000
vt 0.159075 1.999005
vt 0.159075 1.000994
vt 0.927508 0.000000
vt 0.003734 0.000000
vt 0.003734 1.000000
vt 0.927508 1.000000
vn 0.000000 0.167500 -0.985900
vn 1.000000 0.000000 0.000000
vn 0.000000 -0.447200 0.894400
vn -0.000000 1.000000 0.000000
vn -1.000000 -0.000000 -0.000000
vn 0.000000 0.911700 0.410900
vn 0.000000 -0.440200 -0.897900
vn -0.000000 -0.000000 1.000000
vn -0.000000 -0.122600 0.992500
vn 0.000000 0.000000 -1.000000
vn 0.000000 0.549700 -0.835400
vn 0.000000 -0.911800 -0.410700
vn 0.394600 -0.649700 -0.649800
vn 0.504500 -0.610500 -0.610500
vn 0.599600 -0.565900 -0.565900
vn 0.682100 -0.517100 -0.517100
vn 0.753900 -0.464500 -0.464600
vn 0.816500 -0.408300 -0.408300
vn 0.870700 -0.347700 -0.347800
vn 0.916800 -0.282400 -0.282400
vn 0.954400 -0.211100 -0.211100
vn 0.982200 -0.132800 -0.132800
vn 0.997800 -0.046400 -0.046500
vn 0.997800 -0.046400 0.046500
vn 0.982200 -0.132800 0.132800
vn 0.954400 -0.211100 0.211100
vn 0.916800 -0.282400 0.282400
vn 0.870700 -0.347700 0.347700
vn 0.816500 -0.408200 0.408200
vn 0.753900 -0.464600 0.464600
vn 0.682100 -0.517100 0.517100
vn 0.599600 -0.565900 0.565900
vn 0.504500 -0.610500 0.610500
vn 0.394600 -0.649800 0.649700
vn 0.394600 0.649700 -0.649700
vn 0.504500 0.610500 -0.610500
vn 0.599600 0.565900 -0.565900
vn 0.682100 0.517100 -0.517100
vn 0.753900 0.464600 -0.464600
vn 0.816500 0.408300 -0.408300
vn 0.870700 0.347700 -0.347800
vn 0.916800 0.282300 -0.282400
vn 0.954400 0.211100 -0.211100
vn 0.982200 0.132800 -0.132800
vn 0.997800 0.046400 -0.046500
vn 0.997800 0.046500 0.046500
vn 0.982200 0.132800 0.132800
vn 0.954400 0.211100 0.211100
vn 0.916800 0.282400 0.282400
vn 0.870700 0.347800 0.347800
vn 0.816500 0.408200 0.408300
vn 0.753900 0.464600 0.464600
vn 0.682100 0.517100 0.517100
vn 0.599600 0.565900 0.565900
vn 0.504500 0.610500 0.610500
vn 0.394600 0.649700 0.649700
vn -0.394600 -0.649800 0.649700
vn -0.504500 -0.610500 0.610500
vn -0.599600 -0.565900 0.565900
vn -0.682100 -0.517100 0.517100
vn -0.753900 -0.464500 0.464500
vn -0.816500 -0.408300 0.408300
vn -0.870700 -0.347700 0.347800
vn -0.916800 -0.282400 0.282400
vn -0.954400 -0.211100 0.211100
vn -0.982200 -0.132800 0.132800
vn -0.997800 -0.046400 0.046500
vn -0.997800 -0.046400 -0.046500
vn -0.982200 -0.132800 -0.132800
vn -0.954400 -0.211100 -0.211100
vn -0.916800 -0.282400 -0.282400
vn -0.870700 -0.347800 -0.347800
vn -0.816500 -0.408300 -0.408300
vn -0.753900 -0.464500 -0.464500
vn -0.682100 -0.517100 -0.517100
vn -0.599600 -0.565900 -0.565900
vn -0.504500 -0.610500 -0.610500
vn -0.394600 -0.649800 -0.649700
vn -0.394600 0.649700 0.649800
vn -0.504500 0.610500 0.610500
vn -0.599600 0.565900 0.565900
vn -0.682100 0.517100 0.517100
vn -0.753900 0.464500 0.464600
vn -0.816500 0.408300 0.408300
vn -0.870700 0.347800 0.347800
vn -0.916800 0.282300 0.282400
vn -0.954400 0.211100 0.211100
vn -0.982200 0.132800 0.132800
vn -0.997800 0.046500 0.046500
vn -0.997800 0.046500 -0.046500
vn -0.982200 0.132800 -0.132800
vn -0.954400 0.211100 -0.211100
vn -0.916800 0.282400 -0.282400
vn -0.870700 0.347800 -0.347800
vn -0.816500 0.408200 -0.408300
vn -0.753900 0.464500 -0.464500
vn -0.682100 0.517100 -0.517100
vn -0.599600 0.565900 -0.565900
vn -0.504500 0.610500 -0.610500
vn -0.394600 0.649800 -0.649700
vn 0.997500 -0.071300 0.000000
vn 0.977100 -0.212600 0.000000
vn 0.936900 -0.349500 0.000000
vn 0.877700 -0.479200 0.000000
vn 0.800500 -0.599300 0.000000
vn 0.707100 -0.707100 0.000000
vn 0.599300 -0.800500 0.000000
vn 0.479200 -0.877700 0.000000
vn 0.349500 -0.937000 -0.000000
vn 0.212600 -0.977100 0.000000
vn 0.071300 -0.997500 0.000000
vn 0.071400 0.000000 -0.997500
vn 0.212600 0.000000 -0.977100
vn 0.349500 0.000000 -0.937000
vn 0.479300 0.000000 -0.877700
vn 0.599300 0.000000 -0.800500
vn 0.707100 -0.000000 -0.707100
vn 0.800500 -0.000000 -0.599300
vn 0.877700 -0.000000 -0.479200
vn 0.936900 -0.000000 -0.349500
vn 0.977100 -0.000000 -0.212600
vn 0.997500 -0.000000 -0.071300
vn 0.997500 0.000000 0.071300
vn 0.977100 0.000000 0.212600
vn 0.936900 0.000000 0.349500
vn 0.877700 0.000000 0.479300
vn 0.800500 0.000000 0.599300
vn 0.707100 0.000000 0.707100
vn 0.599300 -0.000000 0.800600
vn 0.479300 -0.000000 0.877700
vn 0.349500 -0.000000 0.936900
vn 0.212600 -0.000000 0.977100
vn 0.071300 -0.000000 0.997500
vn 0.071300 0.997500 0.000000
vn 0.212600 0.977100 0.000000
vn 0.349500 0.937000 0.000000
vn 0.479300 0.877700 0.000000
vn 0.599300 0.800500 0.000000
vn 0.707100 0.707100 0.000000
vn 0.800500 0.599300 0.000000
vn 0.877700 0.479200 0.000000
vn 0.936900 0.349500 0.000000
vn 0.977100 0.212600 0.000000
vn 0.997500 0.071300 0.000000
vn -0.997500 -0.071300 -0.000000
vn -0.977200 -0.212500 -0.000000
vn -0.937000 -0.349500 -0.000000
vn -0.877700 -0.479300 -0.000000
vn -0.800500 -0.599300 -0.000000
vn -0.707100 -0.707200 -0.000000
vn -0.599300 -0.800500 -0.000000
vn -0.479200 -0.877700 -0.000000
vn -0.349500 -0.936900 -0.000000
vn -0.212600 -0.977100 -0.000000
vn -0.071300 -0.997500 -0.000000
vn -0.071300 0.000000 0.997500
vn -0.212600 0.000000 0.977100
vn -0.349500 0.000000 0.936900
vn -0.479200 0.000000 0.877700
vn -0.599300 0.000000 0.800500
vn -0.707100 -0.000000 0.707100
vn -0.800500 -0.000000 0.599300
vn -0.877700 -0.000000 0.479300
vn -0.936900 -0.000000 0.349500
vn -0.977200 -0.000000 0.212500
vn -0.997500 -0.000000 0.071400
vn -0.997500 -0.000000 -0.071400
vn -0.977200 -0.000000 -0.212500
vn -0.937000 -0.000000 -0.349500
vn -0.877700 -0.000000 -0.479300
vn -0.800500 -0.000000 -0.599300
vn -0.707100 -0.000000 -0.707100
vn -0.599300 0.000000 -0.800500
vn -0.479200 0.000000 -0.877700
vn -0.349500 0.000000 -0.936900
vn -0.212600 0.000000 -0.977100
vn -0.071300 0.000000 -0.997500
vn -0.071300 0.997500 -0.000000
vn -0.212600 0.977100 -0.000000
vn -0.349500 0.936900 -0.000000
vn -0.479300 0.877700 -0.000000
vn -0.599300 0.800600 -0.000000
vn -0.707100 0.707200 -0.000000
vn -0.800500 0.599300 -0.000000
vn -0.877700 0.479300 -0.000000
vn -0.936900 0.349500 -0.000000
vn -0.977200 0.212500 -0.000000
vn -0.997500 0.071300 -0.000000
vn 0.000000 -1.000000 0.000000
s off
f 10/1/1 9/2/1 11/1/1 126/3/1 125/4/1 124/3/1 6/5/1 2/5/1
f 9/6/2 55/7/2 79/8/2 33/9/2
f 1/10/3 5/10/3 102/11/3 101/12/3 103/11/3 34/13/3 33/14/3 32/13/3
f 57/15/4 172/16/4 149/17/4 80/18/4
f 101/9/5 147/8/5 171/7/5 125/6/5
f 3/10/6 7/10/6 148/11/6 147/12/6 149/11/6 80/13/6 79/14/6 78/13/6
f 56/1/7 55/19/7 57/1/7 172/3/7 171/20/7 170/3/7 8/5/7 4/5/7
f 78/1/8 80/1/8 149/3/8 148/3/8 103/21/8 34/22/8
f 2/5/9 6/5/9 124/3/9 126/3/9 11/1/9 10/1/9
f 11/23/10 126/24/10 170/25/10 172/25/10 57/26/10 56/26/10
f 4/5/4 8/5/4 170/3/4 172/3/4 57/1/4 56/1/4
f 32/1/11 34/1/11 103/3/11 102/3/11 5/5/11 1/5/11
f 78/27/12 80/27/12 149/28/12 148/28/12 7/29/12 3/29/12
f 22/30/13 21/31/13 10/1/13 11/1/13
f 23/32/14 20/33/14 21/31/14 22/30/14
f 24/34/15 19/35/15 20/36/15 23/37/15
f 25/38/16 18/39/16 19/35/16 24/34/16
f 26/40/17 17/41/17 18/39/17 25/38/17
f 27/42/18 16/43/18 17/41/18 26/40/18
f 28/44/19 15/45/19 16/43/19 27/42/19
f 29/46/20 14/47/20 15/45/20 28/44/20
f 30/48/21 13/49/21 14/47/21 29/46/21
f 12/50/22 13/49/22 30/48/22 31/51/22
f 9/6/23 12/50/23 31/51/23
f 45/52/24 44/53/24 33/9/24
f 46/54/25 43/55/25 44/53/25 45/52/25
f 47/56/26 42/57/26 43/55/26 46/54/26
f 48/58/27 41/59/27 42/57/27 47/56/27
f 49/60/28 40/61/28 41/59/28 48/58/28
f 50/62/29 39/63/29 40/61/29 49/60/29
f 51/64/30 38/65/30 39/63/30 50/62/30
f 52/66/31 37/67/31 38/65/31 51/64/31
f 53/68/32 36/69/32 37/67/32 52/66/32
f 35/30/33 36/32/33 53/33/33 54/31/33
f 32/1/34 35/30/34 54/31/34 34/1/34
f 68/70/35 67/71/35 56/27/35 57/27/35
f 69/72/36 66/73/36 67/71/36 68/70/36
f 70/74/37 65/75/37 66/76/37 69/77/37
f 71/78/38 64/79/38 65/75/38 70/74/38
f 72/80/39 63/81/39 64/79/39 71/78/39
f 73/82/40 62/83/40 63/81/40 72/80/40
f 74/84/41 61/85/41 62/83/41 73/82/41
f 75/86/42 60/87/42 61/85/42 74/84/42
f 76/88/43 59/89/43 60/87/43 75/86/43
f 58/90/44 59/89/44 76/88/44 77/91/44
f 55/7/45 58/90/45 77/91/45
f 91/92/46 90/93/46 79/8/46
f 92/94/47 89/95/47 90/93/47 91/92/47
f 93/96/48 88/97/48 89/95/48 92/94/48
f 94/98/49 87/99/49 88/97/49 93/96/49
f 95/100/50 86/101/50 87/99/50 94/98/50
f 96/102/51 85/103/51 86/101/51 95/100/51
f 97/104/52 84/105/52 85/103/52 96/102/52
f 98/106/53 83/107/53 84/105/53 97/104/53
f 99/108/54 82/109/54 83/107/54 98/106/54
f 81/71/55 82/73/55 99/72/55 100/70/55
f 78/27/56 81/110/56 100/111/56 80/27/56
f 114/112/57 113/113/57 102/11/57 103/11/57
f 115/114/58 112/115/58 113/113/58 114/112/58
f 116/66/59 111/67/59 112/69/59 115/68/59
f 117/64/60 110/65/60 111/67/60 116/66/60
f 118/62/61 109/63/61 110/65/61 117/64/61
f 119/60/62 108/61/62 109/63/62 118/62/62
f 120/58/63 107/59/63 108/61/63 119/60/63
f 121/56/64 106/57/64 107/59/64 120/58/64
f 122/54/65 105/55/65 106/57/65 121/56/65
f 104/53/66 105/55/66 122/54/66 123/52/66
f 101/9/67 104/53/67 123/52/67
f 137/51/68 136/50/68 125/6/68
f 138/48/69 135/49/69 136/50/69 137/51/69
f 139/46/70 134/47/70 135/49/70 138/48/70
f 140/44/71 133/45/71 134/47/71 139/46/71
f 141/42/72 132/43/72 133/45/72 140/44/72
f 142/40/73 131/41/73 132/43/73 141/42/73
f 143/38/74 130/39/74 131/41/74 142/40/74
f 144/34/75 129/35/75 130/39/75 143/38/75
f 145/37/76 128/36/76 129/35/76 144/34/76
f 127/116/77 128/117/77 145/118/77 146/119/77
f 124/11/78 127/120/78 146/121/78 126/11/78
f 160/119/79 159/116/79 148/122/79 149/122/79
f 161/118/80 158/117/80 159/116/80 160/119/80
f 162/106/81 157/107/81 158/109/81 161/108/81
f 163/104/82 156/105/82 157/107/82 162/106/82
f 164/102/83 155/103/83 156/105/83 163/104/83
f 165/100/84 154/101/84 155/103/84 164/102/84
f 166/98/85 153/99/85 154/101/85 165/100/85
f 167/96/86 152/97/86 153/99/86 166/98/86
f 168/94/87 151/95/87 152/97/87 167/96/87
f 150/93/88 151/95/88 168/94/88 169/92/88
f 147/8/89 150/93/89 169/92/89
f 183/91/90 182/90/90 171/7/90
f 184/88/91 181/89/91 182/90/91 183/91/91
f 185/86/92 180/87/92 181/89/92 184/88/92
f 186/84/93 179/85/93 180/87/93 185/86/93
f 187/82/94 178/83/94 179/85/94 186/84/94
f 188/80/95 177/81/95 178/83/95 187/82/95
f 189/78/96 176/79/96 177/81/96 188/80/96
f 190/74/97 175/75/97 176/79/97 189/78/97
f 191/77/98 174/76/98 175/75/98 190/74/98
f 173/116/99 174/117/99 191/118/99 192/119/99
f 170/11/100 173/121/100 192/120/100 172/11/100
f 9/6/101 33/9/101 44/53/101 12/50/101
f 12/50/102 44/53/102 43/55/102 13/49/102
f 13/49/103 43/55/103 42/57/103 14/47/103
f 14/47/104 42/57/104 41/59/104 15/45/104
f 15/45/105 41/59/105 40/61/105 16/43/105
f 16/123/106 40/124/106 39/125/106 17/126/106
f 17/126/107 39/125/107 38/127/107 18/128/107
f 18/128/108 38/127/108 37/129/108 19/130/108
f 19/130/109 37/129/109 36/32/109 20/73/109
f 20/73/110 36/32/110 35/30/110 21/71/110
f 21/71/111 35/30/111 32/1/111 10/27/111
f 11/1/112 56/27/112 67/71/112 22/30/112
f 22/30/113 67/71/113 66/73/113 23/32/113
f 23/32/114 66/73/114 65/130/114 24/129/114
f 24/129/115 65/130/115 64/128/115 25/127/115
f 25/127/116 64/128/116 63/126/116 26/125/116
f 26/125/117 63/126/117 62/123/117 27/124/117
f 27/42/118 62/83/118 61/85/118 28/44/118
f 28/44/119 61/85/119 60/87/119 29/46/119
f 29/46/120 60/87/120 59/89/120 30/48/120
f 30/48/121 59/89/121 58/90/121 31/51/121
f 31/51/122 58/90/122 55/7/122 9/6/122
f 33/9/123 79/8/123 90/93/123 45/52/123
f 45/52/124 90/93/124 89/95/124 46/54/124
f 46/54/125 89/95/125 88/97/125 47/56/125
f 47/56/126 88/97/126 87/99/126 48/58/126
f 48/58/127 87/99/127 86/101/127 49/60/127
f 49/124/128 86/123/128 85/126/128 50/125/128
f 50/125/129 85/126/129 84/128/129 51/127/129
f 51/127/130 84/128/130 83/130/130 52/129/130
f 52/129/131 83/130/131 82/73/131 53/32/131
f 53/32/132 82/73/132 81/71/132 54/30/132
f 54/30/133 81/71/133 78/27/133 34/1/133
f 57/27/134 80/1/134 100/30/134 68/71/134
f 68/71/135 100/30/135 99/32/135 69/73/135
f 69/73/136 99/32/136 98/129/136 70/130/136
f 70/130/137 98/129/137 97/127/137 71/128/137
f 71/128/138 97/127/138 96/125/138 72/126/138
f 72/126/139 96/125/139 95/124/139 73/123/139
f 73/82/140 95/100/140 94/98/140 74/84/140
f 74/84/141 94/98/141 93/96/141 75/86/141
f 75/86/142 93/96/142 92/94/142 76/88/142
f 76/88/143 92/94/143 91/92/143 77/91/143
f 77/91/144 91/92/144 79/8/144 55/7/144
f 101/9/145 125/6/145 136/50/145 104/53/145
f 104/53/146 136/50/146 135/49/146 105/55/146
f 105/55/147 135/49/147 134/47/147 106/57/147
f 106/57/148 134/47/148 133/45/148 107/59/148
f 107/59/149 133/45/149 132/43/149 108/61/149
f 108/131/150 132/132/150 131/133/150 109/134/150
f 109/134/151 131/133/151 130/135/151 110/136/151
f 110/136/152 130/135/152 129/137/152 111/138/152
f 111/138/153 129/137/153 128/117/153 112/115/153
f 112/115/154 128/117/154 127/116/154 113/113/154
f 113/113/155 127/116/155 124/122/155 102/11/155
f 103/122/156 148/139/156 159/140/156 114/141/156
f 114/113/157 159/116/157 158/117/157 115/115/157
f 115/115/158 158/117/158 157/137/158 116/138/158
f 116/138/159 157/137/159 156/135/159 117/136/159
f 117/136/160 156/135/160 155/133/160 118/134/160
f 118/134/161 155/133/161 154/132/161 119/131/161
f 119/60/162 154/101/162 153/99/162 120/58/162
f 120/58/163 153/99/163 152/97/163 121/56/163
f 121/56/164 152/97/164 151/95/164 122/54/164
f 122/54/165 151/95/165 150/93/165 123/52/165
f 123/52/166 150/93/166 147/8/166 101/9/166
f 125/6/167 171/7/167 182/90/167 137/51/167
f 137/51/168 182/90/168 181/89/168 138/48/168
f 138/48/169 181/89/169 180/87/169 139/46/169
f 139/46/170 180/87/170 179/85/170 140/44/170
f 140/44/171 179/85/171 178/83/171 141/42/171
f 141/131/172 178/132/172 177/133/172 142/134/172
f 142/134/173 177/133/173 176/135/173 143/136/173
f 143/136/174 176/135/174 175/137/174 144/138/174
f 144/138/175 175/137/175 174/117/175 145/115/175
f 145/115/176 174/117/176 173/116/176 146/113/176
f 146/113/177 173/116/177 170/122/177 126/11/177
f 149/11/178 172/122/178 192/116/178 160/113/178
f 160/113/179 192/116/179 191/117/179 161/115/179
f 161/115/180 191/117/180 190/137/180 162/138/180
f 162/138/181 190/137/181 189/135/181 163/136/181
f 163/136/182 189/135/182 188/133/182 164/134/182
f 164/134/183 188/133/183 187/132/183 165/131/183
f 165/100/184 187/82/184 186/84/184 166/98/184
f 166/98/185 186/84/185 185/86/185 167/96/185
f 167/96/186 185/86/186 184/88/186 168/94/186
f 168/94/187 184/88/187 183/91/187 169/92/187
f 169/92/188 183/91/188 171/7/188 147/8/188
f 32/142/189 34/142/189 103/143/189 102/143/189 124/144/189 126/144/189 11/145/189 10/145/189

936
Levels/Geometry/Column.obj Normal file
View File

@ -0,0 +1,936 @@
# Blender v2.71 (sub 0) OBJ File: 'ruins_column.blend'
# www.blender.org
o Cube
v 0.366457 0.983043 -0.928802
v 0.376163 1.000000 -0.908138
v 0.397638 0.983043 -0.915886
v 0.397638 -0.983043 -0.915886
v 0.376163 -1.000000 -0.908138
v 0.366457 -0.983043 -0.928802
v 0.178215 0.983043 -0.982447
v 0.191766 1.000000 -0.964074
v 0.211317 0.983043 -0.975863
v 0.211317 -0.983043 -0.975863
v 0.191766 -1.000000 -0.964074
v 0.178215 -0.983043 -0.982447
v 0.016875 0.983043 -0.998338
v -0.016875 0.983043 -0.998338
v -0.000000 1.000000 -0.982961
v -0.000000 -1.000000 -0.982961
v -0.016875 -0.983043 -0.998338
v 0.016875 -0.983043 -0.998338
v 0.568678 -0.983043 -0.820712
v 0.546104 -1.000000 -0.817302
v 0.540616 -0.983043 -0.839463
v 0.540616 0.983043 -0.839463
v 0.546104 1.000000 -0.817302
v 0.568678 0.983043 -0.820712
v 0.717864 -0.983043 -0.693999
v 0.695058 -1.000000 -0.695058
v 0.693999 -0.983043 -0.717864
v 0.693999 0.983043 -0.717864
v 0.695058 1.000000 -0.695058
v 0.717864 0.983043 -0.693999
v 0.839463 -0.983043 -0.540616
v 0.817302 -1.000000 -0.546104
v 0.820712 -0.983043 -0.568678
v 0.820712 0.983043 -0.568678
v 0.817302 1.000000 -0.546104
v 0.839463 0.983043 -0.540616
v 0.928802 -0.983043 -0.366457
v 0.908138 -1.000000 -0.376163
v 0.915886 -0.983043 -0.397638
v 0.915886 0.983043 -0.397638
v 0.908138 1.000000 -0.376163
v 0.928802 0.983043 -0.366457
v 0.982447 -0.983043 -0.178215
v 0.964074 -1.000000 -0.191766
v 0.975863 -0.983043 -0.211317
v 0.975863 0.983043 -0.211317
v 0.964074 1.000000 -0.191766
v 0.982447 0.983043 -0.178215
v 0.998338 -0.983043 0.016875
v 0.982961 -1.000000 -0.000000
v 0.998338 -0.983043 -0.016875
v 0.998338 0.983043 -0.016875
v 0.982961 1.000000 -0.000000
v 0.998338 0.983043 0.016875
v 0.975863 -0.983043 0.211317
v 0.964074 -1.000000 0.191766
v 0.982447 -0.983043 0.178215
v 0.982447 0.983043 0.178215
v 0.964074 1.000000 0.191766
v 0.975863 0.983043 0.211317
v 0.915886 -0.983043 0.397638
v 0.908138 -1.000000 0.376163
v 0.928802 -0.983043 0.366457
v 0.928802 0.983043 0.366457
v 0.908138 1.000000 0.376163
v 0.915886 0.983043 0.397638
v 0.820712 -0.983043 0.568678
v 0.817302 -1.000000 0.546104
v 0.839463 -0.983043 0.540616
v 0.839463 0.983043 0.540616
v 0.817302 1.000000 0.546104
v 0.820712 0.983043 0.568678
v 0.693999 -0.983043 0.717864
v 0.695058 -1.000000 0.695058
v 0.717864 -0.983043 0.693999
v 0.717864 0.983043 0.693999
v 0.695058 1.000000 0.695058
v 0.693999 0.983043 0.717864
v 0.540616 -0.983043 0.839463
v 0.546104 -1.000000 0.817302
v 0.568678 -0.983043 0.820712
v 0.568678 0.983043 0.820712
v 0.546104 1.000000 0.817302
v 0.540616 0.983043 0.839463
v 0.366457 -0.983043 0.928802
v 0.376163 -1.000000 0.908138
v 0.397638 -0.983043 0.915886
v 0.397638 0.983043 0.915886
v 0.376163 1.000000 0.908138
v 0.366457 0.983043 0.928802
v 0.178215 -0.983043 0.982447
v 0.191766 -1.000000 0.964074
v 0.211317 -0.983043 0.975863
v 0.211317 0.983043 0.975863
v 0.191766 1.000000 0.964074
v 0.178215 0.983043 0.982447
v -0.016876 -0.983043 0.998338
v -0.000000 -1.000000 0.982961
v 0.016875 -0.983043 0.998338
v 0.016875 0.983043 0.998338
v -0.000000 1.000000 0.982961
v -0.016876 0.983043 0.998338
v -0.211317 -0.983043 0.975863
v -0.191767 -1.000000 0.964074
v -0.178216 -0.983043 0.982447
v -0.178216 0.983043 0.982447
v -0.191767 1.000000 0.964074
v -0.211317 0.983043 0.975863
v -0.397638 -0.983043 0.915886
v -0.376163 -1.000000 0.908137
v -0.366457 -0.983043 0.928802
v -0.366457 0.983043 0.928802
v -0.376163 1.000000 0.908137
v -0.397638 0.983043 0.915886
v -0.568679 -0.983043 0.820712
v -0.546104 -1.000000 0.817302
v -0.540616 -0.983043 0.839463
v -0.540616 0.983043 0.839463
v -0.546104 1.000000 0.817302
v -0.568679 0.983043 0.820712
v -0.717865 -0.983043 0.693999
v -0.695059 -1.000000 0.695058
v -0.693999 -0.983043 0.717864
v -0.693999 0.983043 0.717864
v -0.695059 1.000000 0.695058
v -0.717865 0.983043 0.693999
v -0.839463 -0.983043 0.540615
v -0.817303 -1.000000 0.546103
v -0.820713 -0.983043 0.568677
v -0.820713 0.983043 0.568677
v -0.817303 1.000000 0.546103
v -0.839463 0.983043 0.540615
v -0.928802 -0.983043 0.366456
v -0.908138 -1.000000 0.376162
v -0.915886 -0.983043 0.397637
v -0.915886 0.983043 0.397637
v -0.908138 1.000000 0.376162
v -0.928802 0.983043 0.366456
v -0.982448 -0.983043 0.178214
v -0.964074 -1.000000 0.191765
v -0.975863 -0.983043 0.211316
v -0.975863 0.983043 0.211316
v -0.964074 1.000000 0.191765
v -0.982448 0.983043 0.178214
v -0.998338 -0.983043 -0.016876
v -0.982961 -1.000000 -0.000001
v -0.998338 -0.983043 0.016874
v -0.998338 0.983043 0.016874
v -0.982961 1.000000 -0.000001
v -0.998338 0.983043 -0.016876
v -0.975863 -0.983043 -0.211318
v -0.964074 -1.000000 -0.191767
v -0.982447 -0.983043 -0.178216
v -0.982447 0.983043 -0.178216
v -0.964074 1.000000 -0.191767
v -0.975863 0.983043 -0.211318
v -0.915886 -0.983043 -0.397639
v -0.908137 -1.000000 -0.376164
v -0.928801 -0.983043 -0.366458
v -0.928801 0.983043 -0.366458
v -0.908137 1.000000 -0.376164
v -0.915886 0.983043 -0.397639
v -0.820712 -0.983043 -0.568679
v -0.817302 -1.000000 -0.546105
v -0.839462 -0.983043 -0.540617
v -0.839462 0.983043 -0.540617
v -0.817302 1.000000 -0.546105
v -0.820712 0.983043 -0.568679
v -0.693998 -0.983043 -0.717865
v -0.695058 -1.000000 -0.695059
v -0.717863 -0.983043 -0.694000
v -0.717863 0.983043 -0.694000
v -0.695058 1.000000 -0.695059
v -0.693998 0.983043 -0.717865
v -0.540614 -0.983043 -0.839464
v -0.546103 -1.000000 -0.817303
v -0.568677 -0.983043 -0.820713
v -0.568677 0.983043 -0.820713
v -0.546103 1.000000 -0.817303
v -0.540614 0.983043 -0.839464
v -0.366455 -0.983043 -0.928802
v -0.376162 -1.000000 -0.908138
v -0.397637 -0.983043 -0.915887
v -0.397637 0.983043 -0.915887
v -0.376162 1.000000 -0.908138
v -0.366455 0.983043 -0.928802
v -0.178214 -0.983043 -0.982448
v -0.191765 -1.000000 -0.964074
v -0.211316 -0.983043 -0.975863
v -0.211316 0.983043 -0.975863
v -0.191765 1.000000 -0.964074
v -0.178214 0.983043 -0.982448
vt 0.302972 0.503043
vt 0.302972 0.995751
vt 0.279010 0.995751
vt 0.279010 0.503043
vt 0.403686 0.503043
vt 0.403686 0.995751
vt 0.374867 0.995751
vt 0.374867 0.503043
vt 0.355657 0.225252
vt 0.362339 0.177890
vt 0.375448 0.133276
vt 0.394479 0.093125
vt 0.418700 0.058979
vt 0.447181 0.032150
vt 0.478828 0.013670
vt 0.512424 0.004250
vt 0.546679 0.004249
vt 0.580275 0.013670
vt 0.611922 0.032150
vt 0.640403 0.058978
vt 0.664625 0.093124
vt 0.683655 0.133276
vt 0.696764 0.177890
vt 0.703447 0.225252
vt 0.703447 0.273541
vt 0.696764 0.320903
vt 0.683656 0.365517
vt 0.664625 0.405669
vt 0.640404 0.439815
vt 0.611922 0.466643
vt 0.580275 0.485123
vt 0.546679 0.494544
vt 0.512425 0.494544
vt 0.478829 0.485123
vt 0.447182 0.466643
vt 0.418700 0.439815
vt 0.394479 0.405669
vt 0.375448 0.365517
vt 0.362339 0.320903
vt 0.355657 0.273542
vt 0.744031 0.503043
vt 0.744031 0.995751
vt 0.718615 0.995751
vt 0.718615 0.503043
vt 0.713072 0.503043
vt 0.713072 0.995751
vt 0.685493 0.995751
vt 0.685493 0.503043
vt 0.679609 0.503043
vt 0.679609 0.995751
vt 0.650928 0.995751
vt 0.650928 0.503043
vt 0.644929 0.503043
vt 0.644929 0.995751
vt 0.616248 0.995751
vt 0.616248 0.503043
vt 0.610364 0.503043
vt 0.610364 0.995751
vt 0.582785 0.995751
vt 0.582785 0.503043
vt 0.577242 0.503043
vt 0.577242 0.995751
vt 0.551826 0.995751
vt 0.551826 0.503043
vt 0.546837 0.503043
vt 0.546837 0.995751
vt 0.524560 0.995751
vt 0.524560 0.503043
vt 0.995012 0.503043
vt 0.995012 0.995750
vt 0.969595 0.995750
vt 0.969595 0.503043
vt 0.964052 0.503043
vt 0.964052 0.995751
vt 0.936474 0.995751
vt 0.936474 0.503043
vt 0.930589 0.503043
vt 0.930589 0.995750
vt 0.901909 0.995751
vt 0.901909 0.503043
vt 0.895909 0.503043
vt 0.895909 0.995750
vt 0.867228 0.995750
vt 0.867228 0.503043
vt 0.861344 0.503043
vt 0.861344 0.995750
vt 0.833765 0.995750
vt 0.833766 0.503043
vt 0.828223 0.503043
vt 0.828223 0.995751
vt 0.802806 0.995751
vt 0.802806 0.503043
vt 0.797818 0.503043
vt 0.797818 0.995750
vt 0.775540 0.995751
vt 0.775540 0.503043
vt 0.000000 0.995750
vt 0.000000 0.503043
vt 0.020378 0.503043
vt 0.020378 0.995750
vt 0.025016 0.995750
vt 0.025016 0.503043
vt 0.048979 0.503043
vt 0.048979 0.995750
vt 0.054270 0.995750
vt 0.054270 0.503043
vt 0.080896 0.503043
vt 0.080896 0.995750
vt 0.086637 0.995750
vt 0.086637 0.503043
vt 0.114903 0.503043
vt 0.114903 0.995750
vt 0.120873 0.995750
vt 0.120873 0.503043
vt 0.149693 0.503043
vt 0.149693 0.995751
vt 0.155663 0.995751
vt 0.155664 0.503043
vt 0.183929 0.503043
vt 0.183929 0.995751
vt 0.189670 0.995750
vt 0.189670 0.503043
vt 0.216296 0.503043
vt 0.216296 0.995750
vt 0.221587 0.995751
vt 0.221587 0.503043
vt 0.245550 0.503043
vt 0.245550 0.995751
vt 0.250188 0.995750
vt 0.250188 0.503043
vt 0.270566 0.503043
vt 0.270566 0.995750
vt 0.504181 0.995751
vt 0.504181 0.503043
vt 0.499543 0.503043
vt 0.499543 0.995751
vt 0.475581 0.995751
vt 0.475581 0.503043
vt 0.470290 0.503043
vt 0.470290 0.995751
vt 0.443664 0.995751
vt 0.443664 0.503043
vt 0.437923 0.503043
vt 0.437923 0.995751
vt 0.409657 0.995751
vt 0.409657 0.503043
vt 0.771297 0.503043
vt 0.771297 0.995751
vt 0.749020 0.995751
vt 0.749020 0.503043
vt 0.368896 0.503043
vt 0.368896 0.995751
vt 0.340631 0.995751
vt 0.340631 0.503043
vt 0.334889 0.503043
vt 0.334889 0.995751
vt 0.308264 0.995751
vt 0.308264 0.503043
vt 0.286588 0.445477
vt 0.287173 0.439815
vt 0.291226 0.440111
vt 0.374451 0.127730
vt 0.371623 0.135189
vt 0.338553 1.000000
vt 0.338553 0.498793
vt 0.372150 1.000000
vt 0.372150 0.498793
vt 0.394269 0.087411
vt 0.390463 0.093949
vt 0.311604 0.411383
vt 0.311394 0.405669
vt 0.315410 0.404845
vt 0.419285 0.053317
vt 0.414647 0.058683
vt 0.331421 0.371064
vt 0.330425 0.365518
vt 0.334250 0.363605
vt 0.714797 0.498793
vt 0.714797 1.000000
vt 0.682018 0.498793
vt 0.682018 1.000000
vt 0.647928 0.498793
vt 0.647928 1.000000
vt 0.613839 0.498793
vt 0.613839 1.000000
vt 0.581060 0.498793
vt 0.581060 1.000000
vt 0.615856 0.030745
vt 0.610565 0.026758
vt 0.315410 0.093949
vt 0.311394 0.093125
vt 0.311604 0.087411
vt 0.644456 0.058682
vt 0.639818 0.053317
vt 0.291226 0.058683
vt 0.287173 0.058979
vt 0.286588 0.053317
vt 0.965778 0.498793
vt 0.965778 1.000000
vt 0.932998 0.498793
vt 0.932998 1.000000
vt 0.898909 0.498793
vt 0.898909 1.000000
vt 0.864819 0.498793
vt 0.864819 1.000000
vt 0.832040 0.498793
vt 0.832040 1.000000
vt 0.698509 0.326069
vt 0.700251 0.317975
vt 0.095308 0.026758
vt 0.093951 0.032150
vt 0.090017 0.030745
vt 0.684652 0.371063
vt 0.687480 0.363604
vt 0.066055 0.053317
vt 0.065470 0.058978
vt 0.061417 0.058682
vt 0.664835 0.411382
vt 0.668641 0.404844
vt 0.041038 0.087411
vt 0.041248 0.093124
vt 0.037232 0.093949
vt 0.639819 0.445476
vt 0.644456 0.440111
vt 0.021221 0.127730
vt 0.022218 0.133276
vt 0.018393 0.135189
vt 0.084560 1.000000
vt 0.084560 0.498793
vt 0.118156 1.000000
vt 0.118156 0.498793
vt 0.152410 1.000000
vt 0.152410 0.498793
vt 0.186006 1.000000
vt 0.186006 0.498793
vt 0.475164 0.487583
vt 0.480906 0.490038
vt 0.018393 0.363604
vt 0.022217 0.365517
vt 0.021221 0.371063
vt 0.443248 0.468048
vt 0.448539 0.472035
vt 0.037232 0.404844
vt 0.041248 0.405669
vt 0.041038 0.411382
vt 0.414647 0.440111
vt 0.419285 0.445477
vt 0.061417 0.440111
vt 0.065470 0.439815
vt 0.066054 0.445477
vt 0.390463 0.404844
vt 0.394269 0.411383
vt 0.090017 0.468048
vt 0.093951 0.466643
vt 0.095308 0.472035
vt 0.371623 0.363604
vt 0.374451 0.371064
vt 0.121934 0.487583
vt 0.125598 0.485123
vt 0.127675 0.490038
vt 0.440000 0.498793
vt 0.440000 1.000000
vt 0.406404 0.498793
vt 0.406404 1.000000
vt 0.262625 0.468048
vt 0.258691 0.466643
vt 0.360595 0.172725
vt 0.257334 0.472035
vt 0.230708 0.487583
vt 0.227044 0.485123
vt 0.353231 0.220666
vt 0.358853 0.180818
vt 0.274372 0.995751
vt 0.274372 0.503043
vt 0.443247 0.030745
vt 0.345278 0.326069
vt 0.343533 0.320904
vt 0.448539 0.026758
vt 0.475164 0.011210
vt 0.352642 0.278128
vt 0.347020 0.317975
vt 0.350216 0.273542
vt 0.480905 0.008755
vt 0.509171 0.000829
vt 0.353231 0.229083
vt 0.353231 0.269711
vt 0.350216 0.225252
vt 0.515142 0.000000
vt 0.543961 0.000000
vt 0.347020 0.180818
vt 0.352642 0.220666
vt 0.343534 0.177890
vt 0.549932 0.000829
vt 0.578198 0.008755
vt 0.334250 0.135189
vt 0.345279 0.172725
vt 0.330425 0.133276
vt 0.583939 0.011210
vt 0.331422 0.127730
vt 1.000000 0.503043
vt 1.000000 0.995751
vt 0.664835 0.087410
vt 0.262626 0.030745
vt 0.258692 0.032150
vt 0.668641 0.093949
vt 0.684652 0.127729
vt 0.230709 0.011210
vt 0.257335 0.026758
vt 0.227045 0.013670
vt 0.687480 0.135189
vt 0.698509 0.172724
vt 0.196702 0.000829
vt 0.224968 0.008755
vt 0.193449 0.004249
vt 0.700251 0.180818
vt 0.705873 0.220665
vt 0.161912 0.000000
vt 0.190731 0.000000
vt 0.159194 0.004249
vt 0.706461 0.229082
vt 0.706461 0.269710
vt 0.127675 0.008755
vt 0.155941 0.000829
vt 0.125598 0.013670
vt 0.705873 0.278128
vt 0.121934 0.011210
vt 0.615856 0.468048
vt 0.007364 0.172724
vt 0.009109 0.177890
vt 0.610565 0.472035
vt 0.583939 0.487583
vt 0.000000 0.220665
vt 0.005622 0.180818
vt 0.002426 0.225252
vt 0.578198 0.490038
vt 0.549932 0.497964
vt 0.543962 0.498793
vt 0.515142 0.498793
vt 0.005622 0.317975
vt 0.000000 0.278128
vt 0.002426 0.273541
vt 0.009109 0.320903
vt 0.509171 0.497964
vt 0.007364 0.326069
vt 0.360595 0.326069
vt 0.155941 0.497964
vt 0.159194 0.494544
vt 0.358853 0.317975
vt 0.353231 0.278128
vt 0.190731 0.498793
vt 0.161912 0.498793
vt 0.193448 0.494544
vn 0.471400 0.000000 -0.881900
vn -0.098000 0.000000 -0.995200
vn 0.000000 -1.000000 0.000000
vn 0.773000 0.000000 -0.634400
vn 0.881900 0.000000 -0.471400
vn 0.956900 0.000000 -0.290300
vn 0.995200 0.000000 -0.098000
vn 0.995200 0.000000 0.098000
vn 0.956900 0.000000 0.290300
vn 0.881900 0.000000 0.471400
vn 0.773000 0.000000 0.634400
vn 0.634400 0.000000 0.773000
vn 0.471400 0.000000 0.881900
vn 0.290300 0.000000 0.956900
vn 0.098000 0.000000 0.995200
vn -0.098000 0.000000 0.995200
vn -0.290300 0.000000 0.956900
vn -0.471400 0.000000 0.881900
vn -0.634400 0.000000 0.773000
vn -0.773000 0.000000 0.634400
vn -0.881900 0.000000 0.471400
vn -0.956900 -0.000000 0.290300
vn -0.995200 0.000000 0.098000
vn -0.995200 0.000000 -0.098000
vn -0.956900 0.000000 -0.290300
vn -0.881900 0.000000 -0.471400
vn -0.773000 0.000000 -0.634400
vn -0.634400 0.000000 -0.773000
vn -0.471400 0.000000 -0.881900
vn -0.290300 0.000000 -0.956900
vn 0.634400 0.000000 -0.773000
vn 0.098000 0.000000 -0.995200
vn 0.290300 0.000000 -0.956900
vn 0.283500 0.671800 -0.684400
vn 0.283500 -0.671800 -0.684400
vn 0.144500 0.671800 -0.726500
vn 0.144500 -0.671800 -0.726500
vn 0.000000 0.671800 -0.740800
vn 0.000000 -0.671800 -0.740800
vn 0.411500 -0.671800 -0.615900
vn 0.411500 0.671700 -0.615900
vn 0.523800 -0.671800 -0.523800
vn 0.523800 0.671800 -0.523800
vn 0.615900 -0.671700 -0.411600
vn 0.615900 0.671700 -0.411600
vn 0.684400 -0.671800 -0.283500
vn 0.684400 0.671800 -0.283500
vn 0.726500 -0.671800 -0.144500
vn 0.726500 0.671800 -0.144500
vn 0.740800 -0.671800 0.000000
vn 0.740800 0.671800 0.000000
vn 0.726500 -0.671800 0.144500
vn 0.726500 0.671800 0.144500
vn 0.684400 -0.671800 0.283500
vn 0.684400 0.671800 0.283500
vn 0.615900 -0.671700 0.411600
vn 0.615900 0.671700 0.411600
vn 0.523800 -0.671700 0.523800
vn 0.523800 0.671800 0.523800
vn 0.411600 -0.671700 0.615900
vn 0.411600 0.671700 0.615900
vn 0.283500 -0.671700 0.684400
vn 0.283500 0.671800 0.684400
vn 0.144500 -0.671800 0.726500
vn 0.144500 0.671800 0.726500
vn 0.000000 -0.671700 0.740800
vn 0.000000 0.671800 0.740800
vn -0.144500 -0.671800 0.726500
vn -0.144500 0.671800 0.726500
vn -0.283500 -0.671800 0.684400
vn -0.283500 0.671700 0.684400
vn -0.411600 -0.671700 0.615900
vn -0.411600 0.671700 0.615900
vn -0.523800 -0.671800 0.523800
vn -0.523800 0.671700 0.523800
vn -0.615900 -0.671700 0.411600
vn -0.615900 0.671700 0.411600
vn -0.684400 -0.671800 0.283500
vn -0.684400 0.671800 0.283500
vn -0.726500 -0.671800 0.144500
vn -0.726500 0.671800 0.144500
vn -0.740800 -0.671800 0.000000
vn -0.740800 0.671800 0.000000
vn -0.726500 -0.671800 -0.144500
vn -0.726500 0.671800 -0.144500
vn -0.684400 -0.671800 -0.283500
vn -0.684400 0.671800 -0.283500
vn -0.615900 -0.671700 -0.411600
vn -0.615900 0.671700 -0.411600
vn -0.523800 -0.671800 -0.523800
vn -0.523800 0.671800 -0.523800
vn -0.411600 -0.671700 -0.615900
vn -0.411600 0.671700 -0.615900
vn -0.283500 -0.671800 -0.684400
vn -0.283500 0.671800 -0.684400
vn -0.144500 -0.671800 -0.726500
vn -0.144500 0.671800 -0.726500
vn 0.205300 0.707100 -0.676700
vn 0.205300 -0.707100 -0.676700
vn 0.195100 0.000000 -0.980800
vn 0.000000 0.000000 -1.000000
vn 0.069300 0.707100 -0.703700
vn 0.069300 -0.707100 -0.703700
vn 0.382700 0.000000 -0.923900
vn 0.333300 -0.707100 -0.623600
vn 0.333300 0.707100 -0.623600
vn 0.555600 0.000000 -0.831500
vn 0.448600 -0.707100 -0.546600
vn 0.448600 0.707100 -0.546600
vn 0.707100 0.000000 -0.707100
vn 0.546600 -0.707100 -0.448600
vn 0.546600 0.707100 -0.448600
vn 0.831500 0.000000 -0.555600
vn 0.623600 -0.707100 -0.333300
vn 0.623600 0.707100 -0.333300
vn 0.923900 0.000000 -0.382700
vn 0.676700 -0.707100 -0.205300
vn 0.676700 0.707100 -0.205300
vn 0.980800 0.000000 -0.195100
vn 0.703700 -0.707100 -0.069300
vn 0.703700 0.707100 -0.069300
vn 1.000000 -0.000000 0.000000
vn 0.703700 -0.707100 0.069300
vn 0.703700 0.707100 0.069300
vn 0.980800 0.000000 0.195100
vn 0.676700 -0.707100 0.205300
vn 0.676700 0.707100 0.205300
vn 0.923900 0.000000 0.382700
vn 0.623600 -0.707100 0.333300
vn 0.623600 0.707100 0.333300
vn 0.831500 0.000000 0.555600
vn 0.546600 -0.707100 0.448600
vn 0.546600 0.707100 0.448600
vn 0.707100 0.000000 0.707100
vn 0.448600 -0.707100 0.546600
vn 0.448600 0.707100 0.546600
vn 0.555600 0.000000 0.831500
vn 0.333300 -0.707100 0.623600
vn 0.333300 0.707100 0.623600
vn 0.382700 0.000000 0.923900
vn 0.205300 -0.707100 0.676700
vn 0.205300 0.707100 0.676700
vn 0.195100 0.000000 0.980800
vn 0.069300 -0.707100 0.703700
vn 0.069300 0.707100 0.703700
vn 0.000000 0.000000 1.000000
vn -0.069300 -0.707100 0.703700
vn -0.069300 0.707100 0.703700
vn -0.195100 0.000000 0.980800
vn -0.205300 -0.707100 0.676700
vn -0.205300 0.707100 0.676700
vn -0.382700 0.000000 0.923900
vn -0.333300 -0.707100 0.623600
vn -0.333300 0.707100 0.623600
vn -0.555600 0.000000 0.831500
vn -0.448600 -0.707100 0.546600
vn -0.448600 0.707100 0.546600
vn -0.707100 0.000000 0.707100
vn -0.546600 -0.707100 0.448600
vn -0.546600 0.707100 0.448600
vn -0.831500 0.000000 0.555600
vn -0.623600 -0.707100 0.333300
vn -0.623600 0.707100 0.333300
vn -0.923900 0.000000 0.382700
vn -0.676700 -0.707100 0.205300
vn -0.676700 0.707100 0.205300
vn -0.980800 0.000000 0.195100
vn -0.703700 -0.707100 0.069300
vn -0.703700 0.707100 0.069300
vn -1.000000 0.000000 0.000000
vn -0.703700 -0.707100 -0.069300
vn -0.703700 0.707100 -0.069300
vn -0.980800 0.000000 -0.195100
vn -0.676700 -0.707100 -0.205300
vn -0.676700 0.707100 -0.205300
vn -0.923900 0.000000 -0.382700
vn -0.623600 -0.707100 -0.333300
vn -0.623600 0.707100 -0.333300
vn -0.831500 0.000000 -0.555600
vn -0.546600 -0.707100 -0.448600
vn -0.546600 0.707100 -0.448600
vn -0.707100 0.000000 -0.707100
vn -0.448600 -0.707100 -0.546600
vn -0.448600 0.707100 -0.546600
vn -0.555600 0.000000 -0.831500
vn -0.333300 -0.707100 -0.623600
vn -0.333300 0.707100 -0.623600
vn -0.382700 0.000000 -0.923900
vn -0.205300 -0.707100 -0.676700
vn -0.205300 0.707100 -0.676700
vn -0.195100 0.000000 -0.980800
vn -0.069300 -0.707100 -0.703700
vn -0.069300 0.707100 -0.703700
vn 0.000000 1.000000 -0.000000
s off
f 4/1/1 3/2/1 22/3/1 21/4/1
f 187/5/2 192/6/2 14/7/2 17/8/2
f 16/9/3 11/10/3 5/11/3 20/12/3 26/13/3 32/14/3 38/15/3 44/16/3 50/17/3 56/18/3 62/19/3 68/20/3 74/21/3 80/22/3 86/23/3 92/24/3 98/25/3 104/26/3 110/27/3 116/28/3 122/29/3 128/30/3 134/31/3 140/32/3 146/33/3 152/34/3 158/35/3 164/36/3 170/37/3 176/38/3 182/39/3 188/40/3
f 25/41/4 30/42/4 34/43/4 33/44/4
f 31/45/5 36/46/5 40/47/5 39/48/5
f 37/49/6 42/50/6 46/51/6 45/52/6
f 43/53/7 48/54/7 52/55/7 51/56/7
f 49/57/8 54/58/8 58/59/8 57/60/8
f 55/61/9 60/62/9 64/63/9 63/64/9
f 61/65/10 66/66/10 70/67/10 69/68/10
f 67/69/11 72/70/11 76/71/11 75/72/11
f 73/73/12 78/74/12 82/75/12 81/76/12
f 79/77/13 84/78/13 88/79/13 87/80/13
f 85/81/14 90/82/14 94/83/14 93/84/14
f 91/85/15 96/86/15 100/87/15 99/88/15
f 97/89/16 102/90/16 106/91/16 105/92/16
f 103/93/17 108/94/17 112/95/17 111/96/17
f 109/97/18 114/98/18 118/99/18 117/100/18
f 115/101/19 120/102/19 124/103/19 123/104/19
f 121/105/20 126/106/20 130/107/20 129/108/20
f 127/109/21 132/110/21 136/111/21 135/112/21
f 133/113/22 138/114/22 142/115/22 141/116/22
f 139/117/23 144/118/23 148/119/23 147/120/23
f 145/121/24 150/122/24 154/123/24 153/124/24
f 151/125/25 156/126/25 160/127/25 159/128/25
f 157/129/26 162/130/26 166/131/26 165/132/26
f 163/68/27 168/67/27 172/133/27 171/134/27
f 169/135/28 174/136/28 178/137/28 177/138/28
f 175/139/29 180/140/29 184/141/29 183/142/29
f 181/143/30 186/144/30 190/145/30 189/146/30
f 19/147/31 24/148/31 28/149/31 27/150/31
f 18/151/32 13/152/32 7/153/32 12/154/32
f 10/155/33 9/156/33 1/157/33 6/158/33
f 1/159/34 2/160/34 3/161/34
f 4/162/35 5/11/35 6/163/35
f 7/153/36 8/164/36 9/156/36
f 10/155/37 11/165/37 12/154/37
f 13/152/38 14/7/38 15/166/38
f 16/167/39 17/8/39 18/151/39
f 19/168/40 20/12/40 21/169/40
f 22/170/41 23/171/41 24/172/41
f 25/173/42 26/13/42 27/174/42
f 28/175/43 29/176/43 30/177/43
f 31/45/44 32/178/44 33/44/44
f 34/43/45 35/179/45 36/46/45
f 37/49/46 38/180/46 39/48/46
f 40/47/47 41/181/47 42/50/47
f 43/53/48 44/182/48 45/52/48
f 46/51/49 47/183/49 48/54/49
f 49/57/50 50/184/50 51/56/50
f 52/55/51 53/185/51 54/58/51
f 55/61/52 56/186/52 57/60/52
f 58/59/53 59/187/53 60/62/53
f 61/188/54 62/19/54 63/189/54
f 64/190/55 65/191/55 66/192/55
f 67/193/56 68/20/56 69/194/56
f 70/195/57 71/196/57 72/197/57
f 73/73/58 74/198/58 75/72/58
f 76/71/59 77/199/59 78/74/59
f 79/77/60 80/200/60 81/76/60
f 82/75/61 83/201/61 84/78/61
f 85/81/62 86/202/62 87/80/62
f 88/79/63 89/203/63 90/82/63
f 91/85/64 92/204/64 93/84/64
f 94/83/65 95/205/65 96/86/65
f 97/89/66 98/206/66 99/88/66
f 100/87/67 101/207/67 102/90/67
f 103/208/68 104/26/68 105/209/68
f 106/210/69 107/211/69 108/212/69
f 109/213/70 110/27/70 111/214/70
f 112/215/71 113/216/71 114/217/71
f 115/218/72 116/28/72 117/219/72
f 118/220/73 119/221/73 120/222/73
f 121/223/74 122/29/74 123/224/74
f 124/225/75 125/226/75 126/227/75
f 127/109/76 128/228/76 129/108/76
f 130/107/77 131/229/77 132/110/77
f 133/113/78 134/230/78 135/112/78
f 136/111/79 137/231/79 138/114/79
f 139/117/80 140/232/80 141/116/80
f 142/115/81 143/233/81 144/118/81
f 145/121/82 146/234/82 147/120/82
f 148/119/83 149/235/83 150/122/83
f 151/236/84 152/34/84 153/237/84
f 154/238/85 155/239/85 156/240/85
f 157/241/86 158/35/86 159/242/86
f 160/243/87 161/244/87 162/245/87
f 163/246/88 164/36/88 165/247/88
f 166/248/89 167/249/89 168/250/89
f 169/251/90 170/37/90 171/252/90
f 172/253/91 173/254/91 174/255/91
f 175/256/92 176/38/92 177/257/92
f 178/258/93 179/259/93 180/260/93
f 181/143/94 182/261/94 183/142/94
f 184/141/95 185/262/95 186/144/95
f 187/5/96 188/263/96 189/146/96
f 190/145/97 191/264/97 192/6/97
f 1/159/98 9/265/98 8/266/98 2/160/98
f 10/267/99 6/163/99 5/11/99 11/10/99
f 9/156/100 10/155/100 12/154/100 7/153/100
f 17/8/101 14/7/101 13/152/101 18/151/101
f 7/268/102 13/269/102 15/270/102 8/266/102
f 18/271/103 12/272/103 11/10/103 16/9/103
f 3/2/104 4/1/104 6/158/104 1/157/104
f 4/162/105 21/169/105 20/12/105 5/11/105
f 22/170/106 3/161/106 2/160/106 23/171/106
f 24/273/107 19/274/107 21/4/107 22/3/107
f 19/168/108 27/174/108 26/13/108 20/12/108
f 28/175/109 24/172/109 23/171/109 29/176/109
f 30/42/110 25/41/110 27/150/110 28/149/110
f 25/173/111 33/275/111 32/14/111 26/13/111
f 34/276/112 30/177/112 29/176/112 35/277/112
f 36/46/113 31/45/113 33/44/113 34/43/113
f 31/278/114 39/279/114 38/15/114 32/14/114
f 40/280/115 36/281/115 35/277/115 41/282/115
f 42/50/116 37/49/116 39/48/116 40/47/116
f 37/283/117 45/284/117 44/16/117 38/15/117
f 46/285/118 42/286/118 41/282/118 47/287/118
f 48/54/119 43/53/119 45/52/119 46/51/119
f 43/288/120 51/289/120 50/17/120 44/16/120
f 52/290/121 48/291/121 47/287/121 53/292/121
f 54/58/122 49/57/122 51/56/122 52/55/122
f 49/293/123 57/294/123 56/18/123 50/17/123
f 58/295/124 54/296/124 53/292/124 59/297/124
f 60/62/125 55/61/125 57/60/125 58/59/125
f 55/298/126 63/189/126 62/19/126 56/18/126
f 64/190/127 60/299/127 59/297/127 65/191/127
f 66/66/128 61/65/128 63/64/128 64/63/128
f 61/188/129 69/194/129 68/20/129 62/19/129
f 70/195/130 66/192/130 65/191/130 71/196/130
f 72/70/131 67/69/131 69/300/131 70/301/131
f 67/193/132 75/302/132 74/21/132 68/20/132
f 76/303/133 72/197/133 71/196/133 77/304/133
f 78/74/134 73/73/134 75/72/134 76/71/134
f 73/305/135 81/306/135 80/22/135 74/21/135
f 82/307/136 78/308/136 77/304/136 83/309/136
f 84/78/137 79/77/137 81/76/137 82/75/137
f 79/310/138 87/311/138 86/23/138 80/22/138
f 88/312/139 84/313/139 83/309/139 89/314/139
f 90/82/140 85/81/140 87/80/140 88/79/140
f 85/315/141 93/316/141 92/24/141 86/23/141
f 94/317/142 90/318/142 89/314/142 95/319/142
f 96/86/143 91/85/143 93/84/143 94/83/143
f 91/320/144 99/321/144 98/25/144 92/24/144
f 100/322/145 96/323/145 95/319/145 101/324/145
f 102/90/146 97/89/146 99/88/146 100/87/146
f 97/325/147 105/209/147 104/26/147 98/25/147
f 106/210/148 102/326/148 101/324/148 107/211/148
f 108/94/149 103/93/149 105/92/149 106/91/149
f 103/208/150 111/214/150 110/27/150 104/26/150
f 112/215/151 108/212/151 107/211/151 113/216/151
f 114/148/152 109/147/152 111/96/152 112/95/152
f 109/213/153 117/219/153 116/28/153 110/27/153
f 118/220/154 114/217/154 113/216/154 119/221/154
f 120/102/155 115/101/155 117/100/155 118/99/155
f 115/218/156 123/224/156 122/29/156 116/28/156
f 124/225/157 120/222/157 119/221/157 125/226/157
f 126/106/158 121/105/158 123/104/158 124/103/158
f 121/223/159 129/327/159 128/30/159 122/29/159
f 130/328/160 126/227/160 125/226/160 131/329/160
f 132/110/161 127/109/161 129/108/161 130/107/161
f 127/330/162 135/331/162 134/31/162 128/30/162
f 136/332/163 132/333/163 131/329/163 137/334/163
f 138/114/164 133/113/164 135/112/164 136/111/164
f 133/335/165 141/336/165 140/32/165 134/31/165
f 142/115/166 138/114/166 137/231/166 143/233/166
f 144/118/167 139/117/167 141/116/167 142/115/167
f 139/337/168 147/338/168 146/33/168 140/32/168
f 148/339/169 144/340/169 143/341/169 149/342/169
f 150/122/170 145/121/170 147/120/170 148/119/170
f 145/343/171 153/237/171 152/34/171 146/33/171
f 154/238/172 150/344/172 149/342/172 155/239/172
f 156/126/173 151/125/173 153/124/173 154/123/173
f 151/236/174 159/242/174 158/35/174 152/34/174
f 160/243/175 156/240/175 155/239/175 161/244/175
f 162/130/176 157/129/176 159/128/176 160/127/176
f 157/241/177 165/247/177 164/36/177 158/35/177
f 166/248/178 162/245/178 161/244/178 167/249/178
f 168/274/179 163/273/179 165/132/179 166/131/179
f 163/246/180 171/252/180 170/37/180 164/36/180
f 172/253/181 168/250/181 167/249/181 173/254/181
f 174/136/182 169/135/182 171/134/182 172/133/182
f 169/251/183 177/257/183 176/38/183 170/37/183
f 178/258/184 174/255/184 173/254/184 179/259/184
f 180/140/185 175/139/185 177/138/185 178/137/185
f 175/256/186 183/345/186 182/39/186 176/38/186
f 184/346/187 180/260/187 179/259/187 185/347/187
f 186/144/188 181/143/188 183/142/188 184/141/188
f 181/348/189 189/349/189 188/40/189 182/39/189
f 190/350/190 186/351/190 185/347/190 191/352/190
f 192/6/191 187/5/191 189/146/191 190/145/191
f 187/5/192 17/8/192 16/167/192 188/263/192
f 14/7/193 192/6/193 191/264/193 15/166/193
f 2/160/194 8/266/194 15/270/194 191/352/194 185/347/194 179/259/194 173/254/194 167/249/194 161/244/194 155/239/194 149/342/194 143/341/194 137/334/194 131/329/194 125/226/194 119/221/194 113/216/194 107/211/194 101/324/194 95/319/194 89/314/194 83/309/194 77/304/194 71/196/194 65/191/194 59/297/194 53/292/194 47/287/194 41/282/194 35/277/194 29/176/194 23/171/194

2161
Levels/Geometry/Marble.obj Normal file

File diff suppressed because it is too large Load Diff

2069
Levels/Geometry/Sphere.obj Normal file

File diff suppressed because it is too large Load Diff

View File

Before

Width:  |  Height:  |  Size: 166 KiB

After

Width:  |  Height:  |  Size: 166 KiB

266
Levels/Geometry/torch.obj Normal file
View File

@ -0,0 +1,266 @@
# Blender v2.71 (sub 0) OBJ File: 'torch.blend'
# www.blender.org
o Cylinder
v 0.000000 -1.000000 -0.087051
v -0.000000 1.000000 -0.191513
v 0.016983 -1.000000 -0.085379
v 0.037362 1.000000 -0.187833
v 0.033313 -1.000000 -0.080425
v 0.073289 1.000000 -0.176935
v 0.048363 -1.000000 -0.072380
v 0.106399 1.000000 -0.159237
v 0.061555 -1.000000 -0.061555
v 0.135420 1.000000 -0.135420
v 0.072380 -1.000000 -0.048363
v 0.159237 1.000000 -0.106399
v 0.080425 -1.000000 -0.033313
v 0.176935 1.000000 -0.073289
v 0.085379 -1.000000 -0.016983
v 0.187833 1.000000 -0.037362
v 0.087051 -1.000000 -0.000000
v 0.191513 1.000000 0.000000
v 0.085379 -1.000000 0.016983
v 0.187833 1.000000 0.037362
v 0.080425 -1.000000 0.033313
v 0.176935 1.000000 0.073289
v 0.072380 -1.000000 0.048363
v 0.159237 1.000000 0.106399
v 0.061555 -1.000000 0.061555
v 0.135420 1.000000 0.135420
v 0.048363 -1.000000 0.072380
v 0.106399 1.000000 0.159237
v 0.033313 -1.000000 0.080425
v 0.073289 1.000000 0.176935
v 0.016983 -1.000000 0.085379
v 0.037362 1.000000 0.187833
v -0.000000 -1.000000 0.087051
v -0.000000 1.000000 0.191513
v -0.016983 -1.000000 0.085379
v -0.037362 1.000000 0.187833
v -0.033313 -1.000000 0.080425
v -0.073289 1.000000 0.176935
v -0.048363 -1.000000 0.072380
v -0.106399 1.000000 0.159237
v -0.061555 -1.000000 0.061555
v -0.135420 1.000000 0.135420
v -0.072381 -1.000000 0.048363
v -0.159237 1.000000 0.106399
v -0.080425 -1.000000 0.033313
v -0.176935 1.000000 0.073289
v -0.085379 -1.000000 0.016983
v -0.187833 1.000000 0.037362
v -0.087051 -1.000000 -0.000000
v -0.191513 1.000000 -0.000000
v -0.085379 -1.000000 -0.016983
v -0.187833 1.000000 -0.037362
v -0.080425 -1.000000 -0.033313
v -0.176935 1.000000 -0.073289
v -0.072380 -1.000000 -0.048363
v -0.159237 1.000000 -0.106399
v -0.061554 -1.000000 -0.061555
v -0.135420 1.000000 -0.135420
v -0.048363 -1.000000 -0.072381
v -0.106399 1.000000 -0.159237
v -0.033313 -1.000000 -0.080425
v -0.073289 1.000000 -0.176935
v -0.016983 -1.000000 -0.085379
v -0.037362 1.000000 -0.187833
vt 0.173159 0.324353
vt 0.355490 0.133897
vt 0.388961 0.169345
vt 0.188374 0.340465
vt 0.418692 0.207984
vt 0.201889 0.358028
vt 0.444379 0.249421
vt 0.213565 0.376862
vt 0.465761 0.293235
vt 0.223285 0.396777
vt 0.482621 0.338980
vt 0.230950 0.417570
vt 0.494787 0.386190
vt 0.236481 0.439028
vt 0.502136 0.434385
vt 0.239822 0.460935
vt 0.504593 0.483075
vt 0.240940 0.483066
vt 0.502132 0.531764
vt 0.239822 0.505197
vt 0.494779 0.579957
vt 0.236481 0.527103
vt 0.482609 0.627165
vt 0.230950 0.548561
vt 0.465746 0.672906
vt 0.223286 0.569353
vt 0.444361 0.716715
vt 0.213567 0.589266
vt 0.418672 0.758148
vt 0.201891 0.608099
vt 0.388940 0.796782
vt 0.188377 0.625660
vt 0.355468 0.832224
vt 0.173163 0.641770
vt 0.318596 0.864115
vt 0.156403 0.656266
vt 0.278700 0.892129
vt 0.138269 0.669000
vt 0.236185 0.915982
vt 0.118944 0.679843
vt 0.191483 0.935431
vt 0.098625 0.688683
vt 0.145050 0.950278
vt 0.077519 0.695432
vt 0.097357 0.960373
vt 0.055840 0.700021
vt 0.048890 0.965612
vt 0.033810 0.702402
vt 0.000142 0.965943
vt 0.011651 0.702553
vt 0.011637 0.263556
vt 0.000142 0.000142
vt 0.048895 0.000476
vt 0.033797 0.263708
vt 0.097366 0.005719
vt 0.055829 0.266091
vt 0.145063 0.015817
vt 0.077509 0.270681
vt 0.191499 0.030670
vt 0.098617 0.277432
vt 0.236203 0.050124
vt 0.118937 0.286274
vt 0.278720 0.073982
vt 0.138263 0.297119
vt 0.635136 0.466957
vt 0.594601 0.439872
vt 0.560128 0.405399
vt 0.533043 0.364864
vt 0.514387 0.319824
vt 0.504876 0.272009
vt 0.504876 0.223258
vt 0.514387 0.175443
vt 0.533044 0.130402
vt 0.560129 0.089866
vt 0.594602 0.055394
vt 0.635137 0.028309
vt 0.680177 0.009653
vt 0.727992 0.000142
vt 0.776744 0.000142
vt 0.824559 0.009653
vt 0.869599 0.028309
vt 0.910135 0.055395
vt 0.944607 0.089867
vt 0.971691 0.130402
vt 0.990347 0.175442
vt 0.999858 0.223257
vt 0.999858 0.272009
vt 0.990347 0.319823
vt 0.971691 0.364863
vt 0.944606 0.405398
vt 0.910133 0.439871
vt 0.869598 0.466956
vt 0.824557 0.485613
vt 0.776743 0.495124
vt 0.727992 0.495124
vt 0.680177 0.485613
vt 0.156399 0.309855
vt 0.318618 0.102002
vt 0.545660 0.520522
vt 0.564085 0.508211
vt 0.584558 0.499731
vt 0.606292 0.495408
vt 0.628452 0.495407
vt 0.650186 0.499730
vt 0.670659 0.508211
vt 0.689084 0.520522
vt 0.704753 0.536191
vt 0.717065 0.554616
vt 0.725545 0.575089
vt 0.729868 0.596823
vt 0.729868 0.618983
vt 0.725545 0.640717
vt 0.717065 0.661190
vt 0.704754 0.679615
vt 0.689084 0.695284
vt 0.670659 0.707596
vt 0.650185 0.716076
vt 0.628452 0.720399
vt 0.606292 0.720399
vt 0.584558 0.716076
vt 0.564085 0.707595
vt 0.545660 0.695284
vt 0.529990 0.679615
vt 0.517679 0.661190
vt 0.509199 0.640717
vt 0.504876 0.618983
vt 0.504876 0.596824
vt 0.509199 0.575090
vt 0.517679 0.554617
vt 0.529991 0.536192
vn 0.097900 -0.051900 -0.993800
vn 0.289900 -0.051900 -0.955700
vn 0.470800 -0.051900 -0.880700
vn 0.633500 -0.051900 -0.772000
vn 0.772000 -0.051900 -0.633500
vn 0.880700 -0.051900 -0.470800
vn 0.955700 -0.051900 -0.289900
vn 0.993800 -0.051900 -0.097900
vn 0.993800 -0.051900 0.097900
vn 0.955700 -0.051900 0.289900
vn 0.880700 -0.051900 0.470800
vn 0.772000 -0.051900 0.633500
vn 0.633500 -0.051900 0.772000
vn 0.470800 -0.051900 0.880700
vn 0.289900 -0.051900 0.955700
vn 0.097900 -0.051900 0.993800
vn -0.097900 -0.051900 0.993800
vn -0.289900 -0.051900 0.955600
vn -0.470800 -0.051900 0.880700
vn -0.633500 -0.051900 0.772000
vn -0.772000 -0.051900 0.633500
vn -0.880700 -0.051900 0.470800
vn -0.955700 -0.051900 0.289900
vn -0.993800 -0.051900 0.097900
vn -0.993800 -0.051900 -0.097900
vn -0.955600 -0.051900 -0.289900
vn -0.880700 -0.051900 -0.470800
vn -0.772000 -0.051900 -0.633500
vn -0.633500 -0.051900 -0.772000
vn -0.470800 -0.051900 -0.880700
vn 0.000000 1.000000 0.000000
vn -0.097900 -0.051900 -0.993800
vn -0.289900 -0.051900 -0.955700
vn 0.000000 -1.000000 0.000000
s off
f 1/1/1 2/2/1 4/3/1 3/4/1
f 3/4/2 4/3/2 6/5/2 5/6/2
f 5/6/3 6/5/3 8/7/3 7/8/3
f 7/8/4 8/7/4 10/9/4 9/10/4
f 9/10/5 10/9/5 12/11/5 11/12/5
f 11/12/6 12/11/6 14/13/6 13/14/6
f 13/14/7 14/13/7 16/15/7 15/16/7
f 15/16/8 16/15/8 18/17/8 17/18/8
f 17/18/9 18/17/9 20/19/9 19/20/9
f 19/20/10 20/19/10 22/21/10 21/22/10
f 21/22/11 22/21/11 24/23/11 23/24/11
f 23/24/12 24/23/12 26/25/12 25/26/12
f 25/26/13 26/25/13 28/27/13 27/28/13
f 27/28/14 28/27/14 30/29/14 29/30/14
f 29/30/15 30/29/15 32/31/15 31/32/15
f 31/32/16 32/31/16 34/33/16 33/34/16
f 33/34/17 34/33/17 36/35/17 35/36/17
f 35/36/18 36/35/18 38/37/18 37/38/18
f 37/38/19 38/37/19 40/39/19 39/40/19
f 39/40/20 40/39/20 42/41/20 41/42/20
f 41/42/21 42/41/21 44/43/21 43/44/21
f 43/44/22 44/43/22 46/45/22 45/46/22
f 45/46/23 46/45/23 48/47/23 47/48/23
f 47/48/24 48/47/24 50/49/24 49/50/24
f 49/51/25 50/52/25 52/53/25 51/54/25
f 51/54/26 52/53/26 54/55/26 53/56/26
f 53/56/27 54/55/27 56/57/27 55/58/27
f 55/58/28 56/57/28 58/59/28 57/60/28
f 57/60/29 58/59/29 60/61/29 59/62/29
f 59/62/30 60/61/30 62/63/30 61/64/30
f 4/65/31 2/66/31 64/67/31 62/68/31 60/69/31 58/70/31 56/71/31 54/72/31 52/73/31 50/74/31 48/75/31 46/76/31 44/77/31 42/78/31 40/79/31 38/80/31 36/81/31 34/82/31 32/83/31 30/84/31 28/85/31 26/86/31 24/87/31 22/88/31 20/89/31 18/90/31 16/91/31 14/92/31 12/93/31 10/94/31 8/95/31 6/96/31
f 63/97/32 64/98/32 2/2/32 1/1/32
f 61/64/33 62/63/33 64/98/33 63/97/33
f 1/99/34 3/100/34 5/101/34 7/102/34 9/103/34 11/104/34 13/105/34 15/106/34 17/107/34 19/108/34 21/109/34 23/110/34 25/111/34 27/112/34 29/113/34 31/114/34 33/115/34 35/116/34 37/117/34 39/118/34 41/119/34 43/120/34 45/121/34 47/122/34 49/123/34 51/124/34 53/125/34 55/126/34 57/127/34 59/128/34 61/129/34 63/130/34

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

View File

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View File

@ -4,8 +4,8 @@ uniform mat4 modelMatrix;
uniform mat4 viewMatrix;
uniform mat4 projectionMatrix;
in vec3 aNormal;
in vec3 aPosition;
in vec3 aNormal;
in vec2 aTexCoord;
out vec3 vNormal;

View File

@ -1,12 +1,12 @@
#include "camera.hh"
Camera::Camera(glm::vec3 rotation, float distance) {
Camera::Camera(glm::vec2 rotation, float distance) {
this->rotation = rotation;
this->distance = distance;
}
Camera::Camera() {
rotation = glm::vec3(0.0f, 0.0f, 0.0f);
rotation = glm::vec2(0.0f, 0.0f);
distance = 1.0f;
}
@ -19,16 +19,56 @@ float Camera::getDistance() {
void Camera::setDistance(float distance) {
this->distance = distance;
updatePosition();
}
glm::vec3 Camera::getRotation() {
glm::vec2 Camera::getRotation() {
return rotation;
}
void Camera::setRotation(glm::vec3 rotation) {
void Camera::setRotation(glm::vec2 rotation) {
this->rotation = rotation;
updatePosition();
}
void Camera::updateRotation(glm::vec3 rotation) {
this->rotation += rotation;;
void Camera::updateRotation(glm::vec2 rotation) {
this->rotation += rotation;
if((this->rotation.x + rotation.x) >= 1.57f) {
this->rotation.x = 1.57;
this->rotation.y += rotation.y;
}
else if ((this->rotation.x + rotation.x) <= -1.57f) {
this->rotation.x = -1.57f;
this->rotation.y += rotation.y;
}
else {
this-> rotation += rotation;
}
updatePosition();
}
void Camera:: updateDistance(float distance) {
if (this->distance + distance <= 1.0f) {
this->distance = 1.0f;
}
else if (this->distance + distance >= 30.0f) {
this->distance = 30.f;
}
else {
this->distance += distance;
}
updatePosition();
}
void Camera::updatePosition() {
glm::vec4 cameraVector = glm::vec4(0.0f, 0.0f, distance, 0.0f);
// rotate vector
glm::mat4 rotationMatrix =
glm::rotate<float>(rotation[1], glm::vec3(0.0f, 1.0f, 0.0f)) * glm::rotate<float>(rotation[0], glm::vec3(1.0f, 0.0f, 0.0f));
this->vector = glm::vec3(rotationMatrix * cameraVector);
}
glm::vec3 Camera::getVector() {
return vector;
}

View File

@ -5,17 +5,21 @@
class Camera {
public:
Camera(glm::vec3 rotation, float distance);
Camera(glm::vec2 rotation, float distance);
Camera();
~Camera();
float getDistance();
void setDistance(float distance);
glm::vec3 getRotation();
void setRotation(glm::vec3 rotation);
void updateRotation(glm::vec3 rotation); //adds to current rotation
void updateDistance(float distance); //adds to current distance
glm::vec2 getRotation();
void setRotation(glm::vec2 rotation);
void updateRotation(glm::vec2 rotation); //adds to current rotation
glm::vec3 getVector();
private:
void updatePosition();
float distance;
glm::vec3 rotation;
glm::vec2 rotation;
glm::vec3 vector;
};
#endif

View File

@ -1,6 +1,11 @@
#include "entity.hh"
Entity::Entity(glm::vec3 position, glm::vec3 rotation) {
this->position = position;
setRotation(rotation);
}
Entity::Entity(glm::vec3 position, glm::mat4 rotation) {
this->position = position;
this->rotation = rotation;
}
@ -15,7 +20,7 @@ glm::vec3 Entity::getPosition() {
return position;
}
glm::vec3 Entity::getRotation() {
glm::mat4 Entity::getRotation() {
return rotation;
}
@ -24,5 +29,11 @@ void Entity::setPosition(glm::vec3 position) {
}
void Entity::setRotation(glm::vec3 rotation) {
this->rotation = glm::rotate(rotation.x, glm::vec3(1.0f, 0.0f, 0.0f))
* glm::rotate(rotation.y, glm::vec3(0.0f, 1.0f, 0.0f))
* glm::rotate(rotation.z, glm::vec3(0.0f, 0.0f, 1.0f));
}
void Entity::setRotation(glm::mat4 rotation) {
this->rotation = rotation;
}

View File

@ -6,15 +6,17 @@
class Entity {
public:
Entity(glm::vec3 position, glm::vec3 rotation);
Entity(glm::vec3 position, glm::mat4 rotation);
Entity();
~Entity();
void setPosition(glm::vec3 positon);
void setRotation(glm::vec3 rotation);
void setRotation(glm::mat4 rotation);
glm::vec3 getPosition();
glm::vec3 getRotation();
glm::mat4 getRotation();
private:
glm::vec3 position;
glm::vec3 rotation;
glm::mat4 rotation;
};
#endif

View File

@ -17,6 +17,8 @@ subject to the following restrictions:
#ifndef BT_OBJECT_ARRAY__
#define BT_OBJECT_ARRAY__
#pragma GCC diagnostic ignored "-Wunused-variable"
#include "btScalar.h" // has definitions like SIMD_FORCE_INLINE
#include "btAlignedAllocator.h"

View File

@ -1,100 +1,148 @@
#include "graphics.hh"
#include <iostream>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <ACGL/OpenGL/glloaders/extensions.hh>
#include <ACGL/Utils/FileHelpers.hh>
#include <ACGL/Utils/StringHelpers.hh>
#include "model.hh"
#include <ACGL/OpenGL/Creator/ShaderProgramCreator.hh>
using namespace std;
ACGL::OpenGL::SharedShaderProgram shader;
Level level;
// gets called after the OpenGL window is prepared:
void initCustomResources()
{
// define where shaders and textures can be found:
ACGL::Base::Settings::the()->setResourcePath("../");
ACGL::Base::Settings::the()->setShaderPath("Shader/");
ACGL::Base::Settings::the()->setTexturePath("Geometry/");
ACGL::Base::Settings::the()->setGeometryPath("Geometry/");
// load Model to give shader correct Attribute locations
// TODO look up if this is really necessary, since this looks really stupid.
Model model = Model("Bunny.obj");
// look up all shader files starting with 'phong' and build a ShaderProgram from it:
shader = ACGL::OpenGL::ShaderProgramCreator("phong").attributeLocations(
model.getReference()->getAttributeLocations()).create();
shader->use();
// load Level
level.load(shader);
// just in case: check for errors
openGLCriticalError();
Graphics::Graphics() {
}
void deleteCustomResources()
{
// we have memory management via reference counting, so nothing to do here
GLFWwindow* Graphics::getWindow() {
return window;
}
void draw(float runTime)
{
// update Level first TODO: move this with the rest of the stuff that doesn't belong here to main
level.update(runTime);
glm::uvec2 Graphics::getWindowSize() {
return windowSize;
}
void Graphics::setGLFWHintsForOpenGLVersion( unsigned int _version )
{
#ifdef __APPLE__
#if (ACGL_OPENGL_VERSION >= 30)
// request OpenGL 3.2, will return a 4.1 context on Mavericks
glfwWindowHint( GLFW_CONTEXT_VERSION_MAJOR, 3 );
glfwWindowHint( GLFW_CONTEXT_VERSION_MINOR, 2 );
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
#endif
#else
// non-apple
glfwWindowHint( GLFW_CONTEXT_VERSION_MAJOR, _version / 10 );
glfwWindowHint( GLFW_CONTEXT_VERSION_MINOR, _version % 10 );
#ifdef ACGL_OPENGL_PROFILE_CORE
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
#endif
#endif
}
bool Graphics::createWindow()
{
/////////////////////////////////////////////////////////////////////////////////////
// Initialise GLFW
//
if ( !glfwInit() )
{
ACGL::Utils::error() << "Failed to initialize GLFW" << endl;
exit( -1 );
}
/////////////////////////////////////////////////////////////////////////////////////
// Configure OpenGL context
//
setGLFWHintsForOpenGLVersion( ACGL_OPENGL_VERSION );
// activate multisampling (second parameter is the number of samples):
//glfwWindowHint( GLFW_SAMPLES, 8 );
// request an OpenGL debug context:
glfwWindowHint( GLFW_OPENGL_DEBUG_CONTEXT, true );
// define whether the window can get resized:
glfwWindowHint(GLFW_RESIZABLE, true);
// non-decorated windows can be used as splash screens:
//glfwWindowHint( GLFW_DECORATED, false );
/////////////////////////////////////////////////////////////////////////////////////
// try to create an OpenGL context in a window and check the supported OpenGL version:
// R,G,B,A, Depth,Stencil
window = glfwCreateWindow(windowSize.x, windowSize.y, "SWP MarbleGame Group C", NULL, NULL);
if (!getWindow()) {
ACGL::Utils::error() << "Failed to open a GLFW window - requested OpenGL: " << ACGL_OPENGL_VERSION << endl;
return false;
}
glfwMakeContextCurrent(window);
ACGL::init();
return true;
}
Graphics::Graphics(glm::uvec2 windowSize, float nearPlane, float farPlane) {
this->windowSize = windowSize;
this->nearPlane = nearPlane;
this->farPlane = farPlane;
}
void Graphics::render(Level* level, ACGL::OpenGL::SharedShaderProgram shader)
{
// clear the framebuffer:
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
//set view and projection matrix
shader->setUniform("projectionMatrix", buildFrustum(75.0, 0.1, 100.0, (float)g_windowSize.x/(float)g_windowSize.y) );
// the + (0,1,0) compensates bunny doesn't have its center at it's center
shader->setUniform("viewMatrix", buildViewMatrix());
shader->setUniform("projectionMatrix", buildFrustum(75.0f, 0.1f, 100.0f, (float)windowSize.x/(float)windowSize.y) );
shader->setUniform("viewMatrix", buildViewMatrix(level));
//set lighting parameters
if (level.getLights().size() > 0) {
shader->setUniform("lightCount", (int) level.getLights().size());
if (level->getLights().size() > 0) {
shader->setUniform("lightCount", (int) level->getLights().size());
// TODO look into doing this less often
// Build light position array
glm::vec3 lightSources[level.getLights().size()];
for(unsigned int i = 0; i<level.getLights().size(); i++) {
lightSources[i] = level.getLights()[i].getPosition();
glm::vec3 lightSources[level->getLights().size()];
for(unsigned int i = 0; i<level->getLights().size(); i++) {
lightSources[i] = level->getLights()[i].getPosition();
}
glUniform3fv(shader->getUniformLocation("lightSources"),
sizeof(lightSources), (GLfloat*) lightSources);
// Build light colour array
glm::vec3 lightColours[level.getLights().size()];
for(unsigned int i = 0; i<level.getLights().size(); i++) {
lightColours[i] = level.getLights()[i].getColour();
glm::vec3 lightColours[level->getLights().size()];
for(unsigned int i = 0; i<level->getLights().size(); i++) {
lightColours[i] = level->getLights()[i].getColour();
}
glUniform3fv(shader->getUniformLocation("lightColors"),
sizeof(lightColours), (GLfloat*) lightColours);
// Build light attenuation array
float lightIntensities[level.getLights().size()];
for(unsigned int i = 0; i<level.getLights().size(); i++) {
lightIntensities[i] = level.getLights()[i].getIntensity();
float lightIntensities[level->getLights().size()];
for(unsigned int i = 0; i<level->getLights().size(); i++) {
lightIntensities[i] = level->getLights()[i].getIntensity();
}
glUniform1fv(shader->getUniformLocation("lightIntensities"),
sizeof(lightIntensities), (GLfloat*) lightIntensities);
}
// set Material Parameters
shader->setUniform("ambientColor", level.getAmbientLight());
shader->setUniform("ambientColor", level->getAmbientLight());
shader->setUniform("camera", glm::vec3(0.0f, 0.0f, 0.0f));
// render the level(currently only a bunny):
level.render();
level->render();
}
void resizeCallback( GLFWwindow *, int newWidth, int newHeight )
{
// store the new window size and adjust the viewport:
g_windowSize = glm::uvec2( newWidth, newHeight);
glViewport( 0, 0, g_windowSize.x, g_windowSize.y );
void Graphics::setWindowSize(glm::uvec2 windowSize) {
this->windowSize = windowSize;
}
glm::mat4 buildFrustum( float phiInDegree, float _near, float _far, float aspectRatio) {
glm::mat4 Graphics::buildFrustum( float phiInDegree, float _near, float _far, float aspectRatio) {
float phiHalfInRadians = 0.5*phiInDegree * (M_PI/180.0);
float top = _near * tan( phiHalfInRadians );
@ -105,12 +153,8 @@ glm::mat4 buildFrustum( float phiInDegree, float _near, float _far, float aspect
return glm::frustum(left, right, bottom, top, _near, _far);
}
glm::mat4 buildViewMatrix() {
glm::vec4 cameraVector = glm::vec4(0.0f, 0.0f, level.getCamera().getDistance(), 0.0f);
// rotate vector
glm::mat4 rotationMatrix = glm::rotate<float>(level.getCamera().getRotation()[0], glm::vec3(1.0f, 0.0f, 0.0f)) *
glm::rotate<float>(level.getCamera().getRotation()[1], glm::vec3(0.0f, 1.0f, 0.0f)) * glm::rotate<float>(level.getCamera().getRotation()[2], glm::vec3(0.0f, 0.0f, 1.0f));
cameraVector = rotationMatrix * cameraVector;
glm::mat4 Graphics::buildViewMatrix(Level* level) {
//construct lookAt (cameraPosition = cameraCenter + cameraVector
return glm::lookAt(level.getCameraCenter()->getPosition() + glm::vec3(cameraVector), level.getCameraCenter()->getPosition(), glm::vec3(0.0f, 1.0f, 0.0f));
return glm::lookAt((level->getCameraCenter()->getPosition() + level->getCamera()->getVector()),
level->getCameraCenter()->getPosition(), glm::vec3(0.0f, 1.0f, 0.0f));
}

View File

@ -1,26 +1,29 @@
#ifndef GRAPHICS_HH_INCLUDED
#define GRAPHICS_HH_INCLUDED
#include <ACGL/OpenGL/GL.hh>
#include "main.hh"
#include <ACGL/Base/Settings.hh>
#include <GLFW/glfw3.h>
#include <ACGL/Math/Math.hh>
#include "level.hh"
// gets called after the OpenGL window is prepared, init of example specific stuff:
void initCustomResources();
// gets called at application shutdown:
void deleteCustomResources();
// gets called ech frame, runTime is in seconds:
void draw(float runTime);
// gets called at window resize:
void resizeCallback( GLFWwindow *, int newWidth, int newHeight );
// to build the projection matrix:
glm::mat4 buildFrustum( float phiInDegree, float near, float far, float aspectRatio);
glm::mat4 buildViewMatrix();
class Graphics {
public:
Graphics(glm::uvec2 windowSize, float nearPlane, float farPlane);
Graphics();
void render(Level* level, ACGL::OpenGL::SharedShaderProgram shader);
// to build the projection matrix:
glm::mat4 buildFrustum( float phiInDegree, float near, float far, float aspectRatio);
glm::mat4 buildViewMatrix(Level* level);
glm::uvec2 getWindowSize();
bool createWindow();
GLFWwindow* getWindow();
void setWindowSize(glm::uvec2 windowSize);
private:
void setGLFWHintsForOpenGLVersion( unsigned int _version );
glm::uvec2 windowSize;
float nearPlane;
float farPlane;
GLFWwindow* window;
};
#endif

View File

@ -1,5 +1,7 @@
#include "level.hh"
Level::Level(std::string filePath){
this->filePath = filePath;
this->terrain = Terrain(filePath + "/terrain");
@ -12,38 +14,99 @@ Level::~Level() {
}
void Level::load(ACGL::OpenGL::SharedShaderProgram shader) {
this->physics = Physics();
this->physics.init();
// currently hard coded should later read this stuff out of a file
this->camera = Camera(glm::vec3(-0.8f, 0.0f, 0.0f), 3.0f);
this->camera = Camera(glm::vec2(-0.8f, 0.0f), 3.0f);
// load the geometry of the stanford bunny and build a VAO:
Model model = Model("Bunny.obj", 0.25f);
Model model = Model("Marble.obj", 0.75f);
// load a texture:
Material material = Material("clownfishBunny.png", 0.1f, 0.5f, 0.5f, 3.0f);
Material material = Material("marbleTexture.png", 0.1f, 0.5f, 0.5f, 3.0f);
//Create object
Object object = Object(model, material, glm::vec3(0.0f, -1.0f, -2.0f),
Object object = Object(model, material, glm::vec3(0.0f, 5.0f, 0.0f),
glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(0.0f, 0.0f, 0.0f),
glm::vec3(0.0f, 0.0f, 0.0f), shader);
//add player to phy
this->physics.addPlayer(0.75f,0.0f,5.0f,0.0f,1.0f,0);
objects.push_back(object);
physics.addStaticGroundPlane();
Model torchModel = Model("torch.obj", 0.75f);
Material torchMaterial = Material("torchTexture.png", 0.1f, 0.3f, 0.7f, 10.0f);
//Create object
Object torchObject = Object(torchModel, torchMaterial, glm::vec3(-3.0f, 5.0f, 0.0f),
glm::vec3(0.0f, 1.0472f, 0.0f), glm::vec3(0.0f, 0.0f, 0.0f),
glm::vec3(0.0f, 0.0f, 0.0f), shader);
objects.push_back(object);
cameraCenter = &objects[0];
objects.push_back(torchObject);
Model blockModel = Model("Block.obj", 1.0f);
Material blockMaterial = Material("blockTexture.png", 0.1f, 0.6, 0.4f, 2.0f);
Object blockObject = Object(blockModel, blockMaterial, glm::vec3(2.0f, 5.0f, 2.0f),
glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(0.0f, 0.0f, 0.0f),
shader);
objects.push_back(blockObject);
Model columnModel = Model("Column.obj", 1.0f);
Material columnMaterial = Material("columnTexture.png", 0.1f, 0.6, 0.4f, 2.0f);
Object columnObject = Object(columnModel, columnMaterial, glm::vec3(-2.0f, 5.0f, -2.0f),
glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(0.0f, 0.0f, 0.0f),
shader);
objects.push_back(columnObject);
//set lighting parameters
ambientLight = glm::vec3(1.0f, 1.0f, 1.0f);
Light light = Light(glm::vec3(-3.0f, 0.0f, 0.0f), glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(1.0f, 0.0f, 0.0f), 2.0f);
Light light = Light(glm::vec3(-3.0f, 6.0f, 0.0f), glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(1.0f, 1.0f, 1.0f), 10.0f);
lights.push_back(light);
Light light2 = Light(glm::vec3(3.0f, 0.0f, 0.0f), glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(0.0f, 0.0f, 1.0f), 2.0f);
Light light2 = Light(glm::vec3(3.0f, 6.0f, 0.0f), glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(1.0f, 1.0f, 1.0f), 10.0f);
lights.push_back(light2);
Light light3 = Light(glm::vec3(0.0f, 5.0f, 0.0f), glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(0.5f, 0.5f, 1.0f), 4.0f);
lights.push_back(light3);
// load terrain
this->terrain.load();
Model terrainModel = Model(this->terrain.getModel());
// load a texture:
Material terrainMaterial = Material("terrainTexture.png", 0.1f, 0.8f, 0.2f, 3.0f);
//Create object
Object terrainObject = Object(terrainModel, terrainMaterial,
glm::vec3(-0.5f*(float)this->terrain.getHeightmapHeight(), 0.0f, -0.5f*(float)this->terrain.getHeightmapWidth()),
glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(0.0f, 0.0f, 0.0f),
glm::vec3(0.0f, 0.0f, 0.0f), shader);
objects.push_back(terrainObject);
cameraCenter = &objects[0];
}
void Level::render() {
for(unsigned int i = 0; i<objects.size(); i++) {
objects[i].render();
}
this->terrain.render();
}
void Level::update(float runTime) {
void Level::update(float runTime, glm::vec2 mouseDelta, bool wPressed, bool aPressed, bool dPressed, bool sPressed) {
// rotate bunny
cameraCenter->setRotation(glm::vec3(0.0f, 1.0472f * runTime, 0.0f));
//cameraCenter->setRotation(glm::vec3(0.0f, 1.0472f * runTime, 0.0f));
// Ignore first two mouse updates, because they are incorrect
static int i = 0;
if (i <2) {
i++;
}
else {
camera.updateRotation(mouseDelta/100.0f);
}
if(wPressed)
{
//physics.rollForward(camera.getRotation);
}
physics.takeUpdateStep(runTime);
objects[0].setPosition(physics.getPos(0));
lights[2].setPosition(physics.getPos(0));
}
glm::vec3 Level::getAmbientLight() {
@ -54,8 +117,8 @@ std::vector<Light> Level::getLights() {
return lights;
}
Camera Level::getCamera() {
return camera;
Camera* Level::getCamera() {
return &camera;
}
Object* Level::getCameraCenter() {

View File

@ -8,6 +8,7 @@
#include "terrain.hh"
#include "material.hh"
#include "camera.hh"
#include "physics.hh"
class Level {
public:
@ -15,18 +16,19 @@ class Level {
Level();
~Level();
void load(ACGL::OpenGL::SharedShaderProgram shader); // Shader is necessary for correct texture assigning
void update(float runTime);
void update(float runTime, glm::vec2 mouseDelta,bool wPressed, bool aPressed,bool sPressed, bool dPressed);
void render();
glm::vec3 getAmbientLight();
std::vector<Light> getLights();
Object* getCameraCenter();
Camera getCamera();
Camera* getCamera();
private:
std::string filePath;
std::vector<Object> objects;
std::vector<Light> lights;
glm::vec3 ambientLight;
Object* cameraCenter;
Physics physics;
Camera camera;
Terrain terrain;
};

6096
lodepng.cpp Normal file

File diff suppressed because it is too large Load Diff

1702
lodepng.h Normal file

File diff suppressed because it is too large Load Diff

194
main.cc
View File

@ -10,107 +10,61 @@
#include <ACGL/Math/Math.hh>
#include <ACGL/Utils/FileHelpers.hh>
#include <ACGL/Utils/StringHelpers.hh>
#include <ACGL/OpenGL/Objects/VertexArrayObject.hh>
#include <ACGL/OpenGL/Creator/ShaderProgramCreator.hh>
#include <ACGL/OpenGL/glloaders/extensions.hh>
#include <ACGL/Base/Settings.hh>
using namespace std;
using namespace ACGL::OpenGL;
using namespace ACGL::Base;
using namespace ACGL::Utils;
glm::uvec2 g_windowSize( 1024, 786 );
float g_nearPlane = 0.1f;
float g_farPlane = 100.0f;
bool glfwWindowClosed = false;
GLFWwindow* g_window;
void setGLFWHintsForOpenGLVersion( unsigned int _version )
{
#ifdef __APPLE__
#if (ACGL_OPENGL_VERSION >= 30)
// request OpenGL 3.2, will return a 4.1 context on Mavericks
glfwWindowHint( GLFW_CONTEXT_VERSION_MAJOR, 3 );
glfwWindowHint( GLFW_CONTEXT_VERSION_MINOR, 2 );
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
#endif
#else
// non-apple
glfwWindowHint( GLFW_CONTEXT_VERSION_MAJOR, _version / 10 );
glfwWindowHint( GLFW_CONTEXT_VERSION_MINOR, _version % 10 );
#ifdef ACGL_OPENGL_PROFILE_CORE
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
#endif
#endif
Application::Application() {
graphics = Graphics(glm::uvec2(1024, 786), 0.1f, 100.0f);
}
/**********************************************************************************************************************
* Returns true if a window with the desired context could get created.
* Requested OpenGL version gets set by ACGL defines.
*/
bool createWindow()
Graphics* Application::getGraphics() {
return &graphics;
}
Level* Application::getLevel() {
return &level;
}
ACGL::OpenGL::SharedShaderProgram Application::getShader() {
return shader;
}
void Application::init()
{
/////////////////////////////////////////////////////////////////////////////////////
// Initialise GLFW
//
if ( !glfwInit() )
{
error() << "Failed to initialize GLFW" << endl;
exit( -1 );
}
// define where shaders and textures can be found:
ACGL::Base::Settings::the()->setResourcePath("../");
ACGL::Base::Settings::the()->setShaderPath("Shader/");
ACGL::Base::Settings::the()->setTexturePath("Levels/Textures/");
ACGL::Base::Settings::the()->setGeometryPath("Levels/Geometry/");
/////////////////////////////////////////////////////////////////////////////////////
// Configure OpenGL context
//
setGLFWHintsForOpenGLVersion( ACGL_OPENGL_VERSION );
// construct VAO to give shader correct Attribute locations
ACGL::OpenGL::SharedArrayBuffer ab = std::make_shared<ACGL::OpenGL::ArrayBuffer>();
ab->defineAttribute("aPosition", GL_FLOAT, 3);
ab->defineAttribute("aTexCoord", GL_FLOAT, 2);
ab->defineAttribute("aNormal", GL_FLOAT, 3);
ACGL::OpenGL::SharedVertexArrayObject vao = std::make_shared<ACGL::OpenGL::VertexArrayObject>();
vao->attachAllAttributes(ab);
// activate multisampling (second parameter is the number of samples):
//glfwWindowHint( GLFW_SAMPLES, 8 );
// look up all shader files starting with 'phong' and build a ShaderProgram from it:
shader = ACGL::OpenGL::ShaderProgramCreator("phong").attributeLocations(
vao->getAttributeLocations()).create();
shader->use();
// request an OpenGL debug context:
glfwWindowHint( GLFW_OPENGL_DEBUG_CONTEXT, true );
// load Level
level.load(shader);
// define whether the window can get resized:
//glfwWindowHint( GLFW_RESIZABLE, true );
// just in case: check for errors
openGLCriticalError();
}
// non-decorated windows can be used as splash screens:
//glfwWindowHint( GLFW_DECORATED, false );
// request an sRGB framebuffer:
//glfwWindowHint( GLFW_SRGB_CAPABLE, true );
//glfwWindowHint( , true );
//glfwWindowHint( , true );
//glfwWindowHint( , true );
//glfwWindowHint( , true );
/////////////////////////////////////////////////////////////////////////////////////
// try to create an OpenGL context in a window and check the supported OpenGL version:
// R,G,B,A, Depth,Stencil
g_window = glfwCreateWindow( g_windowSize.x, g_windowSize.y, "ACGL GLFWExamples", NULL, NULL);
if (!g_window) {
error() << "Failed to open a GLFW window - requested OpenGL: " << ACGL_OPENGL_VERSION << endl;
return false;
}
glfwMakeContextCurrent(g_window);
ACGL::init();
/////////////////////////////////////////////////////////////////////////////////////
// Init debug-extension
//
if (ACGL_ARB_debug_output()) {
//debug() << "GL_ARB_DEBUG_OUTPUT is supported, register callback" << endl;
//glDebugMessageCallbackARB( debugCallback, NULL);
// filter out the strange performance warnings about shader recompiles:
//glDebugMessageControlARB( GL_DEBUG_SOURCE_API_ARB, GL_DEBUG_TYPE_PERFORMANCE_ARB, GL_DEBUG_SEVERITY_MEDIUM_ARB, 0, NULL, GL_FALSE );
} else {
//debug() << "GL_ARB_DEBUG_OUTPUT is missing!" << endl;
}
return true;
void resizeCallback(GLFWwindow* window, int newWidth, int newHeight)
{
// store the new window size and adjust the viewport:
app.getGraphics()->setWindowSize(glm::uvec2( newWidth, newHeight));
glViewport( 0, 0, newWidth, newHeight);
}
static void keyCallback(GLFWwindow* _window, int _key, int, int _action, int)
@ -120,16 +74,19 @@ static void keyCallback(GLFWwindow* _window, int _key, int, int _action, int)
}
}
static void scrollCallback(GLFWwindow* window, double xoffset, double yoffset) {
app.getLevel()->getCamera()->updateDistance(-(float)yoffset);
}
/**********************************************************************************************************************
* Generic main for different example apps
*/
int main( int argc, char *argv[] )
{
//Application app = Application();
/////////////////////////////////////////////////////////////////////////////////////
// Create OpenGL capable window:
//
if ( !createWindow() ) {
if ( !app.getGraphics()->createWindow() ) {
glfwTerminate();
exit( -1 );
}
@ -137,12 +94,15 @@ int main( int argc, char *argv[] )
/////////////////////////////////////////////////////////////////////////////////////
// Set window title to binary name (without the path):
//
std::vector<std::string> tmp = StringHelpers::split( std::string( argv[0] ), '/' );
glfwSetWindowTitle( g_window, tmp[tmp.size()-1].c_str() );
std::vector<std::string> tmp = ACGL::Utils::StringHelpers::split( std::string( argv[0] ), '/' );
glfwSetWindowTitle(app.getGraphics()->getWindow(), tmp[tmp.size()-1].c_str() );
// Ensure we can capture the escape key being pressed below
glfwSetInputMode( g_window, GLFW_STICKY_KEYS, 1 );
glfwSetWindowSizeCallback( g_window, resizeCallback );
glfwSetKeyCallback( g_window, keyCallback );
glfwSetInputMode(app.getGraphics()->getWindow(), GLFW_STICKY_KEYS, 1);
// Hide mouse cursor
glfwSetInputMode(app.getGraphics()->getWindow(), GLFW_CURSOR, GLFW_CURSOR_HIDDEN);
glfwSetWindowSizeCallback(app.getGraphics()->getWindow(), resizeCallback);
glfwSetKeyCallback(app.getGraphics()->getWindow(), keyCallback );
glfwSetScrollCallback(app.getGraphics()->getWindow(), scrollCallback );
// Enable vertical sync (on cards that support it) with parameter 1 - 0 means off
glfwSwapInterval( 0 );
@ -152,38 +112,54 @@ int main( int argc, char *argv[] )
//
glClearColor( 0.0, 0.0, 0.0, 1.0 );
glEnable( GL_DEPTH_TEST );
initCustomResources();
app.init();
int frameCount = 0;
const double FPSdelay = 2.0;
double startTimeInSeconds = glfwGetTime();
double showNextFPS = startTimeInSeconds + FPSdelay;
double lastUpdate=0.0f;
int stateW = glfwGetKey(app.getGraphics()->getWindow(), GLFW_KEY_W);
int stateA = glfwGetKey(app.getGraphics()->getWindow(), GLFW_KEY_A);
int stateS = glfwGetKey(app.getGraphics()->getWindow(), GLFW_KEY_S);
int stateD = glfwGetKey(app.getGraphics()->getWindow(), GLFW_KEY_D);
do {
double now = glfwGetTime();
double now = glfwGetTime()- startTimeInSeconds;
if (showNextFPS <= now) {
stringstream sstream (stringstream::in | stringstream::out);
sstream << setprecision(1) << std::fixed
std::stringstream sstream (std::stringstream::in | std::stringstream::out);
sstream << std::setprecision(1) << std::fixed
<< tmp[tmp.size()-1] << " - FPS: " << frameCount / (now-showNextFPS + FPSdelay) << " " << 1000 * (now-showNextFPS + FPSdelay)/frameCount << " msec";
glfwSetWindowTitle( g_window, sstream.str().c_str() );
glfwSetWindowTitle(app.getGraphics()->getWindow(), sstream.str().c_str() );
showNextFPS = now + FPSdelay;
frameCount = 0;
}
draw( now - startTimeInSeconds );
double xpos, ypos;
glfwGetCursorPos(app.getGraphics()->getWindow(), &xpos, &ypos);
glfwSetCursorPos(app.getGraphics()->getWindow(), app.getGraphics()->getWindowSize().x/2, app.getGraphics()->getWindowSize().y/2);
app.getLevel()->update(now - lastUpdate,
glm::vec2((float)ypos-app.getGraphics()->getWindowSize().y/2,
(float)xpos-app.getGraphics()->getWindowSize().x/2),
stateW == GLFW_PRESS,stateA == GLFW_PRESS,stateS == GLFW_PRESS,stateD == GLFW_PRESS);
lastUpdate = now;
app.getGraphics()->render(app.getLevel(), app.getShader());
openGLCriticalError();
// MacOS X will not swap correctly is another FBO is bound:
glBindFramebuffer( GL_FRAMEBUFFER, 0 );
glfwSwapBuffers( g_window );
glfwSwapBuffers(app.getGraphics()->getWindow());
glfwPollEvents();
frameCount++;
} // Check if the window was closed
while( !glfwWindowShouldClose( g_window ) );
deleteCustomResources();
while( !glfwWindowShouldClose(app.getGraphics()->getWindow()) );
glfwTerminate();
exit(0);

36
main.hh
View File

@ -1,27 +1,29 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
//
// headers needed:
//
#include <ACGL/Math/Math.hh>
#ifndef MAIN_HH_INCLUDED
#define MAIN_HH_INCLUDED
#include <ACGL/OpenGL/GL.hh>
#include <ACGL/Math/Math.hh>
#include <GLFW/glfw3.h>
#include <ACGL/OpenGL/Objects/ArrayBuffer.hh>
//
///////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
#include "physics.hh"
#include "graphics.hh"
#include "level.hh"
///////////////////////////////////////////////////////////////////////////////////////////////////
//
// implement the following functions:
//
/////////////////////////////////////////////////////////////////
class Application {
public:
Application();
Graphics* getGraphics();
Level* getLevel();
ACGL::OpenGL::SharedShaderProgram getShader();
void init();
private:
Graphics graphics;
Level level;
ACGL::OpenGL::SharedShaderProgram shader;
};
// global variables exported by the generic main:
extern glm::uvec2 g_windowSize;
extern float g_nearPlane;
extern float g_farPlane;
//
///////////////////////////////////////////////////////////////////////////////////////////////////
Application app;
#endif

View File

@ -2,14 +2,12 @@
Model::Model(std::string filePath, float scale) {
reference = ACGL::OpenGL::VertexArrayObjectCreator(filePath).create();
reference->bind();
this->scale = scale;
}
Model::Model(std::string filePath) {
reference = ACGL::OpenGL::VertexArrayObjectCreator(filePath).create();
reference->bind();
this->scale = 1.0f;
Model::Model(ACGL::OpenGL::SharedVertexArrayObject vao, float scale){
reference = vao;
this->scale = scale;
}
Model::Model(){

View File

@ -6,8 +6,8 @@
class Model {
public:
Model(std::string filePath, float scale);
Model(std::string filePath);
Model(std::string filePath, float scale=1.0f);
Model(ACGL::OpenGL::SharedVertexArrayObject vao, float scale=1.0f);
Model();
~Model();
ACGL::OpenGL::SharedVertexArrayObject getReference();

View File

@ -24,9 +24,7 @@ void Object::render() {
shader->setUniform("shininess", material.getShininess());
shader->setTexture("uTexture", material.getReference(), 0);
// set model matrix
glm::mat4 rotationMatrix = glm::rotate<float>(this->getRotation()[0], glm::vec3(1.0f, 0.0f, 0.0f)) *
glm::rotate<float>(this->getRotation()[1], glm::vec3(0.0f, 1.0f, 0.0f)) * glm::rotate<float>(this->getRotation()[2], glm::vec3(0.0f, 0.0f, 1.0f));
glm::mat4 modelMatrix = glm::translate(this->getPosition()) * rotationMatrix * glm::scale<float>(glm::vec3(model.getScale()));
glm::mat4 modelMatrix = glm::translate(getPosition()) * getRotation() * glm::scale<float>(glm::vec3(model.getScale()));
shader->setUniform( "modelMatrix", modelMatrix);
// draw
model.getReference()->render();

View File

@ -1,7 +1,5 @@
#include "physics.hh"
#include <vector>
btDynamicsWorld* world; //contains physical attributes of the world.
btDispatcher* dispatcher; //
@ -12,8 +10,16 @@ btConstraintSolver* solver; //solver for forces and impulses.
std::vector<btRigidBody*> bodies; //list of all bodies. bodies are also in world, but save again to ease cleaning up process.
btRigidBody* playerBall;
btRigidBody* terrainBody;
btRigidBody* staticGroundBody;
void init()
Physics::Physics() {
}
Physics::~Physics() {
}
void Physics::init()
{
colConfig = new btDefaultCollisionConfiguration();
dispatcher = new btCollisionDispatcher(colConfig);
@ -21,17 +27,15 @@ void init()
solver = new btSequentialImpulseConstraintSolver();
world = new btDiscreteDynamicsWorld(dispatcher,broadphase,solver,colConfig);
world->setGravity(btVector3(0,-10,-0));
world->setGravity(btVector3(0,-10,-0));
}
void takeUpdateStep(float timeDiff)
void Physics::takeUpdateStep(float timeDiff)
{
world->stepSimulation(timeDiff);
}
void addTerrain(int width, int length, float** heightData)
void Physics::addTerrain(int width, int length, float** heightData)
{
float* heightfield = new float[width * length];
int highest = -999999, j = 0, i = 0;
@ -70,14 +74,52 @@ void addTerrain(int width, int length, float** heightData)
}
void addSphere(float rad, float x, float y, float z, float mass, int indice) //TODO add indice check
void Physics::addStaticGroundPlane()
{
btCollisionShape* groundShape = new btStaticPlaneShape(btVector3(0, 1, 0), 0);
btDefaultMotionState* groundMotionState = new btDefaultMotionState(btTransform(btQuaternion(0, 0, 0, 1), btVector3(0, 0, 0)));
btRigidBody::btRigidBodyConstructionInfo groundRigidBodyCI(0, groundMotionState, groundShape, btVector3(0, 0, 0));
staticGroundBody = new btRigidBody(groundRigidBodyCI);
world->addRigidBody(staticGroundBody);
}
void Physics::addPlayer(float rad, float x, float y, float z, float mass, unsigned indice)
{
if(bodies.size() != indice)
throw std::invalid_argument( "Bodies out of Sync" );
btSphereShape* sphere = new btSphereShape(rad);
btVector3 inertia(0,0,0);
if(mass == 0.0)
if(mass != 0.0)
{
sphere->calculateLocalInertia((btScalar)mass,inertia);
}
else
btDefaultMotionState* motion = new btDefaultMotionState(btTransform(btQuaternion(0,0,0,1),btVector3(x,y,z)));
btRigidBody::btRigidBodyConstructionInfo info(mass,motion,sphere,inertia);
playerBall = new btRigidBody(info);
world->addRigidBody(playerBall);
bodies.push_back(playerBall);
if(bodies.size() == indice)
throw std::invalid_argument( "Bodies out of Sync" );
}
void Physics::addSphere(float rad, float x, float y, float z, float mass, unsigned indice)
{
if(bodies.size() != indice)
throw std::invalid_argument( "Bodies out of Sync" );
btSphereShape* sphere = new btSphereShape(rad);
btVector3 inertia(0,0,0);
if(mass != 0.0)
{
sphere->calculateLocalInertia((btScalar)mass,inertia);
}
@ -91,23 +133,41 @@ void addSphere(float rad, float x, float y, float z, float mass, int indice) //T
world->addRigidBody(body);
bodies.push_back(body);
if(bodies.size() == indice)
throw std::invalid_argument( "Bodies out of Sync" );
}
glm::vec3 getPos(int i)
glm::vec3 Physics::getPos(int i)
{
btVector3 origin = bodies[i]->getCenterOfMassPosition();
glm::vec3 save(origin.getX(),origin.getY(),origin.getZ());
return save;
}
void getRotation(int i)
glm::mat4 Physics::getRotation(int i)
{
btQuaternion rotQuantrino = bodies[i]->getOrientation(); //TODO return orientation in gl format
btQuaternion quat = bodies[i]->getOrientation();
glm::mat4 matrix = glm::rotate(
quat.getAngle(),
glm::vec3(quat.getAxis().getX(), quat.getAxis().getY(), quat.getAxis().getZ())
);
return matrix;
}
void rollForward()
void Physics::rollForward(glm::vec3 camPos)
{
//bodies[k].applyTorque(btVector3);
btVector3 pos(camPos.x,camPos.y,camPos.z);
pos -= playerBody->getCenterOfMassPosition();
pos.cross(btVector3(0,1,0));
playerBall->applyTorque(pos);
/* glm::vec3 saveVector= glm::vec3(1,0,0) * rotCamera;
saveVector = glm::cross(glm::vec3(0,1,0),saveVector);
playerBall->applyTorque(btVector3(saveVector[0],saveVector[1],saveVector[2]));*/
}
/*

View File

@ -11,6 +11,7 @@
#include "extern/bullet/src/BulletCollision/CollisionShapes/btSphereShape.h"
#include "extern/bullet/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h"
#include "extern/bullet/src/BulletCollision/CollisionShapes/btStaticPlaneShape.h"
#include "extern/bullet/src/BulletDynamics/ConstraintSolver/btConstraintSolver.h"
#include "extern/bullet/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h"//YAY!
@ -26,24 +27,29 @@
#include "extern/bullet/src/LinearMath/btMotionState.h"
#include "extern/bullet/src/LinearMath/btDefaultMotionState.h"
#include "extern/bullet/src/LinearMath/btQuaternion.h"
#include "extern/bullet/src/LinearMath/btVector3.h"
#include "extern/bullet/src/LinearMath/btMatrix3x3.h"
class Physics {
public:
Physics();
Physics();
~Physics();
void init();
void takeUpdateStep(float timeDiff);
void rollForward(glm::vec3 camPos, float strength);
glm::vec3 getPos(int i);
void getRotation(int i);
void rollForward();
glm::mat4 getRotation(int i);
void rollForward(glm::vec3 camPos);
void addStaticGroundPlane();
void addTerrain(int width, int length, float** heightData);
void addSphere(float rad, float x, float y, float z, float mass, int indice);
void addPlayer(float rad, float x, float y, float z, float mass, unsigned indice);
void addSphere(float rad, float x, float y, float z, float mass, unsigned indice);
private:
btRigidBody* playerBody;
btRigidBody* terrainBody;
std::vector<btRigidBody*> bodies; //list of all bodies. bodies are also in world, but save again to ease cleaning up process.
btRigidBody* staticGroundBody;
btDynamicsWorld* world; //contains physical attributes of the world.

View File

@ -1,4 +1,5 @@
#include "terrain.hh"
#include "lodepng.h"
Terrain::Terrain(std::string filePath){
this->filePath = filePath;
@ -12,28 +13,21 @@ Terrain::~Terrain() {
void Terrain::load() {
this->filePath = "../Levels/LevelTest/terrain"; //TODO remove this, its only for testing
filePath = "../Levels/heightmapLvlTest.png"; //TODO remove this, its only for testing
std::ifstream terrain_png(this->filePath + "/heightmap.png");
unsigned int rowNum, columnNum, heightmapValue;
terrain_png.seekg(16); //skip part of the header
char temp[4];
terrain_png.read(temp, 4); //read width
this->heightmapWidth = (temp[3]<<0) | (temp[2]<<8) | (temp[1]<<16) | (temp[0]<<24); //convert from network to host byte order
terrain_png.read(temp, 4); //read height
this->heightmapHeight = (temp[3]<<0) | (temp[2]<<8) | (temp[1]<<16) | (temp[0]<<24); //convert from network to host byte order
heightmap = new float*[this->heightmapHeight]; //initialize the heightmap
for(rowNum = 0; rowNum < this->heightmapHeight; rowNum++){ //read in the heightmap
heightmap[rowNum] = new float[this->heightmapWidth];
for(columnNum = 0; columnNum < this->heightmapWidth; columnNum++){
terrain_png.read((char *)&heightmapValue, 1);
heightmap[rowNum][columnNum] = (float)heightmapValue / 256;
std::vector<unsigned char> image; //the raw pixels
unsigned error = lodepng::decode(image, heightmapWidth, heightmapHeight, filePath);
if (error) {
std::cout << "decoder error " << error << ": " << lodepng_error_text(error) << std::endl;
}
this->heightmap = new float*[this->heightmapHeight]; //initialize the heightmap
for(unsigned int rowNum = 0; rowNum < this->heightmapHeight; rowNum++){ //read in the heightmap
this->heightmap[rowNum] = new float[this->heightmapWidth];
for(unsigned int columnNum = 0; columnNum < this->heightmapWidth; columnNum++){
this->heightmap[rowNum][columnNum] = (float)(image[(rowNum*heightmapWidth+columnNum)*4]) / 32;
}
}
this->makeTriangleMesh();
heightmapChanged = false; //no need to make a TriangleMesh again before rendering
@ -42,56 +36,53 @@ void Terrain::load() {
void Terrain::makeTriangleMesh(){
ACGL::OpenGL::SharedArrayBuffer ab = std::make_shared<ACGL::OpenGL::ArrayBuffer>();
ab->defineAttribute("pos", GL_FLOAT, 3); //TODO: ArrayBuffer for the texture coordinates
// Do NOT change the order of this!
ab->defineAttribute("aPosition", GL_FLOAT, 3);
ab->defineAttribute("aTexCoord", GL_FLOAT, 2);
ab->defineAttribute("aNormal", GL_FLOAT, 3);
unsigned int rowNum=0, columnNum=0, dataCount=0; //initializing:
unsigned int rowNum=0, columnNum=0, dataCount=0, floatsPerVertex=8; //initializing:
bool movingRight = true, isUp = true;
int numVertices = (this->heightmapHeight - 1) * (this->heightmapWidth * 2 + 1) + 1;
float* abData = new float[numVertices * 3];
float* abData = new float[numVertices * floatsPerVertex];
while(rowNum < this->heightmapHeight){ //traversing the Triangle Strip!
abData[dataCount] = (float)rowNum;
abData[dataCount+1] = heightmap[rowNum][columnNum];
abData[dataCount+2] = (float)columnNum;
dataCount += 3;
while(rowNum < this->heightmapHeight){ //traversing the Triangle Strip!
set_abData(abData, dataCount, rowNum, columnNum);
dataCount += floatsPerVertex;
if (isUp){
rowNum = rowNum + 1;
isUp = false;
}else if (movingRight){
if (columnNum == this->heightmapWidth - 1){
abData[dataCount] = (float)rowNum;
abData[dataCount+1] = heightmap[rowNum][columnNum];
abData[dataCount+2] = (float)columnNum;
dataCount += 3;
abData[dataCount] = (float)rowNum;
abData[dataCount+1] = heightmap[rowNum][columnNum];
abData[dataCount+2] = (float)columnNum;
dataCount += 3;
movingRight = false;
rowNum = rowNum + 1;
} else{
rowNum = rowNum - 1;
columnNum = columnNum + 1;
isUp = true;
}
}else{
if (columnNum == 0){
abData[dataCount] = (float)rowNum;
abData[dataCount+1] = heightmap[rowNum][columnNum];
abData[dataCount+2] = (float)columnNum;
dataCount += 3;
abData[dataCount] = (float)rowNum;
abData[dataCount+1] = heightmap[rowNum][columnNum];
abData[dataCount+2] = (float)columnNum;
dataCount += 3;
movingRight = true;
rowNum = rowNum + 1;
}else{
rowNum = rowNum - 1;
columnNum = columnNum - 1;
isUp = true;
}
}
else if (movingRight) {
if (columnNum == this->heightmapWidth - 1) {
set_abData(abData, dataCount, rowNum, columnNum);
dataCount += floatsPerVertex;
set_abData(abData, dataCount, rowNum, columnNum);
dataCount += floatsPerVertex;
movingRight = false;
rowNum = rowNum + 1;
}
else {
rowNum = rowNum - 1;
columnNum = columnNum + 1;
isUp = true;
}
}
else {
if (columnNum == 0){
set_abData(abData, dataCount, rowNum, columnNum);
dataCount += floatsPerVertex;
set_abData(abData, dataCount, rowNum, columnNum);
dataCount += floatsPerVertex;
movingRight = true;
rowNum = rowNum + 1;
}
else {
rowNum = rowNum - 1;
columnNum = columnNum - 1;
isUp = true;
}
}
}
ab->setDataElements(numVertices, abData);
@ -99,39 +90,58 @@ void Terrain::makeTriangleMesh(){
this->triangleMesh->bind();
this->triangleMesh->setMode(GL_TRIANGLE_STRIP);
this->triangleMesh->attachAllAttributes(ab);
//TODO unbind?
}
//TODO remove this TestCode (that doesnt even work yet...):
/* ACGL::OpenGL::SharedArrayBuffer tex = std::make_shared<ACGL::OpenGL::ArrayBuffer>();
tex->defineAttribute("color", GL_FLOAT, 3);
float* texData = new float[numVertices*3];
for (int i=0; i<numVertices*3; i++){
texData[i] = 1.0;
void Terrain::set_abData(float* abData, unsigned int dataCount, unsigned int rowNum, unsigned int columnNum){
//set Position
abData[dataCount] = (float)rowNum;
abData[dataCount+1] = heightmap[rowNum][columnNum];
abData[dataCount+2] = (float)columnNum;
//set Texture Coordinate
abData[dataCount+3] = (float)(rowNum % 2);
abData[dataCount+4] = (float)(columnNum % 2);
//setNormal
if (rowNum==0 || rowNum==(this->heightmapHeight-1) || columnNum==0 || columnNum==(this->heightmapWidth-1)){
abData[dataCount+5] = 0.0;
abData[dataCount+6] = 1.0;
abData[dataCount+7] = 0.0;
}
else {
glm::vec3 sumNormals = glm::vec3(0.0f, 0.0f, 0.0f);
for (int i=-1; i<2; i+=2) {
for (int j=-1; j<2; j+=2) {
glm::vec3 vecA, vecB, normal;
vecA = glm::vec3((float)i, (heightmap[rowNum+i][columnNum] - heightmap[rowNum][columnNum]), 0.0f);
vecB = glm::vec3(0.0f, (heightmap[rowNum][columnNum+j] - heightmap[rowNum][columnNum]), (float)j);
normal = glm::normalize(glm::cross(vecA, vecB));
if(i+j!=0)
normal = normal*(-1.0f);
sumNormals += normal;
}
}
sumNormals = glm::normalize(sumNormals);
abData[dataCount+5] = sumNormals[0];
abData[dataCount+6] = sumNormals[1];
abData[dataCount+7] = sumNormals[2];
}
tex->setDataElements(numVertices, texData);
this->triangleMesh->attachAllAttributes(tex);
*/
}
void Terrain::render() {
if (heightmapChanged)
this->makeTriangleMesh();
this->triangleMesh->render();
Model Terrain::getModel(){
return Model(this->triangleMesh);
}
float** Terrain::getHeightmap(){
return this->heightmap;
}
unsigned int Terrain::getHeightmapHeight(){
return this->heightmapHeight;
}
unsigned int Terrain::getHeightmapWidth(){
return this->heightmapWidth;
}

View File

@ -3,9 +3,8 @@
#include <string>
#include "material.hh"
#include <fstream>
#include <ACGL/OpenGL/Objects/VertexArrayObject.hh>
#include "model.hh"
class Terrain {
public:
Terrain(std::string filePath);
@ -13,15 +12,21 @@ class Terrain {
~Terrain();
void load();
void render();
Model getModel();
float** getHeightmap();
unsigned int getHeightmapHeight();
unsigned int getHeightmapWidth();
private:
Material material;
std::string filePath;
unsigned int heightmapWidth, heightmapHeight;
unsigned int heightmapHeight, heightmapWidth;
float** heightmap; //can be accessed like 'float[][]'
bool heightmapChanged;
ACGL::OpenGL::SharedVertexArrayObject triangleMesh;
void makeTriangleMesh();
void set_abData(float* abData, unsigned int dataCount, unsigned int rowNum, unsigned int columnNum);
};
#endif