fish, randomness to bubbles

This commit is contained in:
Damian 2022-01-21 23:45:54 +01:00
parent c5e01c780d
commit a860dc57e0
13 changed files with 9839 additions and 97 deletions

7574
cw 6/models/fish_golden.obj Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,998 @@
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# File Created: 01.02.2012 21:08:47
mtllib TropicalFish02.mtl
#
# object TropicalFish02
#
v 6.0172 -75.1472 -46.7195
v 6.0172 -59.9777 -73.6814
v 36.9874 -65.6639 -39.5424
v 6.0172 -82.9360 -21.6019
v 43.4478 -63.5232 12.8540
v 6.0172 -90.2446 11.3080
v 6.0172 -98.2908 63.3794
v 49.9083 -65.9390 62.1893
v 49.9084 -65.4152 97.0694
v 6.0172 -99.7258 77.4784
v 40.3507 -65.6858 139.8604
v 31.3102 -67.1529 168.7699
v 7.6519 -90.7660 167.9076
v 6.0172 -98.1191 143.3166
v 7.9648 -36.3958 -116.0731
v 32.1950 -44.9788 -60.2134
v 51.6753 -39.0902 12.0569
v 59.3592 -41.6854 60.8001
v 59.3592 -41.1793 93.8039
v 47.9917 -41.2973 143.7883
v 31.3102 -40.7174 169.6537
v 13.4679 -15.7087 -116.3051
v 29.2617 -12.4551 -75.3595
v 46.9672 -11.0595 8.7491
v 53.9510 -9.6639 56.8000
v 53.9510 -10.7332 88.3090
v 43.6192 -13.5328 140.1907
v 31.3103 -14.6750 177.4997
v 10.7163 -5.4365 -116.2362
v 17.4853 11.5403 -73.5097
v 27.4544 26.7737 7.8535
v 31.0168 35.0141 51.7723
v 31.0168 35.2731 74.3114
v 26.0306 25.0969 134.5251
v 22.6444 11.4864 180.7124
v -6.0172 -75.1472 -46.7195
v -6.0172 -82.9360 -21.6019
v -36.9874 -65.6639 -39.5424
v -6.0172 -59.9777 -73.6814
v -6.0172 -90.2446 11.3080
v -43.4479 -63.5232 12.8540
v -6.0172 -98.2908 63.3794
v -6.0172 -99.7258 77.4784
v -49.9084 -65.4152 97.0694
v -49.9084 -65.9390 62.1893
v -7.6520 -90.7660 167.9076
v -31.3103 -67.1529 168.7697
v -40.3507 -65.6858 139.8604
v -6.0172 -98.1191 143.3166
v -32.1950 -44.9788 -60.2133
v -7.9648 -36.3958 -116.0731
v -51.6753 -39.0902 12.0569
v -59.3592 -41.1793 93.8039
v -59.3592 -41.6854 60.8001
v -31.3103 -40.7173 169.6536
v -47.9917 -41.2973 143.7883
v -29.2617 -12.4551 -75.3595
v -13.4679 -15.7087 -116.3051
v -46.9673 -11.0595 8.7491
v -53.9511 -10.7332 88.3090
v -53.9511 -9.6639 56.8001
v -31.3103 -14.6750 177.4995
v -43.6192 -13.5328 140.1907
v -17.4854 11.5403 -73.5096
v -10.7164 -5.4365 -116.2362
v -27.4545 26.7737 7.8535
v -31.0168 35.2731 74.3114
v -31.0168 35.0141 51.7723
v -22.6444 11.4864 180.7123
v -26.0306 25.0969 134.5251
v 1.3135 -89.0704 -45.5206
v 1.3135 -100.9826 -14.7777
v -1.3135 -100.9826 -14.7777
v -1.3135 -89.0704 -45.5206
v 1.3135 -104.6047 12.2222
v -1.3135 -104.6047 12.2222
v 6.0172 -57.7496 212.6512
v 6.0172 -39.7029 228.4171
v -6.0172 -39.7029 228.4171
v -6.0172 -57.7496 212.6512
v 6.0172 -35.1962 220.8212
v -6.0172 -35.1962 220.8212
v 6.0172 -26.1890 228.4124
v -6.0172 -26.1890 228.4124
v 6.0172 -19.9145 226.1837
v -6.0172 -19.9145 226.1837
v 6.7554 10.1474 205.9520
v -6.7554 10.1474 205.9520
v -6.0172 -11.6759 221.9908
v 6.0172 -11.6759 221.9908
v 1.3135 113.0480 55.6884
v -1.3135 113.0480 55.6884
v -1.3135 115.0469 67.5806
v 1.3135 115.0469 67.5806
v 1.3134 77.1939 -85.1725
v 1.3134 52.0269 -122.4417
v -1.3135 52.0269 -122.4417
v -1.3135 77.1939 -85.1725
v 2.8554 5.8814 -226.7737
v -2.8555 5.8814 -226.7737
v -2.8555 36.8881 -228.4171
v 2.8554 36.8881 -228.4171
v 2.7494 -20.3599 -213.1961
v 3.5371 -62.7374 -195.9473
v -3.5371 -62.7374 -195.9473
v -2.7495 -20.3599 -213.1961
v 1.3135 -48.9620 -102.7154
v 1.3135 -72.7358 -72.4826
v -1.3135 -72.7358 -72.4826
v -1.3135 -48.9620 -102.7154
v 18.3832 -57.6856 193.0014
v 6.7554 -78.3028 191.3210
v 18.3832 -40.6590 193.9853
v 18.3832 -17.5957 200.6208
v 12.5693 -2.9718 206.7232
v -18.3833 -57.6856 193.0014
v -6.7554 -78.3028 191.3210
v -18.3833 -40.6590 193.9853
v -18.3833 -17.5957 200.6208
v -12.5694 -2.9718 206.7232
v 7.6519 45.1332 177.0904
v -7.6520 45.1332 177.0904
v 6.0172 75.7111 120.6051
v -6.0172 75.7111 120.6051
v 49.9083 -64.8914 115.3282
v 6.0172 -103.8645 117.7621
v 59.3592 -40.6732 118.2389
v 53.9510 -11.8026 110.1319
v 31.0168 35.5322 96.8504
v 6.0172 71.5370 87.9646
v -49.9084 -64.8914 115.3282
v -6.0172 -103.8645 117.7621
v -59.3592 -40.6732 118.2389
v -53.9511 -11.8026 110.1319
v -31.0168 35.5322 96.8504
v 1.3135 115.2511 39.9591
v -1.3135 115.2511 39.9591
v 6.0172 -33.1381 -134.6484
v 8.7810 -18.5511 -134.5891
v -6.0172 -33.1381 -134.6484
v -8.7810 -18.5511 -134.5891
v -7.3991 -8.3235 -139.2291
v 1.3134 30.4873 -141.3355
v -1.3135 30.4873 -141.3355
v 7.3991 -8.3235 -139.2291
v 6.0172 7.1539 -148.8878
v 7.9648 21.0334 -116.0156
v 5.0172 -39.1648 -149.3619
v 7.5508 -18.2114 -157.6347
v -5.0172 -39.1648 -149.3619
v -7.5509 -18.2114 -157.6347
v -6.2840 -2.9793 -165.6344
v -6.0172 7.1539 -148.8878
v 5.0172 14.2981 -165.4855
v -5.0172 14.2981 -165.4855
v 6.2840 -2.9793 -165.6344
v 5.0172 -48.3442 -163.6537
v 5.0172 -23.3902 -177.5662
v -5.0172 -48.3442 -163.6537
v -5.0172 -23.3902 -177.5662
v -5.0172 1.7520 -182.3091
v 5.0172 21.7387 -180.3687
v -5.0172 21.7387 -180.3687
v 5.0172 1.7520 -182.3091
v 5.0172 -61.1253 -186.4048
v 3.5371 -23.7631 -194.9602
v -5.0172 -61.1253 -186.4048
v -3.5371 -23.7631 -194.9602
v -2.7495 0.6129 -208.3430
v 2.7494 37.2705 -210.0500
v -2.7495 37.2705 -210.0500
v 2.7494 0.6129 -208.3430
v 6.0172 40.4353 -74.0073
v 6.0172 60.3715 -1.8361
v 6.0172 69.5124 46.9827
v 6.0172 70.5247 67.4736
v -6.0172 40.4353 -74.0073
v -7.9648 21.0334 -116.0156
v -6.0172 69.5124 46.9827
v -6.0172 60.3715 -1.8361
v -6.0172 71.5370 87.9646
v -6.0172 70.5247 67.4736
v 1.7386 26.1690 -118.6910
v 1.3135 49.3010 -77.0151
v 1.3135 14.4347 -148.8306
v -1.3135 14.4347 -148.8306
v -1.7387 26.1690 -118.6910
v -1.3135 49.3010 -77.0151
v -1.3135 69.5452 -5.2606
v -1.3135 81.5598 61.2879
v -1.3135 80.0960 46.0940
v -1.3135 86.3433 103.2879
v -1.3135 83.0236 76.4817
v 1.3135 86.3433 103.2879
v 1.3135 83.0236 76.4817
v 1.3135 81.5598 61.2879
v 1.3135 69.5452 -5.2606
v 1.3135 80.0960 46.0940
v 1.3135 101.1456 -30.6230
v 1.3135 117.4541 24.2298
v -1.3135 101.1456 -30.6230
v -1.3135 117.4541 24.2298
v 1.3135 -99.7619 40.6205
v -1.3135 -99.7619 40.6205
v 82.3104 -63.4694 41.0977
v 80.9163 -66.4879 38.6554
v 71.6874 -66.3946 52.9195
v 72.7061 -63.6694 51.4673
v -71.6873 -66.3946 52.9195
v -80.9163 -66.4879 38.6554
v -82.3104 -63.4694 41.0977
v -72.7061 -63.6694 51.4673
v -3.3902 -117.4541 65.1725
v 3.3902 -117.4541 65.1725
v 3.3902 -115.3253 58.4671
v -3.3902 -115.3253 58.4671
v 1.3135 -108.7924 98.6662
v 1.3135 -102.4866 73.6627
v -1.3135 -108.7924 98.6662
v -1.3135 -102.4866 73.6627
v 1.3135 -112.2595 83.3161
v 1.3135 -107.0674 64.9616
v -1.3135 -112.2595 83.3161
v -1.3135 -107.0674 64.9616
v 63.7826 -58.7663 106.2027
v 66.4442 -52.3181 108.0348
v 60.7116 -58.8936 96.2096
v 63.2197 -52.4308 94.0925
v -63.7827 -58.7663 106.2027
v -60.7117 -58.8936 96.2096
v -66.4443 -52.3181 108.0348
v -63.2197 -52.4308 94.0925
v 77.4168 -62.8878 80.9955
v 79.0386 -59.8692 83.4378
v 68.9540 -62.7944 70.9632
v 70.1483 -60.0693 69.5110
v -77.4168 -62.8878 80.9955
v -68.9540 -62.7944 70.9632
v -79.0386 -59.8692 83.4378
v -70.1483 -60.0693 69.5110
# 240 vertices
vn -0.2878 -0.7173 0.6346
vn -0.3267 -0.7689 0.5495
vn -0.3148 -0.7556 0.5745
vn -0.1230 -0.7776 0.6166
vn -0.1245 -0.7894 0.6011
vn -0.0909 -0.7995 0.5938
vn -0.0602 -0.3508 0.9345
vn -0.0613 -0.7919 0.6076
vn -0.0908 -0.6659 0.7405
vn -0.1981 -0.5587 0.8054
vn 0.3129 -0.8059 0.5026
vn 0.3640 -0.8510 0.3785
vn 0.3410 -0.3643 0.8666
vn 0.2315 -0.3529 0.9066
vn -0.4123 -0.6202 0.6673
vn -0.4212 -0.8632 0.2785
vn -0.1717 -0.9824 0.0732
vn -0.0714 -0.9917 0.1068
vn -0.1449 -0.9852 -0.0916
vn 0.4301 -0.8973 0.0999
vn 0.4748 -0.8720 0.1190
vn -0.2786 -0.9604 0.0044
vn -0.3074 -0.9341 -0.1813
vn -0.1760 -0.9388 -0.2962
vn -0.0692 -0.9494 -0.3062
vn 0.0121 -0.9487 -0.3160
vn 0.2998 -0.9067 -0.2966
vn 0.4317 -0.8977 -0.0883
vn -0.2164 -0.9568 -0.1944
vn -0.1997 -0.9039 -0.3782
vn -0.1647 -0.8694 -0.4660
vn -0.0743 -0.8572 -0.5095
vn -0.0041 -0.8588 -0.5122
vn 0.2221 -0.8749 -0.4303
vn 0.3708 -0.8606 -0.3491
vn -0.2899 0.7132 0.6382
vn -0.1332 0.7732 0.6200
vn -0.3148 0.7556 0.5745
vn -0.3705 0.7412 0.5598
vn -0.0845 0.8027 0.5903
vn -0.1245 0.7894 0.6011
vn -0.0602 0.3508 0.9345
vn -0.1673 0.5246 0.8348
vn -0.1084 0.6552 0.7476
vn -0.0613 0.7919 0.6076
vn 0.3410 0.3643 0.8666
vn 0.3640 0.8510 0.3785
vn 0.3129 0.8059 0.5026
vn 0.2315 0.3529 0.9066
vn -0.4212 0.8632 0.2785
vn -0.4149 0.6212 0.6648
vn -0.1717 0.9824 0.0732
vn -0.1144 0.9917 -0.0582
vn -0.0714 0.9917 0.1068
vn 0.4748 0.8720 0.1190
vn 0.4301 0.8973 0.0999
vn -0.3074 0.9341 -0.1813
vn -0.2849 0.9585 0.0110
vn -0.1760 0.9388 -0.2962
vn 0.0121 0.9487 -0.3160
vn -0.0692 0.9494 -0.3062
vn 0.4317 0.8977 -0.0883
vn 0.2998 0.9067 -0.2966
vn -0.1997 0.9039 -0.3782
vn -0.2164 0.9568 -0.1944
vn -0.1647 0.8694 -0.4660
vn -0.0041 0.8588 -0.5122
vn -0.0743 0.8572 -0.5095
vn 0.3708 0.8606 -0.3491
vn 0.2221 0.8749 -0.4303
vn -0.3620 -0.5505 0.7523
vn -0.1942 -0.5791 0.7918
vn -0.2034 0.5733 0.7937
vn -0.3564 0.5568 0.7503
vn 0.0106 -0.5644 0.8254
vn 0.0154 0.5616 0.8273
vn 0.6653 -0.4137 0.6215
vn 0.8629 -0.4821 -0.1516
vn 0.8629 0.4821 -0.1516
vn 0.6653 0.4137 0.6215
vn 0.6134 -0.7870 -0.0670
vn 0.6134 0.7870 -0.0670
vn 0.8605 -0.4835 0.1607
vn 0.8605 0.4835 0.1607
vn 0.7961 -0.5043 -0.3345
vn 0.7961 0.5043 -0.3345
vn 0.7215 -0.4237 -0.5476
vn 0.7215 0.4237 -0.5476
vn 0.6676 0.6267 -0.4019
vn 0.6676 -0.6267 -0.4019
vn -0.0092 -0.7430 -0.6692
vn -0.0092 0.7430 -0.6692
vn 0.1970 0.6255 -0.7549
vn 0.1970 -0.6255 -0.7549
vn -0.3506 -0.6874 -0.6360
vn -0.4852 -0.6753 -0.5554
vn -0.4886 0.6730 -0.5553
vn -0.3495 0.6868 -0.6373
vn -0.7206 -0.6648 0.1967
vn -0.7206 0.6648 0.1967
vn -0.5976 0.5775 -0.5562
vn -0.5976 -0.5775 -0.5562
vn -0.6489 -0.7053 0.2855
vn -0.4316 -0.5545 0.7115
vn -0.4325 0.5411 0.7212
vn -0.6516 0.7043 0.2817
vn -0.6359 -0.1059 0.7645
vn -0.4684 -0.5225 0.7125
vn -0.4741 0.5311 0.7022
vn -0.5601 0.3080 0.7690
vn 0.4922 -0.8356 0.2439
vn 0.5708 -0.3685 0.7337
vn 0.4506 -0.8897 0.0739
vn 0.4532 -0.8911 -0.0243
vn 0.4994 -0.8213 -0.2757
vn 0.4922 0.8356 0.2439
vn 0.5708 0.3685 0.7337
vn 0.4506 0.8897 0.0739
vn 0.4532 0.8911 -0.0243
vn 0.4994 0.8213 -0.2757
vn 0.5339 -0.4837 -0.6936
vn 0.5339 0.4837 -0.6936
vn 0.3246 -0.5559 -0.7653
vn 0.3246 0.5559 -0.7653
vn 0.2397 -0.7142 0.6577
vn 0.1360 -0.3958 0.9082
vn 0.3330 -0.9413 -0.0559
vn 0.1636 -0.9304 -0.3281
vn 0.0819 -0.8704 -0.4855
vn -0.0407 -0.8854 -0.4630
vn 0.2506 0.7045 0.6640
vn 0.1326 0.3956 0.9088
vn 0.3229 0.9448 -0.0559
vn 0.1636 0.9304 -0.3281
vn 0.0819 0.8704 -0.4855
vn 0.0981 -0.7071 -0.7003
vn 0.0981 0.7071 -0.7003
vn -0.0011 -0.6866 0.7270
vn -0.1530 -0.9860 0.0660
vn -0.0036 0.7020 0.7122
vn -0.1464 0.9856 0.0844
vn -0.1100 0.9919 -0.0636
vn -0.6218 -0.6700 -0.4055
vn -0.6218 0.6700 -0.4055
vn -0.1100 -0.9919 -0.0636
vn -0.1764 -0.8908 -0.4187
vn -0.2212 -0.8763 -0.4279
vn 0.3141 -0.6751 0.6675
vn -0.0634 -0.9978 0.0175
vn 0.2910 0.6938 0.6588
vn -0.0687 0.9968 0.0415
vn -0.0611 0.9971 -0.0444
vn -0.1694 0.8885 -0.4264
vn 0.2747 -0.6948 -0.6647
vn 0.2747 0.6948 -0.6647
vn -0.0611 -0.9971 -0.0444
vn 0.3562 -0.6899 0.6301
vn -0.0853 -0.9963 0.0122
vn 0.3578 0.7059 0.6113
vn -0.0822 0.9959 0.0375
vn -0.0692 0.9976 -0.0062
vn 0.2844 -0.7236 -0.6289
vn 0.2844 0.7236 -0.6289
vn -0.0692 -0.9976 -0.0062
vn 0.1847 -0.6975 0.6924
vn -0.0702 -0.9975 -0.0011
vn 0.1996 0.6954 0.6904
vn -0.0567 0.9984 -0.0047
vn -0.0380 0.9993 0.0016
vn 0.1610 -0.6486 -0.7439
vn 0.1610 0.6486 -0.7439
vn -0.0380 -0.9993 0.0016
vn -0.1625 -0.8968 -0.4115
vn -0.1191 -0.8744 -0.4703
vn -0.0608 -0.8710 -0.4875
vn -0.0250 -0.8770 -0.4798
vn -0.1440 0.9014 -0.4083
vn -0.2434 0.8781 -0.4119
vn -0.0608 0.8710 -0.4875
vn -0.1191 0.8744 -0.4703
vn -0.0407 0.8854 -0.4630
vn -0.0250 0.8770 -0.4798
vn -0.1591 -0.9113 -0.3799
vn -0.0785 -0.9765 -0.2007
vn -0.8222 -0.4530 -0.3447
vn -0.8135 0.4692 -0.3435
vn -0.1900 0.9102 -0.3681
vn -0.0684 0.9748 -0.2124
vn -0.0522 0.9759 -0.2121
vn -0.0150 0.9805 -0.1958
vn -0.0282 0.9795 -0.1996
vn 0.3586 0.6083 -0.7081
vn -0.0155 0.9827 -0.1848
vn 0.3586 -0.6083 -0.7081
vn -0.0155 -0.9827 -0.1848
vn -0.0150 -0.9805 -0.1958
vn -0.0522 -0.9759 -0.2121
vn -0.0282 -0.9795 -0.1996
vn -0.2480 -0.6933 -0.6766
vn -0.0561 -0.6623 -0.7472
vn -0.2480 0.6933 -0.6766
vn -0.0561 0.6623 -0.7472
vn 0.0222 -0.4115 0.9111
vn 0.0222 0.4115 0.9111
vn -0.5882 -0.6085 -0.5327
vn -0.9360 -0.1013 0.3370
vn -0.2313 0.7167 0.6579
vn -0.4729 0.7125 -0.5183
vn -0.1547 -0.6465 0.7471
vn -0.9301 0.0832 0.3578
vn -0.5664 0.6130 -0.5508
vn -0.4434 -0.6697 -0.5958
vn -0.0699 -0.7917 -0.6069
vn -0.0693 0.7862 -0.6141
vn 0.7274 0.6663 -0.1642
vn 0.7250 -0.6690 -0.1637
vn 0.1115 -0.4686 0.8763
vn -0.5086 -0.6734 -0.5365
vn 0.0982 0.5330 0.8404
vn -0.4870 0.6856 -0.5412
vn 0.1437 -0.7144 0.6848
vn -0.5522 -0.7387 -0.3866
vn 0.1433 0.7144 0.6849
vn -0.5529 0.7397 -0.3836
vn 0.4128 -0.5440 0.7305
vn 0.4645 -0.8850 -0.0301
vn -0.4842 0.1169 0.8671
vn -0.7610 -0.1448 -0.6323
vn 0.3848 0.5685 0.7272
vn -0.5844 -0.1785 0.7916
vn 0.3919 0.9104 -0.1324
vn -0.7297 0.0838 -0.6786
vn 0.2106 -0.4222 0.8817
vn 0.2541 -0.9397 -0.2291
vn -0.1018 0.8281 0.5513
vn -0.2426 0.5133 -0.8232
vn 0.1896 0.4166 0.8891
vn -0.1425 -0.7916 0.5942
vn 0.2154 0.9380 -0.2717
vn -0.2816 -0.4540 -0.8454
# 240 vertex normals
vt 0.3731 0.2968 0.4635
vt 0.3209 0.3257 0.4635
vt 0.3870 0.3149 0.2755
vt 0.4217 0.2819 0.4635
vt 0.4885 0.3189 0.2363
vt 0.4855 0.2680 0.4635
vt 0.5864 0.2527 0.4635
vt 0.5841 0.3143 0.1971
vt 0.6516 0.3153 0.1971
vt 0.6137 0.2499 0.4635
vt 0.7345 0.3148 0.2551
vt 0.7905 0.3120 0.3100
vt 0.7889 0.2670 0.4536
vt 0.7412 0.2530 0.4635
vt 0.2405 0.3759 0.4517
vt 0.3469 0.3543 0.3046
vt 0.4869 0.3655 0.1864
vt 0.5814 0.3606 0.1398
vt 0.6453 0.3615 0.1398
vt 0.7421 0.3613 0.2088
vt 0.7922 0.3624 0.3100
vt 0.2383 0.4101 0.4183
vt 0.3176 0.4163 0.3224
vt 0.4805 0.4190 0.2150
vt 0.5736 0.4216 0.1726
vt 0.6347 0.4196 0.1726
vt 0.7352 0.4142 0.2353
vt 0.8074 0.4121 0.3100
vt 0.2384 0.4297 0.4350
vt 0.3212 0.4620 0.3939
vt 0.4788 0.4911 0.3334
vt 0.5639 0.5068 0.3118
vt 0.6075 0.5073 0.3118
vt 0.7242 0.4879 0.3420
vt 0.8137 0.4619 0.3626
vt 0.3731 0.2968 0.5365
vt 0.4217 0.2819 0.5365
vt 0.3870 0.3149 0.7245
vt 0.3209 0.3257 0.5365
vt 0.4855 0.2680 0.5365
vt 0.4885 0.3189 0.7637
vt 0.5864 0.2527 0.5365
vt 0.6137 0.2499 0.5365
vt 0.6516 0.3153 0.8029
vt 0.5841 0.3143 0.8029
vt 0.7889 0.2670 0.5464
vt 0.7905 0.3120 0.6900
vt 0.7345 0.3148 0.7449
vt 0.7412 0.2530 0.5365
vt 0.3469 0.3543 0.6954
vt 0.2405 0.3759 0.5483
vt 0.4869 0.3655 0.8136
vt 0.6453 0.3615 0.8602
vt 0.5814 0.3606 0.8602
vt 0.7922 0.3624 0.6900
vt 0.7421 0.3613 0.7912
vt 0.3176 0.4163 0.6776
vt 0.2383 0.4101 0.5817
vt 0.4805 0.4190 0.7850
vt 0.6347 0.4196 0.8274
vt 0.5736 0.4216 0.8274
vt 0.8074 0.4121 0.6900
vt 0.7352 0.4142 0.7647
vt 0.3212 0.4620 0.6061
vt 0.2384 0.4297 0.5650
vt 0.4788 0.4911 0.6666
vt 0.6075 0.5073 0.6882
vt 0.5639 0.5068 0.6882
vt 0.8137 0.4619 0.6374
vt 0.7242 0.4879 0.6580
vt 0.3754 0.2702 0.4920
vt 0.4350 0.2475 0.4920
vt 0.4350 0.2475 0.5080
vt 0.3754 0.2702 0.5080
vt 0.4873 0.2406 0.4920
vt 0.4873 0.2406 0.5080
vt 0.8013 0.2494 0.5464
vt 0.7537 0.2354 0.5365
vt 0.8755 0.3300 0.4635
vt 0.9050 0.3674 0.4635
vt 0.9132 0.3681 0.5365
vt 0.8980 0.3149 0.5365
vt 0.8914 0.3729 0.4635
vt 0.8914 0.3729 0.5365
vt 0.9050 0.3674 0.5365
vt 0.9038 0.3929 0.4635
vt 0.9038 0.3929 0.5365
vt 0.9018 0.4021 0.4635
vt 0.9018 0.4021 0.5365
vt 0.8823 0.4808 0.4590
vt 0.8634 0.4611 0.5410
vt 0.9011 0.4180 0.5365
vt 0.9199 0.4377 0.4635
vt 0.5696 0.6632 0.4920
vt 0.5696 0.6632 0.5080
vt 0.5926 0.6670 0.5080
vt 0.5926 0.6670 0.4920
vt 0.2938 0.5939 0.4920
vt 0.2235 0.5440 0.4920
vt 0.2235 0.5440 0.5080
vt 0.2938 0.5939 0.5080
vt 0.0313 0.4522 0.4827
vt 0.0313 0.4522 0.5173
vt 0.0211 0.5104 0.5173
vt 0.0211 0.5104 0.4827
vt 0.0506 0.4012 0.4833
vt 0.0805 0.3309 0.4785
vt 0.0805 0.3309 0.5215
vt 0.0506 0.4012 0.5167
vt 0.2646 0.3467 0.4920
vt 0.3232 0.3014 0.4920
vt 0.3232 0.3014 0.5080
vt 0.2646 0.3467 0.5080
vt 0.8375 0.3301 0.3884
vt 0.8342 0.2908 0.4590
vt 0.8394 0.3625 0.3884
vt 0.8522 0.4065 0.3884
vt 0.8641 0.4344 0.4237
vt 0.8634 0.4611 0.4590
vt 0.9011 0.4180 0.4635
vt 0.8755 0.3300 0.5365
vt 0.8375 0.3301 0.6116
vt 0.8342 0.2908 0.5410
vt 0.8394 0.3625 0.6116
vt 0.8522 0.4065 0.6116
vt 0.8641 0.4344 0.5763
vt 0.8467 0.2732 0.5410
vt 0.8276 0.5483 0.4536
vt 0.8088 0.5287 0.5464
vt 0.8088 0.5287 0.4536
vt 0.7122 0.5968 0.4635
vt 0.7007 0.5879 0.5365
vt 0.6870 0.3163 0.1971
vt 0.6917 0.2420 0.4635
vt 0.6926 0.3625 0.1398
vt 0.6769 0.4175 0.1726
vt 0.7007 0.5879 0.4635
vt 0.6512 0.5078 0.3118
vt 0.6306 0.5821 0.4635
vt 0.6870 0.3163 0.8029
vt 0.6917 0.2420 0.5365
vt 0.6926 0.3625 0.8602
vt 0.6769 0.4175 0.8274
vt 0.6512 0.5078 0.6882
vt 0.7042 0.2244 0.5365
vt 0.5391 0.6674 0.4920
vt 0.5391 0.6674 0.5080
vt 0.2036 0.3856 0.4635
vt 0.2029 0.4047 0.4467
vt 0.2036 0.3856 0.5365
vt 0.2029 0.4047 0.5533
vt 0.1939 0.4242 0.5449
vt 0.1898 0.4982 0.4920
vt 0.1898 0.4982 0.5080
vt 0.1939 0.4242 0.4551
vt 0.1752 0.4537 0.4635
vt 0.2388 0.4801 0.4517
vt 0.1725 0.3754 0.4696
vt 0.1582 0.4053 0.4542
vt 0.1725 0.3754 0.5304
vt 0.1582 0.4053 0.5458
vt 0.1427 0.4344 0.5381
vt 0.1752 0.4537 0.5365
vt 0.1430 0.4673 0.4696
vt 0.1430 0.4673 0.5304
vt 0.1427 0.4344 0.4619
vt 0.1422 0.3570 0.4696
vt 0.1196 0.3955 0.4696
vt 0.1422 0.3570 0.5304
vt 0.1196 0.3955 0.5304
vt 0.1104 0.4434 0.5304
vt 0.1142 0.4815 0.4696
vt 0.1142 0.4815 0.5304
vt 0.1104 0.4434 0.4696
vt 0.0990 0.3339 0.4696
vt 0.0859 0.3947 0.4785
vt 0.0990 0.3339 0.5304
vt 0.0859 0.3947 0.5215
vt 0.0600 0.4412 0.5167
vt 0.0567 0.5111 0.4833
vt 0.0567 0.5111 0.5167
vt 0.0600 0.4412 0.4833
vt 0.3154 0.5276 0.4635
vt 0.4562 0.5675 0.4635
vt 0.5512 0.5782 0.4635
vt 0.5909 0.5801 0.4635
vt 0.3154 0.5276 0.5365
vt 0.2388 0.4801 0.5483
vt 0.5512 0.5782 0.5365
vt 0.4562 0.5675 0.5365
vt 0.6306 0.5821 0.5365
vt 0.5909 0.5801 0.5365
vt 0.9185 0.4297 0.4635
vt 0.2337 0.4899 0.4894
vt 0.3096 0.5445 0.4920
vt 0.1753 0.4676 0.4920
vt 0.1753 0.4676 0.5080
vt 0.2337 0.4899 0.5106
vt 0.3096 0.5445 0.5080
vt 0.4496 0.5850 0.5080
vt 0.5789 0.6012 0.5080
vt 0.5495 0.5984 0.5080
vt 0.6637 0.6047 0.5080
vt 0.6084 0.6040 0.5080
vt 0.6564 0.6156 0.4920
vt 0.6637 0.6047 0.4920
vt 0.6084 0.6040 0.4920
vt 0.5789 0.6012 0.4920
vt 0.4496 0.5850 0.4920
vt 0.5495 0.5984 0.4920
vt 0.4024 0.6405 0.4920
vt 0.5086 0.6716 0.4920
vt 0.4024 0.6405 0.5080
vt 0.5086 0.6716 0.5080
vt 0.5423 0.2499 0.4920
vt 0.5423 0.2499 0.5080
vt 0.7839 0.1219 0.0005
vt 0.7839 0.1213 0.0090
vt 0.7896 0.1242 0.0650
vt 0.7896 0.1241 0.0588
vt 0.7896 0.1242 0.9350
vt 0.7839 0.1213 0.9910
vt 0.7839 0.1219 0.9995
vt 0.7896 0.1241 0.9412
vt 0.5898 0.2161 0.5206
vt 0.5898 0.2161 0.4794
vt 0.5768 0.2202 0.4794
vt 0.5768 0.2202 0.5206
vt 0.6547 0.2326 0.4920
vt 0.6063 0.2447 0.4920
vt 0.6547 0.2326 0.5080
vt 0.6063 0.2447 0.5080
vt 0.6250 0.2260 0.4920
vt 0.5894 0.2359 0.4920
vt 0.6250 0.2260 0.5080
vt 0.5894 0.2359 0.5080
vt 0.6693 0.3280 0.1129
vt 0.6729 0.3403 0.0968
vt 0.6500 0.3278 0.1316
vt 0.6459 0.3401 0.1164
vt 0.6693 0.3280 0.8871
vt 0.6500 0.3278 0.8684
vt 0.6729 0.3403 0.9032
vt 0.6459 0.3401 0.8836
vt 0.9098 0.1486 0.0968
vt 0.9066 0.1464 0.1129
vt 0.8329 0.1095 0.0302
vt 0.8323 0.1095 0.0204
vt 0.8930 0.1542 0.1316
vt 0.8272 0.1260 0.0816
vt 0.8912 0.1552 0.1164
vt 0.8275 0.1256 0.0743
vt 0.8930 0.1542 0.8684
vt 0.9066 0.1464 0.8871
vt 0.8329 0.1095 0.9698
vt 0.8272 0.1260 0.9184
vt 0.9098 0.1486 0.9032
vt 0.8323 0.1095 0.9796
vt 0.8912 0.1552 0.8836
vt 0.8275 0.1256 0.9257
# 260 texture coords
g TropicalFish02
usemtl 02___Default
s 1
f 1/1/1 2/2/2 3/3/3 4/4/4
f 4/4/4 3/3/3 5/5/5 6/6/6
f 7/7/7 8/8/8 9/9/9 10/10/10
f 11/11/11 12/12/12 13/13/13 14/14/14
f 2/2/2 15/15/15 16/16/16 3/3/3
f 3/3/3 16/16/16 17/17/17 5/5/5
f 8/8/8 18/18/18 19/19/19 9/9/9
f 11/11/11 20/20/20 21/21/21 12/12/12
f 15/15/15 22/22/22 23/23/23 16/16/16
f 23/23/23 24/24/24 17/17/17 16/16/16
f 18/18/18 25/25/25 26/26/26 19/19/19
f 20/20/20 27/27/27 28/28/28 21/21/21
f 29/29/29 30/30/30 23/23/23 22/22/22
f 23/23/23 30/30/30 31/31/31 24/24/24
f 25/25/25 32/32/32 33/33/33 26/26/26
f 27/27/27 34/34/34 35/35/35 28/28/28
f 36/36/36 37/37/37 38/38/38 39/39/39
f 37/37/37 40/40/40 41/41/41 38/38/38
f 42/42/42 43/43/43 44/44/44 45/45/45
f 46/46/46 47/47/47 48/48/48 49/49/49
f 39/39/39 38/38/38 50/50/50 51/51/51
f 38/38/38 41/41/41 52/52/52 50/50/50
f 45/45/45 44/44/44 53/53/53 54/54/54
f 48/48/48 47/47/47 55/55/55 56/56/56
f 51/51/51 50/50/50 57/57/57 58/58/58
f 52/52/52 59/59/59 57/57/57 50/50/50
f 54/54/54 53/53/53 60/60/60 61/61/61
f 56/56/56 55/55/55 62/62/62 63/63/63
f 57/57/57 64/64/64 65/65/65 58/58/58
f 57/57/57 59/59/59 66/66/66 64/64/64
f 61/61/61 60/60/60 67/67/67 68/68/68
f 63/63/63 62/62/62 69/69/69 70/70/70
f 71/71/71 72/72/72 73/73/73 74/74/74
f 75/75/75 76/76/76 73/73/73 72/72/72
f 10/10/10 43/43/43 42/42/42 7/7/7
f 13/13/13 46/77/46 49/78/49 14/14/14
f 77/79/77 78/80/78 79/81/79 80/82/80
f 78/80/78 81/83/81 82/84/82 79/85/79
f 81/83/81 83/86/83 84/87/84 82/84/82
f 85/88/85 86/89/86 84/87/84 83/86/83
f 87/90/87 88/91/88 89/92/89 90/93/90
f 91/94/91 92/95/92 93/96/93 94/97/94
f 95/98/95 96/99/96 97/100/97 98/101/98
f 99/102/99 100/103/100 101/104/101 102/105/102
f 103/106/103 104/107/104 105/108/105 106/109/106
f 107/110/107 108/111/108 109/112/109 110/113/110
f 108/111/108 71/71/71 74/74/74 109/112/109
f 111/114/111 78/80/78 77/79/77 112/115/112
f 81/83/81 78/80/78 111/114/111 113/116/113
f 114/117/114 83/86/83 81/83/81 113/116/113
f 85/88/85 115/118/115 87/119/87 90/120/90
f 80/121/80 79/85/79 116/122/116 117/123/117
f 116/122/116 79/85/79 82/84/82 118/124/118
f 82/84/82 84/87/84 119/125/119 118/124/118
f 84/87/84 86/89/86 120/126/120 119/125/119
f 77/79/77 80/82/80 117/127/117 112/115/112
f 121/128/121 122/129/122 88/91/88 87/90/87
f 12/12/12 111/114/111 112/115/112 13/13/13
f 113/116/113 111/114/111 12/12/12 21/21/21
f 114/117/114 113/116/113 21/21/21 28/28/28
f 87/119/87 115/118/115 35/35/35 121/130/121
f 117/123/117 116/122/116 47/47/47 46/46/46
f 47/47/47 116/122/116 118/124/118 55/55/55
f 55/55/55 118/124/118 119/125/119 62/62/62
f 119/125/119 120/126/120 69/69/69 62/62/62
f 112/115/112 117/127/117 46/77/46 13/13/13
f 123/131/123 124/132/124 122/129/122 121/128/121
f 125/133/125 11/11/11 14/14/14 126/134/126
f 127/135/127 20/20/20 11/11/11 125/133/125
f 128/136/128 27/27/27 20/20/20 127/135/127
f 123/137/123 34/34/34 129/138/129 130/139/130
f 49/49/49 48/48/48 131/140/131 132/141/132
f 48/48/48 56/56/56 133/142/133 131/140/131
f 56/56/56 63/63/63 134/143/134 133/142/133
f 134/143/134 63/63/63 70/70/70 135/144/135
f 14/14/14 49/78/49 132/145/132 126/134/126
f 136/146/136 137/147/137 92/95/92 91/94/91
f 22/22/22 15/15/15 138/148/138 139/149/139
f 15/15/15 51/51/51 140/150/140 138/148/138
f 51/51/51 58/58/58 141/151/141 140/150/140
f 58/58/58 65/65/65 142/152/142 141/151/141
f 97/100/97 96/99/96 143/153/143 144/154/144
f 29/29/29 145/155/145 146/156/146 147/157/147
f 139/149/139 138/148/138 148/158/148 149/159/149
f 138/148/138 140/150/140 150/160/150 148/158/148
f 140/150/140 141/151/141 151/161/151 150/160/150
f 142/152/142 152/162/152 151/161/151 141/151/141
f 153/163/153 146/156/146 154/164/154 155/165/155
f 146/156/146 145/155/145 156/166/156 154/164/154
f 149/159/149 148/158/148 157/167/157 158/168/158
f 148/158/148 150/160/150 159/169/159 157/167/157
f 150/160/150 151/161/151 160/170/160 159/169/159
f 152/162/152 161/171/161 160/170/160 151/161/151
f 155/165/155 154/164/154 162/172/162 163/173/163
f 154/164/154 156/166/156 164/174/164 162/172/162
f 158/168/158 157/167/157 165/175/165 166/176/166
f 157/167/157 159/169/159 167/177/167 165/175/165
f 159/169/159 160/170/160 168/178/168 167/177/167
f 161/171/161 169/179/169 168/178/168 160/170/160
f 163/173/163 162/172/162 170/180/170 171/181/171
f 162/172/162 164/174/164 172/182/172 170/180/170
f 166/176/166 165/175/165 104/107/104 103/106/103
f 165/175/165 167/177/167 105/108/105 104/107/104
f 167/177/167 168/178/168 106/109/106 105/108/105
f 169/179/169 100/103/100 106/109/106 168/178/168
f 171/181/171 170/180/170 102/105/102 101/104/101
f 170/180/170 172/182/172 99/102/99 102/105/102
f 147/157/147 173/183/173 30/30/30 29/29/29
f 173/183/173 174/184/174 31/31/31 30/30/30
f 32/32/32 175/185/175 176/186/176 33/33/33
f 34/34/34 123/137/123 121/130/121 35/35/35
f 64/64/64 177/187/177 178/188/178 65/65/65
f 68/68/68 179/189/179 180/190/180 66/66/66
f 181/191/181 182/192/182 67/67/67 135/144/135
f 122/129/122 124/132/124 70/70/70 69/69/69
f 90/93/90 89/92/89 86/89/86 85/193/85
f 103/106/103 106/109/106 100/103/100 99/102/99
f 83/86/83 114/117/114 115/118/115 85/88/85
f 88/91/88 120/126/120 86/89/86 89/92/89
f 114/117/114 28/28/28 35/35/35 115/118/115
f 88/91/88 122/129/122 69/69/69 120/126/120
f 34/34/34 27/27/27 128/136/128 129/138/129
f 124/132/124 181/191/181 135/144/135 70/70/70
f 65/65/65 178/188/178 153/163/153 142/152/142
f 22/22/22 139/149/139 145/155/145 29/29/29
f 153/163/153 155/165/155 152/162/152 142/152/142
f 145/155/145 139/149/139 149/159/149 156/166/156
f 155/165/155 163/173/163 161/171/161 152/162/152
f 156/166/156 149/159/149 158/168/158 164/174/164
f 163/173/163 171/181/171 169/179/169 161/171/161
f 164/174/164 158/168/158 166/176/166 172/182/172
f 171/181/171 101/104/101 100/103/100 169/179/169
f 172/182/172 166/176/166 103/106/103 99/102/99
f 173/183/173 147/157/147 183/194/183 184/195/184
f 147/157/147 146/156/146 185/196/185 183/194/183
f 146/156/146 153/163/153 186/197/186 185/196/185
f 153/163/153 178/188/178 187/198/187 186/197/186
f 178/188/178 177/187/177 188/199/188 187/198/187
f 180/190/180 189/200/189 188/199/188 177/187/177
f 179/189/179 182/192/182 190/201/190 191/202/191
f 181/191/181 124/132/124 192/203/192 193/204/193
f 124/132/124 123/131/123 194/205/194 192/203/192
f 194/206/194 123/137/123 130/139/130 195/207/195
f 176/186/176 196/208/196 195/207/195 130/139/130
f 174/184/174 197/209/197 198/210/198 175/185/175
f 196/208/196 136/146/136 91/94/91 195/207/195
f 197/209/197 199/211/199 200/212/200 198/210/198
f 184/195/184 183/194/183 96/99/96 95/98/95
f 183/194/183 185/196/185 143/153/143 96/99/96
f 185/196/185 186/197/186 144/154/144 143/153/143
f 144/154/144 186/197/186 187/198/187 97/100/97
f 187/198/187 188/199/188 98/101/98 97/100/97
f 188/199/188 189/200/189 201/213/201 98/101/98
f 191/202/191 190/201/190 137/147/137 202/214/202
f 202/214/202 200/212/200 199/211/199 201/213/201
f 8/8/8 7/7/7 6/6/6 5/5/5
f 18/18/18 8/8/8 5/5/5 17/17/17
f 24/24/24 25/25/25 18/18/18 17/17/17
f 32/32/32 25/25/25 24/24/24 31/31/31
f 40/40/40 42/42/42 45/45/45 41/41/41
f 41/41/41 45/45/45 54/54/54 52/52/52
f 54/54/54 61/61/61 59/59/59 52/52/52
f 59/59/59 61/61/61 68/68/68 66/66/66
f 203/215/203 204/216/204 76/76/76 75/75/75
f 95/98/95 98/101/98 201/213/201 199/211/199
f 174/184/174 175/185/175 32/32/32 31/31/31
f 177/187/177 64/64/64 66/66/66 180/190/180
f 180/190/180 179/189/179 191/202/191 189/200/189
f 174/184/174 173/183/173 184/195/184 197/209/197
f 184/195/184 95/98/95 199/211/199 197/209/197
f 189/200/189 191/202/191 202/214/202 201/213/201
f 193/204/193 192/203/192 93/96/93 92/95/92
f 192/203/192 194/206/194 94/97/94 93/96/93
f 194/206/194 195/207/195 91/94/91 94/97/94
f 2/2/2 1/1/1 71/71/71 108/111/108
f 1/1/1 4/4/4 72/72/72 71/71/71
f 4/4/4 6/6/6 75/75/75 72/72/72
f 6/6/6 7/7/7 203/215/203 75/75/75
f 7/7/7 42/42/42 204/216/204 203/215/203
f 204/216/204 42/42/42 40/40/40 76/76/76
f 40/40/40 37/37/37 73/73/73 76/76/76
f 37/37/37 36/36/36 74/74/74 73/73/73
f 36/36/36 39/39/39 109/112/109 74/74/74
f 39/39/39 51/51/51 110/113/110 109/112/109
f 51/51/51 15/15/15 107/110/107 110/113/110
f 15/15/15 2/2/2 108/111/108 107/110/107
f 125/133/125 126/134/126 10/10/10 9/9/9
f 205/217/205 206/218/206 207/219/207 208/220/208
f 128/136/128 127/135/127 19/19/19 26/26/26
f 33/33/33 129/138/129 128/136/128 26/26/26
f 43/43/43 132/141/132 131/140/131 44/44/44
f 209/221/209 210/222/210 211/223/211 212/224/212
f 53/53/53 133/142/133 134/143/134 60/60/60
f 134/143/134 135/144/135 67/67/67 60/60/60
f 213/225/213 214/226/214 215/227/215 216/228/216
f 200/212/200 202/214/202 137/147/137 136/146/136
f 130/139/130 129/138/129 33/33/33 176/186/176
f 182/192/182 179/189/179 68/68/68 67/67/67
f 182/192/182 181/191/181 193/204/193 190/201/190
f 175/185/175 198/210/198 196/208/196 176/186/176
f 198/210/198 200/212/200 136/146/136 196/208/196
f 190/201/190 193/204/193 92/95/92 137/147/137
f 10/10/10 126/134/126 217/229/217 218/230/218
f 126/134/126 132/141/132 219/231/219 217/229/217
f 132/141/132 43/43/43 220/232/220 219/231/219
f 43/43/43 10/10/10 218/230/218 220/232/220
f 218/230/218 217/229/217 221/233/221 222/234/222
f 217/229/217 219/231/219 223/235/223 221/233/221
f 219/231/219 220/232/220 224/236/224 223/235/223
f 220/232/220 218/230/218 222/234/222 224/236/224
f 222/234/222 221/233/221 213/225/213 216/228/216
f 214/226/214 213/225/213 221/233/221 223/235/223
f 223/235/223 224/236/224 215/227/215 214/226/214
f 216/228/216 215/227/215 224/236/224 222/234/222
f 127/135/127 125/133/125 225/237/225 226/238/226
f 125/133/125 9/9/9 227/239/227 225/237/225
f 9/9/9 19/19/19 228/240/228 227/239/227
f 19/19/19 127/135/127 226/238/226 228/240/228
f 44/44/44 131/140/131 229/241/229 230/242/230
f 131/140/131 133/142/133 231/243/231 229/241/229
f 133/142/133 53/53/53 232/244/232 231/243/231
f 53/53/53 44/44/44 230/242/230 232/244/232
f 226/245/226 225/246/225 233/247/233 234/248/234
f 225/246/225 227/249/227 235/250/235 233/247/233
f 227/249/227 228/251/228 236/252/236 235/250/235
f 228/251/228 226/245/226 234/248/234 236/252/236
f 230/253/230 229/254/229 237/255/237 238/256/238
f 229/254/229 231/257/231 239/258/239 237/255/237
f 231/257/231 232/259/232 240/260/240 239/258/239
f 232/259/232 230/253/230 238/256/238 240/260/240
f 234/248/234 233/247/233 206/218/206 205/217/205
f 233/247/233 235/250/235 207/219/207 206/218/206
f 235/250/235 236/252/236 208/220/208 207/219/207
f 236/252/236 234/248/234 205/217/205 208/220/208
f 238/256/238 237/255/237 210/222/210 209/221/209
f 237/255/237 239/258/239 211/223/211 210/222/210
f 239/258/239 240/260/240 212/224/212 211/223/211
f 240/260/240 238/256/238 209/221/209 212/224/212
# 238 polygons

View File

@ -2,19 +2,19 @@
Bubble::Bubble(){}
Bubble::Bubble(float newRadius, float newX, float newZ) {
Bubble::Bubble(float newRadius, float newX, float newZ, float speedModifier) {
x = newX;
z = newZ;
y = 0.0f;
maxY = 10.0f;
elevationSpeed = 0.0005f;
y = -5.0f;
maxY = 5.0f;
elevationSpeed = 0.0005f * speedModifier;
radius = newRadius;
}
float Bubble::getAndElevateY() {
y += elevationSpeed * (1/radius);
y += elevationSpeed;
if (y > maxY) {
y = 0.0f;
y = -5.0f;
}
return y;
}

View File

@ -14,7 +14,7 @@ private:
float getAndElevateY();
public:
Bubble();
Bubble(float newRadius, float newX, float newZ);
Bubble(float newRadius, float newX, float newZ, float speedModifier);
float getX();
float getY();

View File

@ -6,14 +6,11 @@ Fish::Fish(Core::RenderObject _object, std::vector<KeyPointRotation> _keyPoints,
keyPoints = _keyPoints;
scale = _scale;
keyPoints.push_back(keyPoints[0]);
//glm::vec3 oldDirection = glm::vec3(0, 0, 1);
//glm::quat oldRotationCamera = glm::quat(1, 0, 0, 0);
//glm::vec3 newDirection;
//glm::quat newRotationCamera;
//
//keyPoints.push_back(keyPoints[0]);
//for (int i = 0; i < keyPoints.size() - 1; i++) {
// newDirection = keyPoints[i + 1] - keyPoints[i];
// newRotationCamera = glm::normalize(glm::rotationCamera(oldDirection, newDirection) * oldRotationCamera);

View File

@ -1,58 +1,100 @@
#include "KeyPoints.h"
void Core::initKeyPoints(std::vector<std::vector<KeyPointRotation>>& keyPoints) {
std::vector<KeyPointRotation> keyPoints1{
{glm::vec3(1.329308f, -0.329211f, 4.001679f), glm::quat(-0.220721f, 0.603405f, -0.178737f, -0.745143f)},
{glm::vec3(0.000000f, 0.000000f, 5.000000f), glm::quat(0.008705f, 0.069754f, -0.000609f, 0.997526f)},
{glm::vec3(-0.004341f, -0.000000f, 4.975380f), glm::quat(-0.000000f, 0.095846f, 0.000000f, 0.995396f)},
{glm::vec3(-0.065140f, -0.002618f, 4.605472f), glm::quat(-0.017428f, 0.052328f, 0.000913f, 0.998477f)},
{glm::vec3(-0.060358f, -0.022680f, 4.206686f), glm::quat(-0.026141f, -0.052318f, -0.001370f, 0.998287f)},
{glm::vec3(-0.049487f, -0.027914f, 4.107419f), glm::quat(-0.034739f, -0.095787f, -0.003345f, 0.994790f)},
{glm::vec3(0.022853f, -0.039252f, 3.842515f), glm::quat(-0.000000f, -0.147809f, -0.000000f, 0.989016f)},
{glm::vec3(0.146800f, -0.016605f, 3.437103f), glm::quat(0.077597f, -0.147354f, 0.011597f, 0.985967f)},
{glm::vec3(0.268701f, 0.064883f, 3.038382f), glm::quat(0.120531f, -0.146708f, 0.018013f, 0.981644f)},
{glm::vec3(0.389059f, 0.185857f, 2.677159f), glm::quat(0.205060f, -0.161441f, 0.034315f, 0.964733f)},
{glm::vec3(0.504850f, 0.390403f, 2.324083f), glm::quat(0.290770f, -0.099961f, 0.030561f, 0.951066f)},
{glm::vec3(0.511088f, 0.638072f, 1.981824f), glm::quat(0.307594f, 0.091155f, -0.029618f, 0.946678f)},
{glm::vec3(0.357549f, 0.856345f, 1.689975f), glm::quat(0.205503f, 0.396312f, -0.091496f, 0.890131f)},
{glm::vec3(0.038171f, 0.981373f, 1.444655f), glm::quat(0.046632f, 0.453368f, -0.023760f, 0.889785f)},
{glm::vec3(-0.261936f, 0.940139f, 1.153646f), glm::quat(-0.092360f, 0.266008f, 0.025614f, 0.959194f)},
{glm::vec3(-0.416927f, 0.797809f, 0.816381f), glm::quat(-0.255270f, 0.159424f, 0.042717f, 0.952679f)},
{glm::vec3(-0.496174f, 0.573713f, 0.465299f), glm::quat(-0.275543f, 0.025163f, 0.007215f, 0.960932f)},
{glm::vec3(-0.453296f, 0.356376f, 0.104439f), glm::quat(-0.248238f, -0.126369f, -0.032681f, 0.959865f)},
{glm::vec3(-0.323620f, 0.170533f, -0.224422f), glm::quat(-0.210459f, -0.227912f, -0.050527f, 0.949321f)},
{glm::vec3(-0.102625f, 0.033964f, -0.559631f), glm::quat(-0.140171f, -0.313819f, -0.046901f, 0.937907f)},
{glm::vec3(0.190719f, -0.080466f, -0.795414f), glm::quat(-0.085098f, -0.577522f, -0.060700f, 0.809656f)},
{glm::vec3(0.603630f, -0.149074f, -0.847929f), glm::quat(-0.081547f, -0.737605f, -0.090567f, 0.664143f)},
{glm::vec3(0.965145f, -0.276190f, -0.679523f), glm::quat(-0.072011f, -0.896137f, -0.158013f, 0.408394f)},
{glm::vec3(1.223547f, -0.421548f, -0.376012f), glm::quat(-0.052217f, -0.939228f, -0.165611f, 0.296138f)},
{glm::vec3(1.415053f, -0.552588f, -0.050745f), glm::quat(-0.031992f, -0.965572f, -0.144306f, 0.214063f)},
{glm::vec3(1.546427f, -0.679752f, 0.331774f), glm::quat(-0.018151f, -0.979413f, -0.172697f, 0.102941f)},
{glm::vec3(1.558644f, -0.839351f, 0.724004f), glm::quat(0.012171f, -0.978097f, -0.198996f, -0.059823f)},
{glm::vec3(1.469536f, -0.994031f, 1.081175f), glm::quat(0.030077f, -0.969770f, -0.179736f, -0.162283f)},
{glm::vec3(1.316302f, -1.088959f, 1.464742f), glm::quat(0.010601f, -0.982971f, -0.060121f, -0.173324f)},
{glm::vec3(1.250162f, -1.139453f, 1.879798f), glm::quat(0.000457f, -0.998591f, -0.052334f, -0.008714f)},
{glm::vec3(1.260571f, -1.181264f, 2.277251f), glm::quat(-0.001827f, -0.998021f, -0.052304f, 0.034852f)},
{glm::vec3(1.301331f, -1.222212f, 2.698203f), glm::quat(-0.002131f, -0.997527f, -0.034834f, 0.061012f)},
{glm::vec3(1.356522f, -1.237915f, 3.094028f), glm::quat(-0.001369f, -0.996765f, -0.017399f, 0.078448f)},
{glm::vec3(1.457414f, -1.252747f, 3.505888f), glm::quat(-0.003031f, -0.984658f, -0.017187f, 0.173622f)},
{glm::vec3(1.630766f, -1.271067f, 3.893110f), glm::quat(-0.006111f, -0.972036f, -0.025454f, 0.233366f)},
{glm::vec3(1.837539f, -1.279354f, 4.234686f), glm::quat(0.000000f, -0.948323f, 0.000000f, 0.317305f)},
{glm::vec3(2.135239f, -1.264522f, 4.535461f), glm::quat(0.007651f, -0.898657f, 0.015686f, 0.438305f)},
{glm::vec3(2.501256f, -1.249689f, 4.748298f), glm::quat(0.009885f, -0.824000f, 0.014383f, 0.566320f)},
{glm::vec3(2.894553f, -1.235730f, 4.807496f), glm::quat(0.018510f, -0.706864f, 0.018510f, 0.706865f)},
{glm::vec3(3.279297f, -1.209567f, 4.668199f), glm::quat(0.031757f, -0.414440f, 0.014473f, 0.909407f)},
{glm::vec3(3.557473f, -1.181664f, 4.382639f), glm::quat(0.032795f, -0.341812f, 0.011936f, 0.939120f)},
{glm::vec3(3.811645f, -1.135947f, 4.045370f), glm::quat(0.058223f, -0.300145f, 0.018358f, 0.951938f)},
{glm::vec3(4.030757f, -1.075943f, 3.686652f), glm::quat(0.084748f, -0.232557f, 0.020346f, 0.968670f)},
{glm::vec3(4.178676f, -0.987683f, 3.326471f), glm::quat(0.120961f, -0.120961f, 0.014852f, 0.985148f)},
{glm::vec3(4.238292f, -0.878539f, 2.921264f), glm::quat(0.139152f, -0.017282f, 0.002429f, 0.990117f)},
{glm::vec3(4.233769f, -0.752050f, 2.541922f), glm::quat(0.173642f, 0.008594f, -0.001515f, 0.984770f)},
{glm::vec3(4.237119f, -0.620841f, 2.138239f), glm::quat(0.095813f, 0.026057f, -0.002509f, 0.995055f)},
{glm::vec3(4.101572f, -0.574726f, 1.748940f), glm::quat(-0.000000f, 0.398749f, 0.000000f, 0.917060f)},
{glm::vec3(3.771825f, -0.581706f, 1.523900f), glm::quat(-0.007557f, 0.499981f, 0.004363f, 0.865992f)},
{glm::vec3(3.384779f, -0.579089f, 1.351094f), glm::quat(0.014119f, 0.587696f, -0.010258f, 0.808894f)}
};
keyPoints.push_back(keyPoints1);
keyPoints.insert(keyPoints.end(),
{
{
{glm::vec3(1.329308f, -0.329211f, 4.001679f), glm::quat(-0.220721f, 0.603405f, -0.178737f, -0.745143f)},
{glm::vec3(0.000000f, 0.000000f, 5.000000f), glm::quat(0.008705f, 0.069754f, -0.000609f, 0.997526f)},
{glm::vec3(-0.004341f, -0.000000f, 4.975380f), glm::quat(-0.000000f, 0.095846f, 0.000000f, 0.995396f)},
{glm::vec3(-0.065140f, -0.002618f, 4.605472f), glm::quat(-0.017428f, 0.052328f, 0.000913f, 0.998477f)},
{glm::vec3(-0.060358f, -0.022680f, 4.206686f), glm::quat(-0.026141f, -0.052318f, -0.001370f, 0.998287f)},
{glm::vec3(-0.049487f, -0.027914f, 4.107419f), glm::quat(-0.034739f, -0.095787f, -0.003345f, 0.994790f)},
{glm::vec3(0.022853f, -0.039252f, 3.842515f), glm::quat(-0.000000f, -0.147809f, -0.000000f, 0.989016f)},
{glm::vec3(0.146800f, -0.016605f, 3.437103f), glm::quat(0.077597f, -0.147354f, 0.011597f, 0.985967f)},
{glm::vec3(0.268701f, 0.064883f, 3.038382f), glm::quat(0.120531f, -0.146708f, 0.018013f, 0.981644f)},
{glm::vec3(0.389059f, 0.185857f, 2.677159f), glm::quat(0.205060f, -0.161441f, 0.034315f, 0.964733f)},
{glm::vec3(0.504850f, 0.390403f, 2.324083f), glm::quat(0.290770f, -0.099961f, 0.030561f, 0.951066f)},
{glm::vec3(0.511088f, 0.638072f, 1.981824f), glm::quat(0.307594f, 0.091155f, -0.029618f, 0.946678f)},
{glm::vec3(0.357549f, 0.856345f, 1.689975f), glm::quat(0.205503f, 0.396312f, -0.091496f, 0.890131f)},
{glm::vec3(0.038171f, 0.981373f, 1.444655f), glm::quat(0.046632f, 0.453368f, -0.023760f, 0.889785f)},
{glm::vec3(-0.261936f, 0.940139f, 1.153646f), glm::quat(-0.092360f, 0.266008f, 0.025614f, 0.959194f)},
{glm::vec3(-0.416927f, 0.797809f, 0.816381f), glm::quat(-0.255270f, 0.159424f, 0.042717f, 0.952679f)},
{glm::vec3(-0.496174f, 0.573713f, 0.465299f), glm::quat(-0.275543f, 0.025163f, 0.007215f, 0.960932f)},
{glm::vec3(-0.453296f, 0.356376f, 0.104439f), glm::quat(-0.248238f, -0.126369f, -0.032681f, 0.959865f)},
{glm::vec3(-0.323620f, 0.170533f, -0.224422f), glm::quat(-0.210459f, -0.227912f, -0.050527f, 0.949321f)},
{glm::vec3(-0.102625f, 0.033964f, -0.559631f), glm::quat(-0.140171f, -0.313819f, -0.046901f, 0.937907f)},
{glm::vec3(0.190719f, -0.080466f, -0.795414f), glm::quat(-0.085098f, -0.577522f, -0.060700f, 0.809656f)},
{glm::vec3(0.603630f, -0.149074f, -0.847929f), glm::quat(-0.081547f, -0.737605f, -0.090567f, 0.664143f)},
{glm::vec3(0.965145f, -0.276190f, -0.679523f), glm::quat(-0.072011f, -0.896137f, -0.158013f, 0.408394f)},
{glm::vec3(1.223547f, -0.421548f, -0.376012f), glm::quat(-0.052217f, -0.939228f, -0.165611f, 0.296138f)},
{glm::vec3(1.415053f, -0.552588f, -0.050745f), glm::quat(-0.031992f, -0.965572f, -0.144306f, 0.214063f)},
{glm::vec3(1.546427f, -0.679752f, 0.331774f), glm::quat(-0.018151f, -0.979413f, -0.172697f, 0.102941f)},
{glm::vec3(1.558644f, -0.839351f, 0.724004f), glm::quat(0.012171f, -0.978097f, -0.198996f, -0.059823f)},
{glm::vec3(1.469536f, -0.994031f, 1.081175f), glm::quat(0.030077f, -0.969770f, -0.179736f, -0.162283f)},
{glm::vec3(1.316302f, -1.088959f, 1.464742f), glm::quat(0.010601f, -0.982971f, -0.060121f, -0.173324f)},
{glm::vec3(1.250162f, -1.139453f, 1.879798f), glm::quat(0.000457f, -0.998591f, -0.052334f, -0.008714f)},
{glm::vec3(1.260571f, -1.181264f, 2.277251f), glm::quat(-0.001827f, -0.998021f, -0.052304f, 0.034852f)},
{glm::vec3(1.301331f, -1.222212f, 2.698203f), glm::quat(-0.002131f, -0.997527f, -0.034834f, 0.061012f)},
{glm::vec3(1.356522f, -1.237915f, 3.094028f), glm::quat(-0.001369f, -0.996765f, -0.017399f, 0.078448f)},
{glm::vec3(1.457414f, -1.252747f, 3.505888f), glm::quat(-0.003031f, -0.984658f, -0.017187f, 0.173622f)},
{glm::vec3(1.630766f, -1.271067f, 3.893110f), glm::quat(-0.006111f, -0.972036f, -0.025454f, 0.233366f)},
{glm::vec3(1.837539f, -1.279354f, 4.234686f), glm::quat(0.000000f, -0.948323f, 0.000000f, 0.317305f)},
{glm::vec3(2.135239f, -1.264522f, 4.535461f), glm::quat(0.007651f, -0.898657f, 0.015686f, 0.438305f)},
{glm::vec3(2.501256f, -1.249689f, 4.748298f), glm::quat(0.009885f, -0.824000f, 0.014383f, 0.566320f)},
{glm::vec3(2.894553f, -1.235730f, 4.807496f), glm::quat(0.018510f, -0.706864f, 0.018510f, 0.706865f)},
{glm::vec3(3.279297f, -1.209567f, 4.668199f), glm::quat(0.031757f, -0.414440f, 0.014473f, 0.909407f)},
{glm::vec3(3.557473f, -1.181664f, 4.382639f), glm::quat(0.032795f, -0.341812f, 0.011936f, 0.939120f)},
{glm::vec3(3.811645f, -1.135947f, 4.045370f), glm::quat(0.058223f, -0.300145f, 0.018358f, 0.951938f)},
{glm::vec3(4.030757f, -1.075943f, 3.686652f), glm::quat(0.084748f, -0.232557f, 0.020346f, 0.968670f)},
{glm::vec3(4.178676f, -0.987683f, 3.326471f), glm::quat(0.120961f, -0.120961f, 0.014852f, 0.985148f)},
{glm::vec3(4.238292f, -0.878539f, 2.921264f), glm::quat(0.139152f, -0.017282f, 0.002429f, 0.990117f)},
{glm::vec3(4.233769f, -0.752050f, 2.541922f), glm::quat(0.173642f, 0.008594f, -0.001515f, 0.984770f)},
{glm::vec3(4.237119f, -0.620841f, 2.138239f), glm::quat(0.095813f, 0.026057f, -0.002509f, 0.995055f)},
{glm::vec3(4.101572f, -0.574726f, 1.748940f), glm::quat(-0.000000f, 0.398749f, 0.000000f, 0.917060f)},
{glm::vec3(3.771825f, -0.581706f, 1.523900f), glm::quat(-0.007557f, 0.499981f, 0.004363f, 0.865992f)},
{glm::vec3(3.384779f, -0.579089f, 1.351094f), glm::quat(0.014119f, 0.587696f, -0.010258f, 0.808894f)}
},
{
{glm::vec3(0.031843f, -0.247857f, 4.324978f), glm::quat(-0.216308f, 0.034072f, 0.007554f, 0.975701f)},
{glm::vec3(-0.032170f, -0.405611f, 4.031020f), glm::quat(-0.231448f, 0.126920f, 0.030471f, 0.964051f)},
{glm::vec3(-0.078582f, -0.535124f, 3.743823f), glm::quat(-0.190344f, -0.068475f, -0.013310f, 0.979236f)},
{glm::vec3(0.007966f, -0.649473f, 3.458680f), glm::quat(-0.161441f, -0.205060f, -0.034315f, 0.964733f)},
{glm::vec3(0.177203f, -0.749192f, 3.181759f), glm::quat(-0.124485f, -0.298133f, -0.039250f, 0.945558f)},
{glm::vec3(0.377586f, -0.811535f, 2.915277f), glm::quat(-0.041600f, -0.300420f, -0.013117f, 0.952809f)},
{glm::vec3(0.556306f, -0.835249f, 2.650934f), glm::quat(-0.033547f, -0.275469f, -0.009620f, 0.960676f)},
{glm::vec3(0.720488f, -0.853389f, 2.354004f), glm::quat(-0.008536f, -0.207904f, -0.001814f, 0.978110f)},
{glm::vec3(0.845881f, -0.855833f, 2.038054f), glm::quat(0.000000f, -0.173648f, 0.000000f, 0.984808f)},
{glm::vec3(0.910562f, -0.852342f, 1.705261f), glm::quat(0.017436f, -0.043613f, 0.000761f, 0.998896f)},
{glm::vec3(0.901167f, -0.831763f, 1.386290f), glm::quat(0.034888f, 0.026161f, -0.000914f, 0.999048f)},
{glm::vec3(0.852853f, -0.797276f, 1.072259f), glm::quat(0.060594f, 0.121642f, -0.007440f, 0.990695f)},
{glm::vec3(0.747423f, -0.755840f, 0.752255f), glm::quat(0.059823f, 0.198996f, -0.012171f, 0.978097f)},
{glm::vec3(0.583107f, -0.715792f, 0.457987f), glm::quat(0.049914f, 0.300294f, -0.015738f, 0.952410f)},
{glm::vec3(0.371304f, -0.682342f, 0.221214f), glm::quat(0.047995f, 0.398203f, -0.020869f, 0.915803f)},
{glm::vec3(0.058519f, -0.621606f, 0.115487f), glm::quat(0.073422f, 0.639828f, -0.061609f, 0.762518f)},
{glm::vec3(-0.272508f, -0.550239f, 0.097388f), glm::quat(0.073520f, 0.755518f, -0.086080f, 0.645273f)},
{glm::vec3(-0.578685f, -0.461238f, 0.214148f), glm::quat(0.081737f, 0.842143f, -0.133382f, 0.516066f)},
{glm::vec3(-0.782049f, -0.318283f, 0.412831f), glm::quat(0.078762f, 0.917432f, -0.228742f, 0.315897f)},
{glm::vec3(-0.936660f, -0.168052f, 0.648615f), glm::quat(0.048231f, 0.950817f, -0.237065f, 0.193446f)},
{glm::vec3(-1.003714f, -0.008432f, 0.939034f), glm::quat(0.008443f, 0.969705f, -0.241775f, 0.033863f)},
{glm::vec3(-0.978241f, 0.142340f, 1.239044f), glm::quat(-0.031645f, 0.968317f, -0.179467f, -0.170740f)},
{glm::vec3(-0.860020f, 0.233082f, 1.521570f), glm::quat(-0.021733f, 0.972789f, -0.102244f, -0.206773f)},
{glm::vec3(-0.718163f, 0.275179f, 1.827373f), glm::quat(-0.007851f, 0.973776f, -0.034005f, -0.224814f)},
{glm::vec3(-0.567776f, 0.286345f, 2.109457f), glm::quat(-0.000000f, 0.968148f, -0.000000f, -0.250380f)},
{glm::vec3(-0.403199f, 0.269252f, 2.406362f), glm::quat(0.008738f, 0.967558f, 0.033788f, -0.250227f)},
{glm::vec3(-0.249326f, 0.237884f, 2.707554f), glm::quat(0.009986f, 0.980282f, 0.051374f, -0.190548f)},
{glm::vec3(-0.156757f, 0.209652f, 3.011616f), glm::quat(0.001369f, 0.996765f, 0.017399f, -0.078447f)},
{glm::vec3(-0.156074f, 0.204417f, 3.350462f), glm::quat(0.000533f, 0.998097f, -0.008710f, 0.061046f)},
{glm::vec3(-0.240432f, 0.214189f, 3.678743f), glm::quat(0.003180f, 0.983105f, -0.017160f, 0.182208f)},
{glm::vec3(-0.393705f, 0.226403f, 3.958157f), glm::quat(0.008522f, 0.945195f, -0.024751f, 0.325457f)},
{glm::vec3(-0.622734f, 0.244197f, 4.207847f), glm::quat(0.011063f, 0.905997f, -0.023724f, 0.422473f)},
{glm::vec3(-0.883152f, 0.263730f, 4.391507f), glm::quat(0.023115f, 0.847241f, -0.036991f, 0.529415f)},
{glm::vec3(-1.208277f, 0.300308f, 4.469141f), glm::quat(0.050600f, 0.686678f, -0.048017f, 0.723607f)},
{glm::vec3(-1.530805f, 0.366491f, 4.396798f), glm::quat(0.110692f, 0.525386f, -0.069168f, 0.840793f)},
{glm::vec3(-1.760869f, 0.467299f, 4.203595f), glm::quat(0.181470f, 0.303340f, -0.058963f, 0.933583f)},
{glm::vec3(-1.869613f, 0.627041f, 3.926835f), glm::quat(0.264952f, 0.125779f, -0.034882f, 0.955386f)},
{glm::vec3(-1.930721f, 0.809559f, 3.646710f), glm::quat(0.282934f, 0.083567f, -0.024754f, 0.955171f)},
{glm::vec3(-1.944953f, 1.006198f, 3.395043f), glm::quat(0.333756f, 0.016452f, -0.005826f, 0.942498f)}
}
});
}

View File

@ -166,4 +166,4 @@ void Core::DrawContext(Core::RenderContext& context)
(void*)0 // element array buffer offset
);
glBindVertexArray(0);
}
}

View File

@ -12,13 +12,13 @@ namespace Core
{
struct RenderContext
{
{
GLuint vertexArray;
GLuint vertexBuffer;
GLuint vertexIndexBuffer;
int size = 0;
void initFromOBJ(obj::Model& model);
void initFromOBJ(obj::Model& model);
void initFromAssimpMesh(aiMesh* mesh);
};
@ -32,16 +32,16 @@ namespace Core
// vertexArray - jednowymiarowa tablica zawierajaca wartosci opisujace pozycje kolejnych wierzcholkow w jednym ciagu (x1, y1, z1, w1, x2, y2, z2, w2, ...)
// numVertices - liczba wierzcholkow do narysowania
// elementSize - liczba wartosci opisujacych pojedynczy wierzcholek (np. 3 gdy wierzcholek opisany jest trojka (x, y, z))
void DrawVertexArray(const float * vertexArray, int numVertices, int elementSize);
void DrawVertexArray(const float* vertexArray, int numVertices, int elementSize);
// indexArray - jednowymiarowa tablica zawierajaca indeksy wierzcholkow kolejnych trojkatow w jednym ciagu (t1_i1, t1_i2, t1_i3, t2_i1, t2_i2, t2_i3, ...)
// numIndexes - liczba indeksow w tablicy indexArray
void DrawVertexArrayIndexed(const float * vertexArray, const int * indexArray, int numIndexes, int elementSize);
void DrawVertexArrayIndexed(const float* vertexArray, const int* indexArray, int numIndexes, int elementSize);
struct VertexAttribute
{
const void * Pointer;
const void* Pointer;
int Size;
};
@ -58,13 +58,13 @@ namespace Core
//
// Przykladowe wywolanie funkcji - narysowanie trojkata jak na pierwszych zajeciach:
/*
const float vertices[] = {
0.25f, 0.25f, 0.0f, 1.0f,
0.25f, -0.25f, 0.0f, 1.0f,
-0.25f, -0.25f, 0.0f, 1.0f
};
Core::VertexData vertexData;
vertexData.NumActiveAttribs = 1; // Liczba uzywanych atrybutow wierzcholka
vertexData.Attribs[0].Pointer = vertices; // Wskaznik na dane zerowego atrybutu
@ -73,7 +73,10 @@ namespace Core
Core::DrawVertexArray(vertexData);
*/
void DrawVertexArray(const VertexData & data);
void DrawVertexArray(const VertexData& data);
void DrawContext(RenderContext& context);
Core::RenderObject createRenderObject(std::string modelFileName, std::string textureFileName, glm::mat4 initialTransformation);
}

View File

@ -7,6 +7,7 @@
#include <vector>
#include <ctime>
#include <cstdlib>
#include <string>
#include "Shader_Loader.h"
#include "Render_Utils.h"
@ -56,11 +57,15 @@ int prevTime;
GLuint sharkTexture;
GLuint fish1Texture;
float randRange(float start, float end) {
return start + ((float)std::rand()) / ((float)RAND_MAX) * (end - start);
}
void keyboard(unsigned char key, int x, int y)
{
float angleSpeed = 0.1f;
float moveSpeed = 0.1f;
float angleSpeed = 0.02f;
float moveSpeed = 0.02f;
glm::quat rotationxd = glm::inverse(rotation);
if(key == 'z') cameraAngle -= angleSpeed;
@ -198,31 +203,33 @@ void loadModelToContext(std::string path, Core::RenderContext& context)
context.initFromAssimpMesh(scene->mMeshes[0]);
}
void initBubbles() {
bubbles.insert(bubbles.end(), {
Bubble(0.2f, 1.0f, 1.0f),
Bubble(0.2f, 3.0f, 2.3f),
Bubble(0.2f, 5.7f, 1.2f),
Bubble(0.2f, 7.0f, 4.0f),
Bubble(0.2f, 4.7f, 3.7f),
Bubble(0.2f, 1.0f, 2.1f),
Bubble(0.2f, 2.6f, 8.4f),
Bubble(0.2f, 1.3f, 0.3f),
Bubble(0.2f, 5.2f, 2.1f),
Bubble(0.2f, 4.0f, 1.2f)
}
);
void initBubbles(int n) {
for (int i = 0; i < n; i++) {
bubbles.push_back(Bubble(randRange(0.05f, 0.2f), randRange(-5.0f, 5.0f), randRange(-5.0f, 5.0f), randRange(0.5f, 5.0f)));
}
}
void initFish() {
Core::RenderObject createRenderObject(std::string modelFileName, std::string textureFileName, glm::mat4 initialTransformation) {
Core::RenderObject object;
loadModelToContext("models/fish_yellow.obj", object.context);
object.textureId = Core::LoadTexture("textures/fish_yellow.jpg");
object.initialTransformation = glm::rotate(glm::radians(90.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(0.01f));
fish.insert(fish.end(), {
loadModelToContext("models/" + modelFileName, object.context);
object.textureId = Core::LoadTexture(("textures/" + textureFileName).c_str());
object.initialTransformation = initialTransformation;
return object;
}
Fish(object, keyPoints[0], 7.0f, 1.0f)
void initFish() {
Core::RenderObject fishYellow = createRenderObject("fish_yellow.obj", "fish_yellow.jpg", glm::rotate(glm::radians(90.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(0.01f)));
Core::RenderObject fishGolden = createRenderObject("fish_golden.obj", "fish_golden.jpg", glm::rotate(glm::radians(90.0f), glm::vec3(0, 1, 0)) * glm::rotate(glm::radians(90.0f), glm::vec3(0, 0, 1)) * glm::rotate(glm::radians(180.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(0.002f)));
Core::RenderObject fishTropical1 = createRenderObject("fish_tropical1.obj", "fish_tropical1.jpg", glm::rotate(glm::radians(90.0f), glm::vec3(0, 1, 0)) * glm::rotate(glm::radians(90.0f), glm::vec3(0, 0, 1)) * glm::rotate(glm::radians(90.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(0.0002f)));
Core::RenderObject fishTropical2 = createRenderObject("fish_tropical2.obj", "fish_tropical2.jpg", glm::rotate(glm::radians(90.0f), glm::vec3(0, 1, 0)) * glm::rotate(glm::radians(90.0f), glm::vec3(0, 0, 1)) * glm::rotate(glm::radians(90.0f), glm::vec3(1, 0, 0)) * glm::scale(glm::vec3(0.0002f)));
fish.insert(fish.end(), {
Fish(fishYellow, keyPoints[0], 7.0f, 1.0f),
Fish(fishGolden, keyPoints[1], 3.0f, 1.0f),
Fish(fishTropical1, keyPoints[1], 1.0f, 1.0f),
Fish(fishTropical2, keyPoints[0], 2.0f, 1.5f)
}
);
}
@ -242,7 +249,7 @@ void init()
loadModelToContext("models/fish_yellow.obj", fish1Model);
fish1Texture = Core::LoadTexture("textures/fish_yellow.jpg");
sharkTexture = Core::LoadTexture("textures/Orca_Diffuse.jpg");
initBubbles();
initBubbles(30);
initFish();
/*initRenderables();
initPhysicsScene();*/

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB