commit c2b85150ed250f17974547e0df0af8c5a2f1f59d Author: Melik Houij Date: Thu Mar 2 09:42:39 2023 +0100 initial commit Signed-off-by: Melik Houij diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..19ddc96 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "Dairy-Drift" +version = "0.0.1" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +field-offset = "0.3.4" +image = "0.24.5" +gl = "0.14.0" +cgmath = "0.18.0" +tobj = "2.0.0" +[dependencies.glfw] +version = "*" diff --git a/resources/models/TestCarModel/CarW0.mtl b/resources/models/TestCarModel/CarW0.mtl new file mode 100644 index 0000000..f8db7f4 --- /dev/null +++ b/resources/models/TestCarModel/CarW0.mtl @@ -0,0 +1,13 @@ +# Blender MTL File: 'None' +# Material Count: 1 + +newmtl Car_Mat.004 +Ns 225.000000 +Ka 1.000000 1.000000 1.000000 +Kd 0.800000 0.800000 0.800000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.450000 +d 1.000000 +illum 2 +map_Kd Car_D.png diff --git a/resources/models/TestCarModel/CarW0.obj b/resources/models/TestCarModel/CarW0.obj new file mode 100644 index 0000000..d16c5cc --- /dev/null +++ b/resources/models/TestCarModel/CarW0.obj @@ -0,0 +1,553 @@ +# Blender v3.0.1 OBJ File: '' +# www.blender.org +mtllib CarW0.mtl +o Car +v 0.647144 -0.354370 1.880012 +v 0.647144 0.320913 0.827202 +v 0.647144 -0.266453 -2.186555 +v 0.647144 0.290142 -2.204138 +v 0.743545 0.056935 -2.305243 +v 0.743545 0.133863 1.996502 +v 0.695345 -0.195986 -2.221722 +v 0.695345 -0.206976 1.991007 +v 0.647144 -0.350128 -1.572891 +v 0.647144 0.373351 -1.572891 +v 0.743545 0.071387 -1.572891 +v 0.695345 -0.220946 -1.572891 +v 0.451528 0.756333 0.193091 +v 0.451528 0.745470 -1.018213 +v 0.731285 -0.018525 -1.547248 +v 0.747598 -0.185274 -1.616728 +v 0.695345 -0.220946 -1.608301 +v 0.802170 -0.051799 -1.576720 +v 0.758471 -0.159613 -2.374044 +v 0.789358 -0.045402 -2.406531 +v 0.718760 -0.059581 1.996502 +v 0.739302 -0.200789 1.753985 +v 0.740595 -0.200373 2.060169 +v 0.791646 -0.072548 2.084863 +v 0.791741 -0.072481 1.729119 +v 0.711910 0.219446 1.697480 +v 0.647144 -0.353124 0.832941 +v 0.743545 0.113262 0.832941 +v 0.695345 -0.210734 0.832941 +v 0.695345 -0.206976 1.735475 +v 0.718760 -0.059581 1.707612 +v 0.695345 -0.206976 1.991007 +v 0.731285 -0.009029 -2.283264 +v 0.695345 -0.195986 -2.221722 +v -0.794053 -0.354370 1.880012 +v -0.794053 0.320913 0.827202 +v -0.794053 -0.266453 -2.186555 +v -0.794053 0.290142 -2.204138 +v -0.890454 0.056935 -2.305243 +v -0.890454 0.133863 1.996502 +v -0.842254 -0.195986 -2.221722 +v -0.842254 -0.206976 1.991007 +v -0.794053 -0.350128 -1.572891 +v -0.794053 0.373351 -1.572891 +v -0.890454 0.071387 -1.572891 +v -0.842254 -0.220946 -1.572891 +v -0.598437 0.756333 0.193091 +v -0.598437 0.745470 -1.018213 +v -0.858819 0.219446 1.697480 +v -0.794053 -0.353124 0.832941 +v -0.890454 0.113262 0.832941 +v -0.842254 -0.210734 0.832941 +v -0.842254 -0.220946 -1.608301 +v -0.878193 -0.018525 -1.547248 +v -0.842254 -0.195986 -2.221722 +v -0.878193 -0.009029 -2.283264 +v -0.865669 -0.059581 1.996502 +v -0.842254 -0.206976 1.991007 +v -0.865669 -0.059581 1.707612 +v -0.842254 -0.206976 1.735475 +v -0.938650 -0.072481 1.729119 +v -0.938555 -0.072548 2.084863 +v -0.887504 -0.200373 2.060169 +v -0.886211 -0.200789 1.753985 +v -0.936267 -0.045402 -2.406531 +v -0.905380 -0.159613 -2.374044 +v -0.949079 -0.051799 -1.576720 +v -0.894507 -0.185274 -1.616728 +v 0.269499 -0.287938 -2.008919 +v 0.269499 -0.238259 -2.058598 +v 0.262771 -0.344209 -2.278127 +v 0.262771 -0.254567 -2.278127 +v 0.318265 -0.287938 -2.008919 +v 0.318265 -0.238259 -2.058598 +v 0.324993 -0.344209 -2.278127 +v 0.324993 -0.254567 -2.278127 +v 0.248018 -0.263099 -2.033758 +v 0.235364 -0.299388 -2.278127 +v 0.352400 -0.299388 -2.278127 +v 0.339746 -0.263099 -2.033758 +v -0.208114 -0.311173 -2.349040 +v 0.065750 -0.311173 -2.349040 +v -0.208114 -0.169367 -2.332325 +v 0.065750 -0.169367 -2.332325 +v 0.390279 -0.287938 -2.008919 +v 0.390279 -0.238259 -2.058598 +v 0.383551 -0.344209 -2.278127 +v 0.383551 -0.254567 -2.278127 +v 0.439045 -0.287938 -2.008919 +v 0.439045 -0.238259 -2.058598 +v 0.445773 -0.344209 -2.278127 +v 0.445773 -0.254567 -2.278127 +v 0.368798 -0.263099 -2.033758 +v 0.356144 -0.299388 -2.278127 +v 0.473180 -0.299388 -2.278127 +v 0.460526 -0.263099 -2.033758 +v 0.065750 -0.345336 2.046885 +v -0.208114 -0.345336 2.046885 +v 0.065750 -0.203530 2.030170 +v -0.208114 -0.203530 2.030170 +v 0.677522 0.219063 1.647425 +v 0.695201 0.209712 1.647425 +v 0.677522 0.219063 1.606797 +v 0.695201 0.209712 1.606797 +v 0.709928 0.280334 1.606797 +v 0.709928 0.280334 1.647425 +v 0.727608 0.270984 1.647425 +v 0.727608 0.270984 1.606797 +v 0.664945 0.254364 1.557735 +v 0.797529 0.255406 1.512802 +v 0.670481 0.336816 1.539998 +v 0.794037 0.339942 1.496408 +v 0.712489 0.292948 1.645794 +v 0.706712 0.271201 1.657938 +v 0.754534 0.271201 1.657938 +v 0.748757 0.292948 1.645794 +v 0.680616 0.333629 1.605617 +v 0.777047 0.333629 1.605617 +v 0.780214 0.252778 1.626115 +v 0.677449 0.252778 1.626115 +v -0.824431 0.219063 1.647425 +v -0.842110 0.209712 1.647425 +v -0.824431 0.219063 1.606797 +v -0.842110 0.209712 1.606797 +v -0.856837 0.280334 1.606797 +v -0.856837 0.280334 1.647425 +v -0.874517 0.270984 1.647425 +v -0.874517 0.270984 1.606797 +v -0.811854 0.254364 1.557735 +v -0.944438 0.255406 1.512802 +v -0.817389 0.336816 1.539998 +v -0.940946 0.339942 1.496408 +v -0.859398 0.292948 1.645794 +v -0.853621 0.271201 1.657938 +v -0.901443 0.271201 1.657938 +v -0.895666 0.292948 1.645794 +v -0.827524 0.333629 1.605617 +v -0.923956 0.333629 1.605617 +v -0.927123 0.252778 1.626115 +v -0.824358 0.252778 1.626115 +vt 0.436693 0.306027 +vt 0.179266 0.306027 +vt 0.167697 0.149524 +vt 0.448261 0.149524 +vt 0.179266 0.892833 +vt 0.179266 0.779104 +vt 0.436693 0.779103 +vt 0.436693 0.892832 +vt 0.162046 0.093968 +vt 0.453912 0.093968 +vt 0.487887 0.330820 +vt 0.476057 0.759465 +vt 0.401752 0.659796 +vt 0.401752 0.443424 +vt 0.585618 0.760329 +vt 0.580273 0.876189 +vt 0.534190 0.890735 +vt 0.532682 0.759902 +vt 0.972153 0.049703 +vt 0.972153 0.024178 +vt 0.960495 0.031508 +vt 0.960495 0.049434 +vt 0.528774 0.330061 +vt 0.587266 0.330539 +vt 0.489260 0.872387 +vt 0.179266 0.000122 +vt 0.436693 0.000122 +vt 0.445302 0.033080 +vt 0.170656 0.033079 +vt 0.162047 0.938235 +vt 0.453912 0.938234 +vt 0.445303 0.985811 +vt 0.170656 0.985811 +vt 0.595606 0.870132 +vt 0.610248 0.760496 +vt 0.214207 0.659796 +vt 0.214207 0.443424 +vt 0.526857 0.125972 +vt 0.588308 0.125972 +vt 0.659294 0.344943 +vt 0.967005 0.344943 +vt 0.967005 0.121383 +vt 0.659294 0.121383 +vt 0.967005 0.858614 +vt 0.659294 0.858614 +vt 0.659294 0.990850 +vt 0.967005 0.990850 +vt 0.614109 0.330754 +vt 0.436693 0.999878 +vt 0.179266 0.999878 +vt 0.510169 0.175530 +vt 0.615836 0.143795 +vt 0.588997 0.067144 +vt 0.600150 0.049434 +vt 0.496919 0.049434 +vt 0.508342 0.067144 +vt 0.915677 0.081571 +vt 0.857127 0.081571 +vt 0.857127 0.098288 +vt 0.915677 0.098288 +vt 0.508342 0.015710 +vt 0.496919 0.031508 +vt 0.600150 0.031508 +vt 0.588997 0.015710 +vt 0.128071 0.330820 +vt 0.139902 0.759465 +vt 0.030341 0.760330 +vt 0.083277 0.759903 +vt 0.081769 0.890735 +vt 0.035686 0.876189 +vt 0.869130 0.067144 +vt 0.948828 0.067144 +vt 0.857265 0.049434 +vt 0.028692 0.330539 +vt 0.087184 0.330061 +vt 0.126699 0.872387 +vt 0.857265 0.031508 +vt 0.551818 0.113576 +vt 0.588997 0.113576 +vt 0.601300 0.098288 +vt 0.542751 0.098288 +vt 0.020353 0.870132 +vt 0.005711 0.760497 +vt 0.926240 0.081571 +vt 0.926240 0.098288 +vt 0.027650 0.125972 +vt 0.089101 0.125972 +vt 0.869130 0.067337 +vt 0.906609 0.067337 +vt 0.613913 0.067144 +vt 0.845239 0.067144 +vt 0.948828 0.015710 +vt 0.869130 0.015710 +vt 0.845239 0.113576 +vt 0.613913 0.113576 +vt 0.588997 0.067337 +vt 0.551818 0.067337 +vt 0.542751 0.081571 +vt 0.601300 0.081571 +vt 0.532187 0.081571 +vt 0.532187 0.098288 +vt 0.613913 0.015710 +vt 0.845239 0.015710 +vt 0.485261 0.049703 +vt 0.485261 0.024178 +vt 0.001849 0.330754 +vt 0.105790 0.175530 +vt 0.845239 0.067337 +vt 0.613913 0.067337 +vt 0.000122 0.143795 +vt 0.906609 0.113576 +vt 0.869130 0.113576 +vt 0.071024 0.945341 +vt 0.071024 0.957018 +vt 0.018519 0.958112 +vt 0.018447 0.946026 +vt 0.123572 0.953127 +vt 0.114027 0.970234 +vt 0.092357 0.970234 +vt 0.082812 0.953127 +vt 0.018376 0.958077 +vt 0.018447 0.972578 +vt 0.071024 0.972175 +vt 0.071024 0.957018 +vt 0.018447 0.933839 +vt 0.018447 0.946026 +vt 0.071024 0.945341 +vt 0.071024 0.933882 +vt 0.114027 0.936020 +vt 0.092357 0.936020 +vt 0.604256 0.934001 +vt 0.604256 0.987921 +vt 0.501948 0.987921 +vt 0.501948 0.934002 +vt 0.071024 0.945341 +vt 0.071024 0.957018 +vt 0.018519 0.958112 +vt 0.018447 0.946026 +vt 0.123572 0.953127 +vt 0.114027 0.970234 +vt 0.092357 0.970234 +vt 0.082812 0.953127 +vt 0.018376 0.958077 +vt 0.018447 0.972578 +vt 0.071024 0.972175 +vt 0.071024 0.957018 +vt 0.018447 0.933839 +vt 0.018447 0.946026 +vt 0.071024 0.945341 +vt 0.071024 0.933882 +vt 0.114027 0.936020 +vt 0.092357 0.936020 +vt 0.604256 0.934001 +vt 0.604256 0.987921 +vt 0.501948 0.987921 +vt 0.501948 0.934002 +vt 0.041864 0.111980 +vt 0.030565 0.111980 +vt 0.030565 0.072822 +vt 0.041864 0.072822 +vt 0.074791 0.111980 +vt 0.064816 0.111980 +vt 0.064816 0.072822 +vt 0.074791 0.072822 +vt 0.007613 0.111980 +vt 0.007613 0.072822 +vt 0.116674 0.041668 +vt 0.116674 0.067181 +vt 0.081917 0.067181 +vt 0.081917 0.041668 +vt 0.104737 0.009901 +vt 0.092631 0.009901 +vt 0.093678 0.002772 +vt 0.104057 0.002772 +vt 0.081917 0.097338 +vt 0.116674 0.097338 +vt 0.104737 0.114104 +vt 0.092631 0.114104 +vt 0.116674 0.020619 +vt 0.081917 0.020619 +vt 0.040348 0.041668 +vt 0.040121 0.067181 +vt 0.027195 0.058006 +vt 0.027195 0.050334 +vt 0.135528 0.067181 +vt 0.135528 0.041668 +vt 0.150281 0.050334 +vt 0.150281 0.058006 +vt 0.041864 0.111980 +vt 0.041864 0.072822 +vt 0.030565 0.072822 +vt 0.030565 0.111980 +vt 0.074791 0.111980 +vt 0.074791 0.072822 +vt 0.064816 0.072822 +vt 0.064816 0.111980 +vt 0.007613 0.072822 +vt 0.007613 0.111980 +vt 0.116674 0.041668 +vt 0.081917 0.041668 +vt 0.081917 0.067181 +vt 0.116674 0.067181 +vt 0.104737 0.009901 +vt 0.104057 0.002772 +vt 0.093678 0.002772 +vt 0.092631 0.009901 +vt 0.081917 0.097338 +vt 0.092631 0.114104 +vt 0.104737 0.114104 +vt 0.116674 0.097338 +vt 0.116674 0.020619 +vt 0.081917 0.020619 +vt 0.040348 0.041668 +vt 0.027195 0.050334 +vt 0.027195 0.058006 +vt 0.040121 0.067181 +vt 0.135528 0.067181 +vt 0.150281 0.058006 +vt 0.150281 0.050334 +vt 0.135528 0.041668 +vn 0.0000 0.9933 0.1158 +vn 0.0000 0.9914 -0.1307 +vn 0.0000 0.9614 0.2752 +vn 0.8997 0.4364 0.0050 +vn 0.9847 -0.1743 -0.0013 +vn 0.2822 -0.3453 0.8950 +vn 0.9880 -0.1545 0.0017 +vn 0.9353 0.3539 0.0008 +vn 0.9390 0.3429 -0.0246 +vn 0.0000 -0.6016 0.7988 +vn 0.0000 -0.3136 -0.9496 +vn 0.8972 -0.4399 -0.0379 +vn 0.0000 1.0000 -0.0090 +vn 0.9896 -0.1435 0.0015 +vn 0.0000 0.8244 0.5661 +vn 0.0000 -1.0000 -0.0012 +vn 0.0000 0.3978 -0.9175 +vn 0.0000 -0.9908 -0.1351 +vn 0.0000 -0.0161 0.9999 +vn 0.9424 -0.3345 0.0005 +vn 0.0000 -0.4465 -0.8948 +vn 0.9216 0.3879 -0.0139 +vn 0.9488 -0.3158 0.0004 +vn -0.4797 0.8774 0.0050 +vn -0.9272 -0.3746 -0.0015 +vn -0.5011 -0.8649 -0.0280 +vn -0.8997 0.4364 0.0050 +vn -0.9847 -0.1743 -0.0013 +vn 0.4797 0.8774 0.0050 +vn -0.9880 -0.1545 0.0017 +vn -0.9353 0.3539 0.0008 +vn -0.9390 0.3429 -0.0246 +vn 0.0000 -0.2736 -0.9618 +vn 0.1745 0.9847 0.0001 +vn -0.8972 -0.4399 -0.0379 +vn -0.2995 -0.2581 -0.9185 +vn -0.9896 -0.1435 0.0015 +vn -0.1415 -0.9899 0.0004 +vn 0.0000 0.9591 -0.2830 +vn 0.5011 -0.8649 -0.0280 +vn -0.9454 -0.3259 -0.0077 +vn 0.0000 0.9894 0.1452 +vn 0.1415 -0.9899 0.0004 +vn 0.2995 -0.2581 -0.9185 +vn 0.0000 -0.9727 -0.2323 +vn -0.2822 -0.3453 0.8950 +vn -0.9424 -0.3345 0.0005 +vn 0.9454 -0.3259 -0.0077 +vn -0.9216 0.3879 -0.0139 +vn 0.0000 -0.1897 0.9818 +vn 0.9272 -0.3746 -0.0015 +vn 0.0000 -0.9955 0.0950 +vn -0.9488 -0.3158 0.0004 +vn 0.0000 0.8304 -0.5571 +vn -0.1745 0.9847 0.0001 +vn -0.8232 0.5670 -0.0299 +vn 0.0000 0.0000 -1.0000 +vn 0.8232 0.5670 -0.0299 +vn 0.0000 -0.9788 0.2046 +vn 0.0000 0.9973 -0.0741 +vn 0.8327 -0.5386 0.1285 +vn -0.8327 -0.5386 0.1285 +vn 0.0000 0.1171 -0.9931 +vn 0.0000 0.1171 0.9931 +vn -0.0000 0.0000 1.0000 +vn 0.8840 -0.4675 0.0000 +vn -0.8840 0.4675 0.0000 +vn -0.3182 -0.1861 -0.9296 +vn 0.0000 0.4876 0.8731 +vn 0.0000 0.7027 0.7115 +vn 0.0000 -0.8654 0.5010 +vn 0.7308 0.2640 0.6294 +vn -0.6899 0.2734 0.6703 +vn -0.9813 0.0919 0.1691 +vn 0.9851 0.0742 0.1549 +vn -0.0000 -0.9997 -0.0232 +vn -0.0035 0.9985 0.0541 +vn -0.8840 -0.4675 0.0000 +vn 0.8840 0.4675 0.0000 +vn 0.3182 -0.1861 -0.9296 +vn -0.7308 0.2640 0.6294 +vn 0.6899 0.2734 0.6703 +vn 0.9813 0.0919 0.1691 +vn -0.9851 0.0742 0.1549 +vn 0.0035 0.9985 0.0541 +usemtl Car_Mat.004 +s off +f 2/1/1 36/2/1 49/3/1 26/4/1 +f 38/5/2 44/6/2 10/7/2 4/8/2 +f 40/9/3 6/10/3 26/4/3 49/3/3 +f 2/11/4 10/12/4 14/13/4 13/14/4 +f 12/15/5 7/16/5 5/17/5 11/18/5 +f 15/19/6 17/20/6 16/21/6 18/22/6 +f 12/15/7 11/18/7 28/23/7 29/24/7 +f 11/18/8 10/12/8 2/11/8 28/23/8 +f 5/17/9 4/25/9 10/12/9 11/18/9 +f 35/26/10 1/27/10 8/28/10 42/29/10 +f 39/30/11 5/31/11 7/32/11 41/33/11 +f 3/34/12 7/16/12 12/15/12 9/35/12 +f 14/13/13 48/36/13 47/37/13 13/14/13 +f 29/24/14 28/23/14 6/38/14 8/39/14 +f 13/14/15 47/37/15 36/2/15 2/1/15 +f 50/40/16 27/41/16 1/42/16 35/43/16 +f 5/31/17 39/30/17 38/5/17 4/8/17 +f 9/44/18 43/45/18 37/46/18 3/47/18 +f 27/41/16 50/40/16 43/45/16 9/44/16 +f 6/10/19 40/9/19 42/29/19 8/28/19 +f 9/35/20 12/15/20 29/24/20 27/48/20 +f 3/49/21 37/50/21 41/33/21 7/32/21 +f 28/23/22 2/11/22 26/51/22 6/38/22 +f 8/39/23 1/52/23 27/48/23 29/24/23 +f 56/53/24 65/54/24 67/55/24 54/56/24 +f 64/57/25 63/58/25 62/59/25 61/60/25 +f 53/61/26 68/62/26 66/63/26 55/64/26 +f 36/65/27 47/37/27 48/36/27 44/66/27 +f 46/67/28 45/68/28 39/69/28 41/70/28 +f 33/71/29 15/72/29 18/22/29 20/73/29 +f 46/67/30 52/74/30 51/75/30 45/68/30 +f 45/68/31 51/75/31 36/65/31 44/66/31 +f 39/69/32 45/68/32 44/66/32 38/76/32 +f 19/77/33 66/63/33 65/54/33 20/73/33 +f 31/78/34 21/79/34 24/80/34 25/81/34 +f 37/82/35 43/83/35 46/67/35 41/70/35 +f 60/84/36 64/57/36 61/60/36 59/85/36 +f 52/74/37 42/86/37 40/87/37 51/75/37 +f 58/88/38 63/58/38 64/57/38 60/89/38 +f 20/73/39 65/54/39 56/90/39 33/91/39 +f 17/92/40 34/93/40 19/77/40 16/21/40 +f 66/63/41 68/62/41 67/55/41 65/54/41 +f 57/94/42 62/59/42 24/80/42 21/95/42 +f 32/96/43 30/97/43 22/98/43 23/99/43 +f 30/100/44 31/101/44 25/81/44 22/98/44 +f 55/102/45 66/63/45 19/77/45 34/103/45 +f 54/104/46 67/55/46 68/62/46 53/105/46 +f 43/83/47 50/106/47 52/74/47 46/67/47 +f 19/77/48 20/73/48 18/22/48 16/21/48 +f 51/75/49 40/87/49 49/107/49 36/65/49 +f 63/58/50 23/99/50 24/80/50 62/59/50 +f 22/98/51 25/81/51 24/80/51 23/99/51 +f 23/99/52 63/58/52 58/108/52 32/109/52 +f 42/86/53 52/74/53 50/106/53 35/110/53 +f 44/6/54 48/36/54 14/13/54 10/7/54 +f 59/111/55 61/60/55 62/59/55 57/112/55 +f 77/113/56 70/114/56 72/115/56 78/116/56 +f 78/117/57 72/118/57 76/119/57 79/120/57 +f 79/121/58 76/122/58 74/123/58 80/124/58 +f 71/125/59 75/126/59 73/127/59 69/128/59 +f 76/122/60 72/115/60 70/114/60 74/123/60 +f 75/126/61 79/121/61 80/124/61 73/127/61 +f 71/129/57 78/117/57 79/120/57 75/130/57 +f 69/128/62 77/113/62 78/116/62 71/125/62 +f 81/131/63 83/132/63 84/133/63 82/134/63 +f 93/135/56 86/136/56 88/137/56 94/138/56 +f 94/139/57 88/140/57 92/141/57 95/142/57 +f 95/143/58 92/144/58 90/145/58 96/146/58 +f 87/147/59 91/148/59 89/149/59 85/150/59 +f 92/144/60 88/137/60 86/136/60 90/145/60 +f 91/148/61 95/143/61 96/146/61 89/149/61 +f 87/151/57 94/139/57 95/142/57 91/152/57 +f 85/150/62 93/135/62 94/138/62 87/147/62 +f 97/153/64 99/154/64 100/155/64 98/156/64 +f 104/157/57 103/158/57 105/159/57 108/160/57 +f 101/161/65 102/162/65 107/163/65 106/164/65 +f 102/162/66 104/157/66 108/160/66 107/163/66 +f 103/158/67 101/165/67 106/166/67 105/159/67 +f 109/167/68 111/168/68 112/169/68 110/170/68 +f 114/171/69 115/172/69 116/173/69 113/174/69 +f 118/175/70 117/176/70 113/177/70 116/178/70 +f 120/179/71 119/180/71 115/172/71 114/171/71 +f 119/181/72 118/182/72 116/183/72 115/184/72 +f 117/185/73 120/186/73 114/187/73 113/188/73 +f 111/168/74 109/167/74 120/186/74 117/185/74 +f 110/170/75 112/169/75 118/182/75 119/181/75 +f 109/167/76 110/170/76 119/180/76 120/179/76 +f 112/169/77 111/168/77 117/176/77 118/175/77 +f 124/189/57 128/190/57 125/191/57 123/192/57 +f 121/193/65 126/194/65 127/195/65 122/196/65 +f 122/196/78 127/195/78 128/190/78 124/189/78 +f 123/192/79 125/191/79 126/197/79 121/198/79 +f 129/199/80 130/200/80 132/201/80 131/202/80 +f 134/203/69 133/204/69 136/205/69 135/206/69 +f 138/207/70 136/208/70 133/209/70 137/210/70 +f 140/211/71 134/203/71 135/206/71 139/212/71 +f 139/213/81 135/214/81 136/215/81 138/216/81 +f 137/217/82 133/218/82 134/219/82 140/220/82 +f 131/202/83 137/217/83 140/220/83 129/199/83 +f 130/200/84 139/213/84 138/216/84 132/201/84 +f 129/199/76 140/211/76 139/212/76 130/200/76 +f 132/201/85 138/207/85 137/210/85 131/202/85 diff --git a/resources/models/TestCarModel/CarW1.mtl b/resources/models/TestCarModel/CarW1.mtl new file mode 100644 index 0000000..84e6777 --- /dev/null +++ b/resources/models/TestCarModel/CarW1.mtl @@ -0,0 +1,24 @@ +# Blender MTL File: 'None' +# Material Count: 2 + +newmtl Car_Mat.004 +Ns 225.000000 +Ka 1.000000 1.000000 1.000000 +Kd 0.800000 0.800000 0.800000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.450000 +d 1.000000 +illum 2 +map_Kd Car_D.png + +newmtl Wheel_Mat.003 +Ns 225.000000 +Ka 1.000000 1.000000 1.000000 +Kd 0.800000 0.800000 0.800000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.450000 +d 1.000000 +illum 2 +map_Kd Wheel_D.png diff --git a/resources/models/TestCarModel/CarW1.obj b/resources/models/TestCarModel/CarW1.obj new file mode 100644 index 0000000..20c127f --- /dev/null +++ b/resources/models/TestCarModel/CarW1.obj @@ -0,0 +1,854 @@ +# Blender v3.0.1 OBJ File: '' +# www.blender.org +mtllib CarW1.mtl +o Car +v 0.647144 -0.354370 1.880012 +v 0.647144 0.320913 0.827202 +v 0.647144 -0.266453 -2.186555 +v 0.647144 0.290142 -2.204138 +v 0.743545 0.056935 -2.305243 +v 0.743545 0.133863 1.996502 +v 0.695345 -0.195986 -2.221722 +v 0.695345 -0.206976 1.991007 +v 0.647144 -0.350128 -1.572891 +v 0.647144 0.373351 -1.572891 +v 0.743545 0.071387 -1.572891 +v 0.695345 -0.220946 -1.572891 +v 0.451528 0.756333 0.193091 +v 0.451528 0.745470 -1.018213 +v 0.731285 -0.018525 -1.547248 +v 0.747598 -0.185274 -1.616728 +v 0.695345 -0.220946 -1.608301 +v 0.802170 -0.051799 -1.576720 +v 0.758471 -0.159613 -2.374044 +v 0.789358 -0.045402 -2.406531 +v 0.718760 -0.059581 1.996502 +v 0.739302 -0.200789 1.753985 +v 0.740595 -0.200373 2.060169 +v 0.791646 -0.072548 2.084863 +v 0.791741 -0.072481 1.729119 +v 0.711910 0.219446 1.697480 +v 0.647144 -0.353124 0.832941 +v 0.743545 0.113262 0.832941 +v 0.695345 -0.210734 0.832941 +v 0.695345 -0.206976 1.735475 +v 0.718760 -0.059581 1.707612 +v 0.695345 -0.206976 1.991007 +v 0.731285 -0.009029 -2.283264 +v 0.695345 -0.195986 -2.221722 +v -0.794053 -0.354370 1.880012 +v -0.794053 0.320913 0.827202 +v -0.794053 -0.266453 -2.186555 +v -0.794053 0.290142 -2.204138 +v -0.890454 0.056935 -2.305243 +v -0.890454 0.133863 1.996502 +v -0.842254 -0.195986 -2.221722 +v -0.842254 -0.206976 1.991007 +v -0.794053 -0.350128 -1.572891 +v -0.794053 0.373351 -1.572891 +v -0.890454 0.071387 -1.572891 +v -0.842254 -0.220946 -1.572891 +v -0.598437 0.756333 0.193091 +v -0.598437 0.745470 -1.018213 +v -0.858819 0.219446 1.697480 +v -0.794053 -0.353124 0.832941 +v -0.890454 0.113262 0.832941 +v -0.842254 -0.210734 0.832941 +v -0.842254 -0.220946 -1.608301 +v -0.878193 -0.018525 -1.547248 +v -0.842254 -0.195986 -2.221722 +v -0.878193 -0.009029 -2.283264 +v -0.865669 -0.059581 1.996502 +v -0.842254 -0.206976 1.991007 +v -0.865669 -0.059581 1.707612 +v -0.842254 -0.206976 1.735475 +v -0.938650 -0.072481 1.729119 +v -0.938555 -0.072548 2.084863 +v -0.887504 -0.200373 2.060169 +v -0.886211 -0.200789 1.753985 +v -0.936267 -0.045402 -2.406531 +v -0.905380 -0.159613 -2.374044 +v -0.949079 -0.051799 -1.576720 +v -0.894507 -0.185274 -1.616728 +v 0.269499 -0.287938 -2.008919 +v 0.269499 -0.238259 -2.058598 +v 0.262771 -0.344209 -2.278127 +v 0.262771 -0.254567 -2.278127 +v 0.318265 -0.287938 -2.008919 +v 0.318265 -0.238259 -2.058598 +v 0.324993 -0.344209 -2.278127 +v 0.324993 -0.254567 -2.278127 +v 0.248018 -0.263099 -2.033758 +v 0.235364 -0.299388 -2.278127 +v 0.352400 -0.299388 -2.278127 +v 0.339746 -0.263099 -2.033758 +v -0.208114 -0.311173 -2.349040 +v 0.065750 -0.311173 -2.349040 +v -0.208114 -0.169367 -2.332325 +v 0.065750 -0.169367 -2.332325 +v 0.390279 -0.287938 -2.008919 +v 0.390279 -0.238259 -2.058598 +v 0.383551 -0.344209 -2.278127 +v 0.383551 -0.254567 -2.278127 +v 0.439045 -0.287938 -2.008919 +v 0.439045 -0.238259 -2.058598 +v 0.445773 -0.344209 -2.278127 +v 0.445773 -0.254567 -2.278127 +v 0.368798 -0.263099 -2.033758 +v 0.356144 -0.299388 -2.278127 +v 0.473180 -0.299388 -2.278127 +v 0.460526 -0.263099 -2.033758 +v 0.065750 -0.345336 2.046885 +v -0.208114 -0.345336 2.046885 +v 0.065750 -0.203530 2.030170 +v -0.208114 -0.203530 2.030170 +v 0.677522 0.219063 1.647425 +v 0.695201 0.209712 1.647425 +v 0.677522 0.219063 1.606797 +v 0.695201 0.209712 1.606797 +v 0.709928 0.280334 1.606797 +v 0.709928 0.280334 1.647425 +v 0.727608 0.270984 1.647425 +v 0.727608 0.270984 1.606797 +v 0.664945 0.254364 1.557735 +v 0.797529 0.255406 1.512802 +v 0.670481 0.336816 1.539998 +v 0.794037 0.339942 1.496408 +v 0.712489 0.292948 1.645794 +v 0.706712 0.271201 1.657938 +v 0.754534 0.271201 1.657938 +v 0.748757 0.292948 1.645794 +v 0.680616 0.333629 1.605617 +v 0.777047 0.333629 1.605617 +v 0.780214 0.252778 1.626115 +v 0.677449 0.252778 1.626115 +v -0.824431 0.219063 1.647425 +v -0.842110 0.209712 1.647425 +v -0.824431 0.219063 1.606797 +v -0.842110 0.209712 1.606797 +v -0.856837 0.280334 1.606797 +v -0.856837 0.280334 1.647425 +v -0.874517 0.270984 1.647425 +v -0.874517 0.270984 1.606797 +v -0.811854 0.254364 1.557735 +v -0.944438 0.255406 1.512802 +v -0.817389 0.336816 1.539998 +v -0.940946 0.339942 1.496408 +v -0.859398 0.292948 1.645794 +v -0.853621 0.271201 1.657938 +v -0.901443 0.271201 1.657938 +v -0.895666 0.292948 1.645794 +v -0.827524 0.333629 1.605617 +v -0.923956 0.333629 1.605617 +v -0.927123 0.252778 1.626115 +v -0.824358 0.252778 1.626115 +vt 0.436693 0.306027 +vt 0.179266 0.306027 +vt 0.167697 0.149524 +vt 0.448261 0.149524 +vt 0.179266 0.892833 +vt 0.179266 0.779104 +vt 0.436693 0.779103 +vt 0.436693 0.892832 +vt 0.162046 0.093968 +vt 0.453912 0.093968 +vt 0.487887 0.330820 +vt 0.476057 0.759465 +vt 0.401752 0.659796 +vt 0.401752 0.443424 +vt 0.585618 0.760329 +vt 0.580273 0.876189 +vt 0.534190 0.890735 +vt 0.532682 0.759902 +vt 0.972153 0.049703 +vt 0.972153 0.024178 +vt 0.960495 0.031508 +vt 0.960495 0.049434 +vt 0.528774 0.330061 +vt 0.587266 0.330539 +vt 0.489260 0.872387 +vt 0.179266 0.000122 +vt 0.436693 0.000122 +vt 0.445302 0.033080 +vt 0.170656 0.033079 +vt 0.162047 0.938235 +vt 0.453912 0.938234 +vt 0.445303 0.985811 +vt 0.170656 0.985811 +vt 0.595606 0.870132 +vt 0.610248 0.760496 +vt 0.214207 0.659796 +vt 0.214207 0.443424 +vt 0.526857 0.125972 +vt 0.588308 0.125972 +vt 0.659294 0.344943 +vt 0.967005 0.344943 +vt 0.967005 0.121383 +vt 0.659294 0.121383 +vt 0.967005 0.858614 +vt 0.659294 0.858614 +vt 0.659294 0.990850 +vt 0.967005 0.990850 +vt 0.614109 0.330754 +vt 0.436693 0.999878 +vt 0.179266 0.999878 +vt 0.510169 0.175530 +vt 0.615836 0.143795 +vt 0.588997 0.067144 +vt 0.600150 0.049434 +vt 0.496919 0.049434 +vt 0.508342 0.067144 +vt 0.915677 0.081571 +vt 0.857127 0.081571 +vt 0.857127 0.098288 +vt 0.915677 0.098288 +vt 0.508342 0.015710 +vt 0.496919 0.031508 +vt 0.600150 0.031508 +vt 0.588997 0.015710 +vt 0.128071 0.330820 +vt 0.139902 0.759465 +vt 0.030341 0.760330 +vt 0.083277 0.759903 +vt 0.081769 0.890735 +vt 0.035686 0.876189 +vt 0.869130 0.067144 +vt 0.948828 0.067144 +vt 0.857265 0.049434 +vt 0.028692 0.330539 +vt 0.087184 0.330061 +vt 0.126699 0.872387 +vt 0.857265 0.031508 +vt 0.551818 0.113576 +vt 0.588997 0.113576 +vt 0.601300 0.098288 +vt 0.542751 0.098288 +vt 0.020353 0.870132 +vt 0.005711 0.760497 +vt 0.926240 0.081571 +vt 0.926240 0.098288 +vt 0.027650 0.125972 +vt 0.089101 0.125972 +vt 0.869130 0.067337 +vt 0.906609 0.067337 +vt 0.613913 0.067144 +vt 0.845239 0.067144 +vt 0.948828 0.015710 +vt 0.869130 0.015710 +vt 0.845239 0.113576 +vt 0.613913 0.113576 +vt 0.588997 0.067337 +vt 0.551818 0.067337 +vt 0.542751 0.081571 +vt 0.601300 0.081571 +vt 0.532187 0.081571 +vt 0.532187 0.098288 +vt 0.613913 0.015710 +vt 0.845239 0.015710 +vt 0.485261 0.049703 +vt 0.485261 0.024178 +vt 0.001849 0.330754 +vt 0.105790 0.175530 +vt 0.845239 0.067337 +vt 0.613913 0.067337 +vt 0.000122 0.143795 +vt 0.906609 0.113576 +vt 0.869130 0.113576 +vt 0.071024 0.945341 +vt 0.071024 0.957018 +vt 0.018519 0.958112 +vt 0.018447 0.946026 +vt 0.123572 0.953127 +vt 0.114027 0.970234 +vt 0.092357 0.970234 +vt 0.082812 0.953127 +vt 0.018376 0.958077 +vt 0.018447 0.972578 +vt 0.071024 0.972175 +vt 0.071024 0.957018 +vt 0.018447 0.933839 +vt 0.018447 0.946026 +vt 0.071024 0.945341 +vt 0.071024 0.933882 +vt 0.114027 0.936020 +vt 0.092357 0.936020 +vt 0.604256 0.934001 +vt 0.604256 0.987921 +vt 0.501948 0.987921 +vt 0.501948 0.934002 +vt 0.071024 0.945341 +vt 0.071024 0.957018 +vt 0.018519 0.958112 +vt 0.018447 0.946026 +vt 0.123572 0.953127 +vt 0.114027 0.970234 +vt 0.092357 0.970234 +vt 0.082812 0.953127 +vt 0.018376 0.958077 +vt 0.018447 0.972578 +vt 0.071024 0.972175 +vt 0.071024 0.957018 +vt 0.018447 0.933839 +vt 0.018447 0.946026 +vt 0.071024 0.945341 +vt 0.071024 0.933882 +vt 0.114027 0.936020 +vt 0.092357 0.936020 +vt 0.604256 0.934001 +vt 0.604256 0.987921 +vt 0.501948 0.987921 +vt 0.501948 0.934002 +vt 0.041864 0.111980 +vt 0.030565 0.111980 +vt 0.030565 0.072822 +vt 0.041864 0.072822 +vt 0.074791 0.111980 +vt 0.064816 0.111980 +vt 0.064816 0.072822 +vt 0.074791 0.072822 +vt 0.007613 0.111980 +vt 0.007613 0.072822 +vt 0.116674 0.041668 +vt 0.116674 0.067181 +vt 0.081917 0.067181 +vt 0.081917 0.041668 +vt 0.104737 0.009901 +vt 0.092631 0.009901 +vt 0.093678 0.002772 +vt 0.104057 0.002772 +vt 0.081917 0.097338 +vt 0.116674 0.097338 +vt 0.104737 0.114104 +vt 0.092631 0.114104 +vt 0.116674 0.020619 +vt 0.081917 0.020619 +vt 0.040348 0.041668 +vt 0.040121 0.067181 +vt 0.027195 0.058006 +vt 0.027195 0.050334 +vt 0.135528 0.067181 +vt 0.135528 0.041668 +vt 0.150281 0.050334 +vt 0.150281 0.058006 +vt 0.041864 0.111980 +vt 0.041864 0.072822 +vt 0.030565 0.072822 +vt 0.030565 0.111980 +vt 0.074791 0.111980 +vt 0.074791 0.072822 +vt 0.064816 0.072822 +vt 0.064816 0.111980 +vt 0.007613 0.072822 +vt 0.007613 0.111980 +vt 0.116674 0.041668 +vt 0.081917 0.041668 +vt 0.081917 0.067181 +vt 0.116674 0.067181 +vt 0.104737 0.009901 +vt 0.104057 0.002772 +vt 0.093678 0.002772 +vt 0.092631 0.009901 +vt 0.081917 0.097338 +vt 0.092631 0.114104 +vt 0.104737 0.114104 +vt 0.116674 0.097338 +vt 0.116674 0.020619 +vt 0.081917 0.020619 +vt 0.040348 0.041668 +vt 0.027195 0.050334 +vt 0.027195 0.058006 +vt 0.040121 0.067181 +vt 0.135528 0.067181 +vt 0.150281 0.058006 +vt 0.150281 0.050334 +vt 0.135528 0.041668 +vn 0.0000 0.9933 0.1158 +vn 0.0000 0.9914 -0.1307 +vn 0.0000 0.9614 0.2752 +vn 0.8997 0.4364 0.0050 +vn 0.9847 -0.1743 -0.0013 +vn 0.2822 -0.3453 0.8950 +vn 0.9880 -0.1545 0.0017 +vn 0.9353 0.3539 0.0008 +vn 0.9390 0.3429 -0.0246 +vn 0.0000 -0.6016 0.7988 +vn 0.0000 -0.3136 -0.9496 +vn 0.8972 -0.4399 -0.0379 +vn 0.0000 1.0000 -0.0090 +vn 0.9896 -0.1435 0.0015 +vn 0.0000 0.8244 0.5661 +vn 0.0000 -1.0000 -0.0012 +vn 0.0000 0.3978 -0.9175 +vn 0.0000 -0.9908 -0.1351 +vn 0.0000 -0.0161 0.9999 +vn 0.9424 -0.3345 0.0005 +vn 0.0000 -0.4465 -0.8948 +vn 0.9216 0.3879 -0.0139 +vn 0.9488 -0.3158 0.0004 +vn -0.4797 0.8774 0.0050 +vn -0.9272 -0.3746 -0.0015 +vn -0.5011 -0.8649 -0.0280 +vn -0.8997 0.4364 0.0050 +vn -0.9847 -0.1743 -0.0013 +vn 0.4797 0.8774 0.0050 +vn -0.9880 -0.1545 0.0017 +vn -0.9353 0.3539 0.0008 +vn -0.9390 0.3429 -0.0246 +vn 0.0000 -0.2736 -0.9618 +vn 0.1745 0.9847 0.0001 +vn -0.8972 -0.4399 -0.0379 +vn -0.2995 -0.2581 -0.9185 +vn -0.9896 -0.1435 0.0015 +vn -0.1415 -0.9899 0.0004 +vn 0.0000 0.9591 -0.2830 +vn 0.5011 -0.8649 -0.0280 +vn -0.9454 -0.3259 -0.0077 +vn 0.0000 0.9894 0.1452 +vn 0.1415 -0.9899 0.0004 +vn 0.2995 -0.2581 -0.9185 +vn 0.0000 -0.9727 -0.2323 +vn -0.2822 -0.3453 0.8950 +vn -0.9424 -0.3345 0.0005 +vn 0.9454 -0.3259 -0.0077 +vn -0.9216 0.3879 -0.0139 +vn 0.0000 -0.1897 0.9818 +vn 0.9272 -0.3746 -0.0015 +vn 0.0000 -0.9955 0.0950 +vn -0.9488 -0.3158 0.0004 +vn 0.0000 0.8304 -0.5571 +vn -0.1745 0.9847 0.0001 +vn -0.8232 0.5670 -0.0299 +vn 0.0000 0.0000 -1.0000 +vn 0.8232 0.5670 -0.0299 +vn 0.0000 -0.9788 0.2046 +vn 0.0000 0.9973 -0.0741 +vn 0.8327 -0.5386 0.1285 +vn -0.8327 -0.5386 0.1285 +vn 0.0000 0.1171 -0.9931 +vn 0.0000 0.1171 0.9931 +vn -0.0000 0.0000 1.0000 +vn 0.8840 -0.4675 0.0000 +vn -0.8840 0.4675 0.0000 +vn -0.3182 -0.1861 -0.9296 +vn 0.0000 0.4876 0.8731 +vn 0.0000 0.7027 0.7115 +vn 0.0000 -0.8654 0.5010 +vn 0.7308 0.2640 0.6294 +vn -0.6899 0.2734 0.6703 +vn -0.9813 0.0919 0.1691 +vn 0.9851 0.0742 0.1549 +vn -0.0000 -0.9997 -0.0232 +vn -0.0035 0.9985 0.0541 +vn -0.8840 -0.4675 0.0000 +vn 0.8840 0.4675 0.0000 +vn 0.3182 -0.1861 -0.9296 +vn -0.7308 0.2640 0.6294 +vn 0.6899 0.2734 0.6703 +vn 0.9813 0.0919 0.1691 +vn -0.9851 0.0742 0.1549 +vn 0.0035 0.9985 0.0541 +usemtl Car_Mat.004 +s off +f 2/1/1 36/2/1 49/3/1 26/4/1 +f 38/5/2 44/6/2 10/7/2 4/8/2 +f 40/9/3 6/10/3 26/4/3 49/3/3 +f 2/11/4 10/12/4 14/13/4 13/14/4 +f 12/15/5 7/16/5 5/17/5 11/18/5 +f 15/19/6 17/20/6 16/21/6 18/22/6 +f 12/15/7 11/18/7 28/23/7 29/24/7 +f 11/18/8 10/12/8 2/11/8 28/23/8 +f 5/17/9 4/25/9 10/12/9 11/18/9 +f 35/26/10 1/27/10 8/28/10 42/29/10 +f 39/30/11 5/31/11 7/32/11 41/33/11 +f 3/34/12 7/16/12 12/15/12 9/35/12 +f 14/13/13 48/36/13 47/37/13 13/14/13 +f 29/24/14 28/23/14 6/38/14 8/39/14 +f 13/14/15 47/37/15 36/2/15 2/1/15 +f 50/40/16 27/41/16 1/42/16 35/43/16 +f 5/31/17 39/30/17 38/5/17 4/8/17 +f 9/44/18 43/45/18 37/46/18 3/47/18 +f 27/41/16 50/40/16 43/45/16 9/44/16 +f 6/10/19 40/9/19 42/29/19 8/28/19 +f 9/35/20 12/15/20 29/24/20 27/48/20 +f 3/49/21 37/50/21 41/33/21 7/32/21 +f 28/23/22 2/11/22 26/51/22 6/38/22 +f 8/39/23 1/52/23 27/48/23 29/24/23 +f 56/53/24 65/54/24 67/55/24 54/56/24 +f 64/57/25 63/58/25 62/59/25 61/60/25 +f 53/61/26 68/62/26 66/63/26 55/64/26 +f 36/65/27 47/37/27 48/36/27 44/66/27 +f 46/67/28 45/68/28 39/69/28 41/70/28 +f 33/71/29 15/72/29 18/22/29 20/73/29 +f 46/67/30 52/74/30 51/75/30 45/68/30 +f 45/68/31 51/75/31 36/65/31 44/66/31 +f 39/69/32 45/68/32 44/66/32 38/76/32 +f 19/77/33 66/63/33 65/54/33 20/73/33 +f 31/78/34 21/79/34 24/80/34 25/81/34 +f 37/82/35 43/83/35 46/67/35 41/70/35 +f 60/84/36 64/57/36 61/60/36 59/85/36 +f 52/74/37 42/86/37 40/87/37 51/75/37 +f 58/88/38 63/58/38 64/57/38 60/89/38 +f 20/73/39 65/54/39 56/90/39 33/91/39 +f 17/92/40 34/93/40 19/77/40 16/21/40 +f 66/63/41 68/62/41 67/55/41 65/54/41 +f 57/94/42 62/59/42 24/80/42 21/95/42 +f 32/96/43 30/97/43 22/98/43 23/99/43 +f 30/100/44 31/101/44 25/81/44 22/98/44 +f 55/102/45 66/63/45 19/77/45 34/103/45 +f 54/104/46 67/55/46 68/62/46 53/105/46 +f 43/83/47 50/106/47 52/74/47 46/67/47 +f 19/77/48 20/73/48 18/22/48 16/21/48 +f 51/75/49 40/87/49 49/107/49 36/65/49 +f 63/58/50 23/99/50 24/80/50 62/59/50 +f 22/98/51 25/81/51 24/80/51 23/99/51 +f 23/99/52 63/58/52 58/108/52 32/109/52 +f 42/86/53 52/74/53 50/106/53 35/110/53 +f 44/6/54 48/36/54 14/13/54 10/7/54 +f 59/111/55 61/60/55 62/59/55 57/112/55 +f 77/113/56 70/114/56 72/115/56 78/116/56 +f 78/117/57 72/118/57 76/119/57 79/120/57 +f 79/121/58 76/122/58 74/123/58 80/124/58 +f 71/125/59 75/126/59 73/127/59 69/128/59 +f 76/122/60 72/115/60 70/114/60 74/123/60 +f 75/126/61 79/121/61 80/124/61 73/127/61 +f 71/129/57 78/117/57 79/120/57 75/130/57 +f 69/128/62 77/113/62 78/116/62 71/125/62 +f 81/131/63 83/132/63 84/133/63 82/134/63 +f 93/135/56 86/136/56 88/137/56 94/138/56 +f 94/139/57 88/140/57 92/141/57 95/142/57 +f 95/143/58 92/144/58 90/145/58 96/146/58 +f 87/147/59 91/148/59 89/149/59 85/150/59 +f 92/144/60 88/137/60 86/136/60 90/145/60 +f 91/148/61 95/143/61 96/146/61 89/149/61 +f 87/151/57 94/139/57 95/142/57 91/152/57 +f 85/150/62 93/135/62 94/138/62 87/147/62 +f 97/153/64 99/154/64 100/155/64 98/156/64 +f 104/157/57 103/158/57 105/159/57 108/160/57 +f 101/161/65 102/162/65 107/163/65 106/164/65 +f 102/162/66 104/157/66 108/160/66 107/163/66 +f 103/158/67 101/165/67 106/166/67 105/159/67 +f 109/167/68 111/168/68 112/169/68 110/170/68 +f 114/171/69 115/172/69 116/173/69 113/174/69 +f 118/175/70 117/176/70 113/177/70 116/178/70 +f 120/179/71 119/180/71 115/172/71 114/171/71 +f 119/181/72 118/182/72 116/183/72 115/184/72 +f 117/185/73 120/186/73 114/187/73 113/188/73 +f 111/168/74 109/167/74 120/186/74 117/185/74 +f 110/170/75 112/169/75 118/182/75 119/181/75 +f 109/167/76 110/170/76 119/180/76 120/179/76 +f 112/169/77 111/168/77 117/176/77 118/175/77 +f 124/189/57 128/190/57 125/191/57 123/192/57 +f 121/193/65 126/194/65 127/195/65 122/196/65 +f 122/196/78 127/195/78 128/190/78 124/189/78 +f 123/192/79 125/191/79 126/197/79 121/198/79 +f 129/199/80 130/200/80 132/201/80 131/202/80 +f 134/203/69 133/204/69 136/205/69 135/206/69 +f 138/207/70 136/208/70 133/209/70 137/210/70 +f 140/211/71 134/203/71 135/206/71 139/212/71 +f 139/213/81 135/214/81 136/215/81 138/216/81 +f 137/217/82 133/218/82 134/219/82 140/220/82 +f 131/202/83 137/217/83 140/220/83 129/199/83 +f 130/200/84 139/213/84 138/216/84 132/201/84 +f 129/199/76 140/211/76 139/212/76 130/200/76 +f 132/201/85 138/207/85 137/210/85 131/202/85 +o Wheel +v 0.087493 -0.000001 -0.267421 +v 0.087493 0.102337 -0.247065 +v 0.087493 0.189095 -0.189095 +v 0.087493 0.247064 -0.102337 +v 0.087493 0.267421 0.000001 +v 0.087493 0.247064 0.102338 +v 0.120491 0.000032 -0.000016 +v 0.087493 0.189095 0.189096 +v 0.087493 0.102337 0.247066 +v 0.087493 -0.000001 0.267422 +v 0.087493 -0.102339 0.247066 +v 0.087493 -0.189097 0.189096 +v 0.087493 -0.247066 0.102338 +v 0.087493 -0.267423 0.000000 +v 0.087493 -0.247066 -0.102337 +v 0.087493 -0.189097 -0.189095 +v 0.087493 -0.102339 -0.247065 +v 0.120490 0.089462 -0.215982 +v 0.120490 -0.000001 -0.233777 +v 0.120490 0.165305 -0.165305 +v 0.120490 0.215981 -0.089462 +v 0.120490 0.233777 0.000001 +v 0.120490 0.215981 0.089463 +v 0.120490 0.165305 0.165306 +v 0.120490 0.089462 0.215983 +v 0.120490 -0.000001 0.233778 +v 0.120490 -0.089464 0.215983 +v 0.120490 -0.165307 0.165306 +v 0.120490 -0.215983 0.089463 +v 0.120490 -0.233779 0.000000 +v 0.120490 -0.215983 -0.089462 +v 0.120490 -0.165307 -0.165305 +v 0.120490 -0.089464 -0.215982 +v -0.087493 -0.000001 -0.267421 +v -0.087493 0.102337 -0.247065 +v -0.087493 0.189095 -0.189095 +v -0.087493 0.247064 -0.102337 +v -0.087493 0.267421 0.000001 +v -0.087493 0.247064 0.102338 +v -0.120491 0.000032 -0.000016 +v -0.087493 0.189095 0.189096 +v -0.087493 0.102337 0.247066 +v -0.087493 -0.000001 0.267422 +v -0.087493 -0.102339 0.247066 +v -0.087493 -0.189097 0.189096 +v -0.087493 -0.247066 0.102338 +v -0.087493 -0.267423 0.000000 +v -0.087493 -0.247066 -0.102337 +v -0.087493 -0.189097 -0.189095 +v -0.087493 -0.102339 -0.247065 +v -0.120490 0.089462 -0.215982 +v -0.120490 -0.000001 -0.233777 +v -0.120490 0.165305 -0.165305 +v -0.120490 0.215981 -0.089462 +v -0.120490 0.233777 0.000001 +v -0.120490 0.215981 0.089463 +v -0.120490 0.165305 0.165306 +v -0.120490 0.089462 0.215983 +v -0.120490 -0.000001 0.233778 +v -0.120490 -0.089464 0.215983 +v -0.120490 -0.165307 0.165306 +v -0.120490 -0.215983 0.089463 +v -0.120490 -0.233779 0.000000 +v -0.120490 -0.215983 -0.089462 +v -0.120490 -0.165307 -0.165305 +v -0.120490 -0.089464 -0.215982 +vt 0.947129 0.746039 +vt 0.741723 0.746039 +vt 0.741723 0.623557 +vt 0.947129 0.623557 +vt 0.947129 0.624268 +vt 0.741723 0.624268 +vt 0.741723 0.501786 +vt 0.947129 0.501786 +vt 0.947129 0.746750 +vt 0.741723 0.746750 +vt 0.741723 0.501075 +vt 0.947129 0.501075 +vt 0.741723 0.379304 +vt 0.947129 0.379304 +vt 0.741723 0.378593 +vt 0.947129 0.378593 +vt 0.741723 0.256823 +vt 0.947129 0.256822 +vt 0.741723 0.256111 +vt 0.947129 0.256111 +vt 0.741723 0.134341 +vt 0.947129 0.134341 +vt 0.741724 0.133629 +vt 0.947129 0.133630 +vt 0.741723 0.011859 +vt 0.947129 0.011859 +vt 0.741724 0.011147 +vt 0.947129 0.011148 +vt 0.947129 0.991002 +vt 0.741723 0.991002 +vt 0.741723 0.868520 +vt 0.947129 0.868520 +vt 0.947129 0.991714 +vt 0.741724 0.991714 +vt 0.741724 0.869232 +vt 0.947129 0.869232 +vt 0.633313 0.736984 +vt 0.655743 0.624222 +vt 0.698148 0.624222 +vt 0.672491 0.753212 +vt 0.569439 0.832578 +vt 0.599424 0.862564 +vt 0.473844 0.896453 +vt 0.490072 0.935631 +vt 0.361082 0.918882 +vt 0.361082 0.961288 +vt 0.248320 0.896452 +vt 0.232092 0.935631 +vt 0.152726 0.832578 +vt 0.122740 0.862564 +vt 0.088851 0.736983 +vt 0.049673 0.753212 +vt 0.066422 0.624222 +vt 0.024016 0.624222 +vt 0.088851 0.511460 +vt 0.049673 0.495232 +vt 0.152726 0.415866 +vt 0.122740 0.385880 +vt 0.248321 0.351991 +vt 0.232092 0.312813 +vt 0.361082 0.329561 +vt 0.361082 0.287155 +vt 0.473844 0.351991 +vt 0.490072 0.312813 +vt 0.569439 0.415866 +vt 0.599424 0.385880 +vt 0.633313 0.511460 +vt 0.672491 0.495232 +vt 0.361103 0.624263 +vt 0.633313 0.736984 +vt 0.672491 0.753212 +vt 0.698148 0.624222 +vt 0.655743 0.624222 +vt 0.569438 0.832578 +vt 0.599424 0.862564 +vt 0.473844 0.896453 +vt 0.490072 0.935631 +vt 0.361082 0.918882 +vt 0.361082 0.961288 +vt 0.248320 0.896452 +vt 0.232092 0.935631 +vt 0.152726 0.832578 +vt 0.122740 0.862564 +vt 0.088851 0.736983 +vt 0.049673 0.753212 +vt 0.066422 0.624222 +vt 0.024016 0.624222 +vt 0.088851 0.511460 +vt 0.049673 0.495232 +vt 0.152726 0.415865 +vt 0.122740 0.385880 +vt 0.248321 0.351991 +vt 0.232092 0.312813 +vt 0.361082 0.329561 +vt 0.361082 0.287155 +vt 0.473844 0.351991 +vt 0.490072 0.312813 +vt 0.569439 0.415865 +vt 0.599424 0.385880 +vt 0.633313 0.511460 +vt 0.672491 0.495232 +vt 0.361103 0.624263 +vn 0.0000 -0.5556 0.8315 +vn -0.0000 0.8315 -0.5556 +vn -0.0000 0.5556 -0.8315 +vn 0.0000 -0.8315 0.5556 +vn -0.0000 0.9808 -0.1951 +vn 0.0000 -0.9808 0.1951 +vn -0.0000 0.9808 0.1951 +vn 0.0000 -0.9808 -0.1951 +vn 0.0000 0.8315 0.5556 +vn -0.0000 -0.8315 -0.5556 +vn 0.0000 0.5556 0.8315 +vn -0.0000 -0.5556 -0.8315 +vn 0.0000 0.1951 0.9808 +vn -0.0000 -0.1951 -0.9808 +vn -0.0000 -0.1951 0.9808 +vn 0.7071 0.1379 -0.6935 +vn 0.7071 0.3928 -0.5879 +vn 0.7071 0.5879 -0.3928 +vn 0.7071 0.6935 -0.1379 +vn 0.7071 0.6935 0.1379 +vn 0.7071 0.5879 0.3928 +vn 0.7071 0.3928 0.5879 +vn 0.7071 0.1379 0.6935 +vn 0.7071 -0.1380 0.6935 +vn 0.7071 -0.3928 0.5879 +vn 0.7071 -0.5879 0.3928 +vn 0.7071 -0.6935 0.1379 +vn 0.7071 -0.6935 -0.1380 +vn 0.7071 -0.5879 -0.3928 +vn 0.7071 -0.3928 -0.5879 +vn 0.7071 -0.1379 -0.6935 +vn 1.0000 -0.0000 -0.0000 +vn -0.7071 0.1379 -0.6935 +vn -0.7071 0.3928 -0.5879 +vn -0.7071 0.5879 -0.3928 +vn -0.7071 0.6935 -0.1379 +vn -0.7071 0.6935 0.1379 +vn -0.7071 0.5879 0.3928 +vn -0.7071 0.3928 0.5879 +vn -0.7071 0.1379 0.6935 +vn -0.7071 -0.1379 0.6935 +vn -0.7071 -0.3928 0.5879 +vn -0.7071 -0.5879 0.3928 +vn -0.7071 -0.6935 0.1379 +vn -0.7071 -0.6935 -0.1379 +vn -0.7071 -0.5879 -0.3928 +vn -0.7071 -0.3928 -0.5879 +vn -0.7071 -0.1379 -0.6935 +vn -1.0000 0.0000 -0.0000 +vn -0.0000 0.1951 -0.9808 +usemtl Wheel_Mat.003 +s off +f 151/221/86 184/222/86 185/223/86 152/224/86 +f 143/225/87 176/226/87 177/227/87 144/228/87 +f 142/229/88 175/230/88 176/226/88 143/225/88 +f 152/224/89 185/223/89 186/231/89 153/232/89 +f 144/228/90 177/227/90 178/233/90 145/234/90 +f 153/232/91 186/231/91 187/235/91 154/236/91 +f 145/234/92 178/233/92 179/237/92 146/238/92 +f 154/236/93 187/235/93 188/239/93 155/240/93 +f 146/238/94 179/237/94 181/241/94 148/242/94 +f 155/240/95 188/239/95 189/243/95 156/244/95 +f 148/242/96 181/241/96 182/245/96 149/246/96 +f 156/244/97 189/243/97 190/247/97 157/248/97 +f 149/249/98 182/250/98 183/251/98 150/252/98 +f 157/253/99 190/254/99 174/255/99 141/256/99 +f 150/252/100 183/251/100 184/222/100 151/221/100 +f 158/257/101 159/258/101 141/259/101 142/260/101 +f 160/261/102 158/257/102 142/260/102 143/262/102 +f 161/263/103 160/261/103 143/262/103 144/264/103 +f 162/265/104 161/263/104 144/264/104 145/266/104 +f 163/267/105 162/265/105 145/266/105 146/268/105 +f 164/269/106 163/267/106 146/268/106 148/270/106 +f 165/271/107 164/269/107 148/270/107 149/272/107 +f 166/273/108 165/271/108 149/272/108 150/274/108 +f 167/275/109 166/273/109 150/274/109 151/276/109 +f 168/277/110 167/275/110 151/276/110 152/278/110 +f 169/279/111 168/277/111 152/278/111 153/280/111 +f 170/281/112 169/279/112 153/280/112 154/282/112 +f 171/283/113 170/281/113 154/282/113 155/284/113 +f 172/285/114 171/283/114 155/284/114 156/286/114 +f 173/287/115 172/285/115 156/286/115 157/288/115 +f 159/258/116 173/287/116 157/288/116 141/259/116 +f 147/289/117 159/258/117 158/257/117 +f 147/289/117 158/257/117 160/261/117 +f 147/289/117 160/261/117 161/263/117 +f 147/289/117 161/263/117 162/265/117 +f 147/289/117 162/265/117 163/267/117 +f 147/289/117 163/267/117 164/269/117 +f 147/289/117 164/269/117 165/271/117 +f 147/289/117 165/271/117 166/273/117 +f 147/289/117 166/273/117 167/275/117 +f 147/289/117 167/275/117 168/277/117 +f 147/289/117 168/277/117 169/279/117 +f 147/289/117 169/279/117 170/281/117 +f 147/289/117 170/281/117 171/283/117 +f 147/289/117 171/283/117 172/285/117 +f 147/289/117 172/285/117 173/287/117 +f 147/289/117 173/287/117 159/258/117 +f 191/290/118 175/291/118 174/292/118 192/293/118 +f 193/294/119 176/295/119 175/291/119 191/290/119 +f 194/296/120 177/297/120 176/295/120 193/294/120 +f 195/298/121 178/299/121 177/297/121 194/296/121 +f 196/300/122 179/301/122 178/299/122 195/298/122 +f 197/302/123 181/303/123 179/301/123 196/300/123 +f 198/304/124 182/305/124 181/303/124 197/302/124 +f 199/306/125 183/307/125 182/305/125 198/304/125 +f 200/308/126 184/309/126 183/307/126 199/306/126 +f 201/310/127 185/311/127 184/309/127 200/308/127 +f 202/312/128 186/313/128 185/311/128 201/310/128 +f 203/314/129 187/315/129 186/313/129 202/312/129 +f 204/316/130 188/317/130 187/315/130 203/314/130 +f 205/318/131 189/319/131 188/317/131 204/316/131 +f 206/320/132 190/321/132 189/319/132 205/318/132 +f 192/293/133 174/292/133 190/321/133 206/320/133 +f 180/322/134 191/290/134 192/293/134 +f 180/322/134 193/294/134 191/290/134 +f 180/322/134 194/296/134 193/294/134 +f 180/322/134 195/298/134 194/296/134 +f 180/322/134 196/300/134 195/298/134 +f 180/322/134 197/302/134 196/300/134 +f 180/322/134 198/304/134 197/302/134 +f 180/322/134 199/306/134 198/304/134 +f 180/322/134 200/308/134 199/306/134 +f 180/322/134 201/310/134 200/308/134 +f 180/322/134 202/312/134 201/310/134 +f 180/322/134 203/314/134 202/312/134 +f 180/322/134 204/316/134 203/314/134 +f 180/322/134 205/318/134 204/316/134 +f 180/322/134 206/320/134 205/318/134 +f 180/322/134 192/293/134 206/320/134 +f 141/256/135 174/255/135 175/230/135 142/229/135 diff --git a/resources/models/TestCarModel/CarW4.mtl b/resources/models/TestCarModel/CarW4.mtl new file mode 100644 index 0000000..84e6777 --- /dev/null +++ b/resources/models/TestCarModel/CarW4.mtl @@ -0,0 +1,24 @@ +# Blender MTL File: 'None' +# Material Count: 2 + +newmtl Car_Mat.004 +Ns 225.000000 +Ka 1.000000 1.000000 1.000000 +Kd 0.800000 0.800000 0.800000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.450000 +d 1.000000 +illum 2 +map_Kd Car_D.png + +newmtl Wheel_Mat.003 +Ns 225.000000 +Ka 1.000000 1.000000 1.000000 +Kd 0.800000 0.800000 0.800000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.450000 +d 1.000000 +illum 2 +map_Kd Wheel_D.png diff --git a/resources/models/TestCarModel/CarW4.obj b/resources/models/TestCarModel/CarW4.obj new file mode 100644 index 0000000..18ff86a --- /dev/null +++ b/resources/models/TestCarModel/CarW4.obj @@ -0,0 +1,1757 @@ +# Blender v3.0.1 OBJ File: '' +# www.blender.org +mtllib CarW4.mtl +o Car +v 0.720599 0.120248 1.844516 +v 0.720599 0.795532 0.791706 +v 0.720599 0.208166 -2.222051 +v 0.720599 0.764761 -2.239634 +v 0.816999 0.531554 -2.340739 +v 0.816999 0.608481 1.961007 +v 0.768799 0.278632 -2.257217 +v 0.768799 0.267643 1.955512 +v 0.720599 0.124491 -1.608386 +v 0.720599 0.847969 -1.608386 +v 0.816999 0.546005 -1.608386 +v 0.768799 0.253673 -1.608386 +v 0.524983 1.230951 0.157595 +v 0.524983 1.220088 -1.053709 +v 0.804739 0.456093 -1.582744 +v 0.821053 0.289344 -1.652224 +v 0.768799 0.253673 -1.643797 +v 0.875625 0.422819 -1.612216 +v 0.831926 0.315006 -2.409540 +v 0.862813 0.429216 -2.442026 +v 0.792215 0.415037 1.961007 +v 0.812756 0.273829 1.718490 +v 0.814049 0.274246 2.024673 +v 0.865101 0.402070 2.049368 +v 0.865196 0.402138 1.693623 +v 0.785364 0.694065 1.661985 +v 0.720599 0.121494 0.797446 +v 0.816999 0.587880 0.797446 +v 0.768799 0.263885 0.797446 +v 0.768799 0.267643 1.699979 +v 0.792215 0.415037 1.672117 +v 0.768799 0.267643 1.955512 +v 0.804739 0.465590 -2.318760 +v 0.768799 0.278632 -2.257217 +v -0.720599 0.120248 1.844516 +v -0.720599 0.795532 0.791706 +v -0.720599 0.208166 -2.222051 +v -0.720599 0.764761 -2.239634 +v -0.816999 0.531554 -2.340739 +v -0.816999 0.608481 1.961007 +v -0.768799 0.278632 -2.257217 +v -0.768799 0.267643 1.955512 +v -0.720599 0.124491 -1.608386 +v -0.720599 0.847969 -1.608386 +v -0.816999 0.546005 -1.608386 +v -0.768799 0.253673 -1.608386 +v -0.524983 1.230951 0.157595 +v -0.524983 1.220088 -1.053709 +v -0.785364 0.694065 1.661985 +v -0.720599 0.121494 0.797446 +v -0.816999 0.587880 0.797446 +v -0.768799 0.263885 0.797446 +v -0.768799 0.253673 -1.643797 +v -0.804739 0.456093 -1.582744 +v -0.768799 0.278632 -2.257217 +v -0.804739 0.465590 -2.318760 +v -0.792215 0.415037 1.961007 +v -0.768799 0.267643 1.955512 +v -0.792215 0.415037 1.672117 +v -0.768799 0.267643 1.699979 +v -0.865196 0.402138 1.693623 +v -0.865101 0.402070 2.049368 +v -0.814049 0.274246 2.024673 +v -0.812756 0.273829 1.718490 +v -0.862813 0.429216 -2.442026 +v -0.831926 0.315006 -2.409540 +v -0.875625 0.422819 -1.612216 +v -0.821053 0.289344 -1.652224 +v 0.342953 0.186680 -2.044414 +v 0.342953 0.236359 -2.094094 +v 0.336226 0.130409 -2.313623 +v 0.336226 0.220051 -2.313623 +v 0.391720 0.186680 -2.044414 +v 0.391720 0.236359 -2.094094 +v 0.398447 0.130409 -2.313623 +v 0.398447 0.220051 -2.313623 +v 0.321473 0.211520 -2.069254 +v 0.308818 0.175230 -2.313623 +v 0.425855 0.175230 -2.313623 +v 0.413200 0.211520 -2.069254 +v -0.134659 0.163445 -2.384536 +v 0.139205 0.163445 -2.384536 +v -0.134659 0.305252 -2.367821 +v 0.139205 0.305252 -2.367821 +v 0.463733 0.186680 -2.044414 +v 0.463733 0.236359 -2.094094 +v 0.457006 0.130409 -2.313623 +v 0.457006 0.220051 -2.313623 +v 0.512500 0.186680 -2.044414 +v 0.512500 0.236359 -2.094094 +v 0.519227 0.130409 -2.313623 +v 0.519227 0.220051 -2.313623 +v 0.442253 0.211520 -2.069254 +v 0.429598 0.175230 -2.313623 +v 0.546635 0.175230 -2.313623 +v 0.533980 0.211520 -2.069254 +v 0.139205 0.129282 2.011389 +v -0.134659 0.129282 2.011389 +v 0.139205 0.271089 1.994674 +v -0.134659 0.271089 1.994674 +v 0.750976 0.693681 1.611929 +v 0.768656 0.684330 1.611929 +v 0.750976 0.693681 1.571301 +v 0.768656 0.684330 1.571301 +v 0.783383 0.754953 1.571301 +v 0.783383 0.754953 1.611929 +v 0.801062 0.745602 1.611929 +v 0.801062 0.745602 1.571301 +v 0.738400 0.728982 1.522239 +v 0.870984 0.730024 1.477306 +v 0.743935 0.811435 1.504502 +v 0.867491 0.814561 1.460912 +v 0.785944 0.767567 1.610298 +v 0.780167 0.745820 1.622443 +v 0.827988 0.745820 1.622443 +v 0.822211 0.767567 1.610298 +v 0.754070 0.808247 1.570121 +v 0.850502 0.808247 1.570121 +v 0.853668 0.727396 1.590619 +v 0.750904 0.727396 1.590619 +v -0.750976 0.693681 1.611929 +v -0.768656 0.684330 1.611929 +v -0.750976 0.693681 1.571301 +v -0.768656 0.684330 1.571301 +v -0.783383 0.754953 1.571301 +v -0.783383 0.754953 1.611929 +v -0.801062 0.745602 1.611929 +v -0.801062 0.745602 1.571301 +v -0.738400 0.728982 1.522239 +v -0.870984 0.730024 1.477306 +v -0.743935 0.811435 1.504502 +v -0.867491 0.814561 1.460912 +v -0.785944 0.767567 1.610298 +v -0.780167 0.745820 1.622443 +v -0.827988 0.745820 1.622443 +v -0.822211 0.767567 1.610298 +v -0.754070 0.808247 1.570121 +v -0.850502 0.808247 1.570121 +v -0.853668 0.727396 1.590619 +v -0.750904 0.727396 1.590619 +vt 0.436693 0.306027 +vt 0.179266 0.306027 +vt 0.167697 0.149524 +vt 0.448261 0.149524 +vt 0.179266 0.892833 +vt 0.179266 0.779104 +vt 0.436693 0.779103 +vt 0.436693 0.892832 +vt 0.162046 0.093968 +vt 0.453912 0.093968 +vt 0.487887 0.330820 +vt 0.476057 0.759465 +vt 0.401752 0.659796 +vt 0.401752 0.443424 +vt 0.585618 0.760329 +vt 0.580273 0.876189 +vt 0.534190 0.890735 +vt 0.532682 0.759902 +vt 0.972153 0.049703 +vt 0.972153 0.024178 +vt 0.960495 0.031508 +vt 0.960495 0.049434 +vt 0.528774 0.330061 +vt 0.587266 0.330539 +vt 0.489260 0.872387 +vt 0.179266 0.000122 +vt 0.436693 0.000122 +vt 0.445302 0.033080 +vt 0.170656 0.033079 +vt 0.162047 0.938235 +vt 0.453912 0.938234 +vt 0.445303 0.985811 +vt 0.170656 0.985811 +vt 0.595606 0.870132 +vt 0.610248 0.760496 +vt 0.214207 0.659796 +vt 0.214207 0.443424 +vt 0.526857 0.125972 +vt 0.588308 0.125972 +vt 0.659294 0.344943 +vt 0.967005 0.344943 +vt 0.967005 0.121383 +vt 0.659294 0.121383 +vt 0.967005 0.858614 +vt 0.659294 0.858614 +vt 0.659294 0.990850 +vt 0.967005 0.990850 +vt 0.614109 0.330754 +vt 0.436693 0.999878 +vt 0.179266 0.999878 +vt 0.510169 0.175530 +vt 0.615836 0.143795 +vt 0.588997 0.067144 +vt 0.600150 0.049434 +vt 0.496919 0.049434 +vt 0.508342 0.067144 +vt 0.915677 0.081571 +vt 0.857127 0.081571 +vt 0.857127 0.098288 +vt 0.915677 0.098288 +vt 0.508342 0.015710 +vt 0.496919 0.031508 +vt 0.600150 0.031508 +vt 0.588997 0.015710 +vt 0.128071 0.330820 +vt 0.139902 0.759465 +vt 0.030341 0.760330 +vt 0.083277 0.759903 +vt 0.081769 0.890735 +vt 0.035686 0.876189 +vt 0.869130 0.067144 +vt 0.948828 0.067144 +vt 0.857265 0.049434 +vt 0.028692 0.330539 +vt 0.087184 0.330061 +vt 0.126699 0.872387 +vt 0.857265 0.031508 +vt 0.551818 0.113576 +vt 0.588997 0.113576 +vt 0.601300 0.098288 +vt 0.542751 0.098288 +vt 0.020353 0.870132 +vt 0.005711 0.760497 +vt 0.926240 0.081571 +vt 0.926240 0.098288 +vt 0.027650 0.125972 +vt 0.089101 0.125972 +vt 0.869130 0.067337 +vt 0.906609 0.067337 +vt 0.613913 0.067144 +vt 0.845239 0.067144 +vt 0.948828 0.015710 +vt 0.869130 0.015710 +vt 0.845239 0.113576 +vt 0.613913 0.113576 +vt 0.588997 0.067337 +vt 0.551818 0.067337 +vt 0.542751 0.081571 +vt 0.601300 0.081571 +vt 0.532187 0.081571 +vt 0.532187 0.098288 +vt 0.613913 0.015710 +vt 0.845239 0.015710 +vt 0.485261 0.049703 +vt 0.485261 0.024178 +vt 0.001849 0.330754 +vt 0.105790 0.175530 +vt 0.845239 0.067337 +vt 0.613913 0.067337 +vt 0.000122 0.143795 +vt 0.906609 0.113576 +vt 0.869130 0.113576 +vt 0.071024 0.945341 +vt 0.071024 0.957018 +vt 0.018519 0.958112 +vt 0.018447 0.946026 +vt 0.123572 0.953127 +vt 0.114027 0.970234 +vt 0.092357 0.970234 +vt 0.082812 0.953127 +vt 0.018376 0.958077 +vt 0.018447 0.972578 +vt 0.071024 0.972175 +vt 0.071024 0.957018 +vt 0.018447 0.933839 +vt 0.018447 0.946026 +vt 0.071024 0.945341 +vt 0.071024 0.933882 +vt 0.114027 0.936020 +vt 0.092357 0.936020 +vt 0.604256 0.934001 +vt 0.604256 0.987921 +vt 0.501948 0.987921 +vt 0.501948 0.934002 +vt 0.071024 0.945341 +vt 0.071024 0.957018 +vt 0.018519 0.958112 +vt 0.018447 0.946026 +vt 0.123572 0.953127 +vt 0.114027 0.970234 +vt 0.092357 0.970234 +vt 0.082812 0.953127 +vt 0.018376 0.958077 +vt 0.018447 0.972578 +vt 0.071024 0.972175 +vt 0.071024 0.957018 +vt 0.018447 0.933839 +vt 0.018447 0.946026 +vt 0.071024 0.945341 +vt 0.071024 0.933882 +vt 0.114027 0.936020 +vt 0.092357 0.936020 +vt 0.604256 0.934001 +vt 0.604256 0.987921 +vt 0.501948 0.987921 +vt 0.501948 0.934002 +vt 0.041864 0.111980 +vt 0.030565 0.111980 +vt 0.030565 0.072822 +vt 0.041864 0.072822 +vt 0.074791 0.111980 +vt 0.064816 0.111980 +vt 0.064816 0.072822 +vt 0.074791 0.072822 +vt 0.007613 0.111980 +vt 0.007613 0.072822 +vt 0.116674 0.041668 +vt 0.116674 0.067181 +vt 0.081917 0.067181 +vt 0.081917 0.041668 +vt 0.104737 0.009901 +vt 0.092631 0.009901 +vt 0.093678 0.002772 +vt 0.104057 0.002772 +vt 0.081917 0.097338 +vt 0.116674 0.097338 +vt 0.104737 0.114104 +vt 0.092631 0.114104 +vt 0.116674 0.020619 +vt 0.081917 0.020619 +vt 0.040348 0.041668 +vt 0.040121 0.067181 +vt 0.027195 0.058006 +vt 0.027195 0.050334 +vt 0.135528 0.067181 +vt 0.135528 0.041668 +vt 0.150281 0.050334 +vt 0.150281 0.058006 +vt 0.041864 0.111980 +vt 0.041864 0.072822 +vt 0.030565 0.072822 +vt 0.030565 0.111980 +vt 0.074791 0.111980 +vt 0.074791 0.072822 +vt 0.064816 0.072822 +vt 0.064816 0.111980 +vt 0.007613 0.072822 +vt 0.007613 0.111980 +vt 0.116674 0.041668 +vt 0.081917 0.041668 +vt 0.081917 0.067181 +vt 0.116674 0.067181 +vt 0.104737 0.009901 +vt 0.104057 0.002772 +vt 0.093678 0.002772 +vt 0.092631 0.009901 +vt 0.081917 0.097338 +vt 0.092631 0.114104 +vt 0.104737 0.114104 +vt 0.116674 0.097338 +vt 0.116674 0.020619 +vt 0.081917 0.020619 +vt 0.040348 0.041668 +vt 0.027195 0.050334 +vt 0.027195 0.058006 +vt 0.040121 0.067181 +vt 0.135528 0.067181 +vt 0.150281 0.058006 +vt 0.150281 0.050334 +vt 0.135528 0.041668 +vn 0.0000 0.9933 0.1158 +vn 0.0000 0.9914 -0.1307 +vn 0.0000 0.9614 0.2752 +vn 0.8997 0.4364 0.0050 +vn 0.9847 -0.1743 -0.0013 +vn 0.2822 -0.3453 0.8950 +vn 0.9880 -0.1545 0.0017 +vn 0.9353 0.3539 0.0008 +vn 0.9390 0.3429 -0.0246 +vn 0.0000 -0.6016 0.7988 +vn 0.0000 -0.3136 -0.9496 +vn 0.8972 -0.4399 -0.0379 +vn 0.0000 1.0000 -0.0090 +vn 0.9896 -0.1435 0.0015 +vn 0.0000 0.8244 0.5661 +vn 0.0000 -1.0000 -0.0012 +vn 0.0000 0.3978 -0.9175 +vn 0.0000 -0.9908 -0.1351 +vn 0.0000 -0.0161 0.9999 +vn 0.9424 -0.3345 0.0005 +vn 0.0000 -0.4465 -0.8948 +vn 0.9216 0.3879 -0.0139 +vn 0.9488 -0.3158 0.0004 +vn -0.4797 0.8774 0.0050 +vn -0.9272 -0.3746 -0.0015 +vn -0.5011 -0.8649 -0.0280 +vn -0.8997 0.4364 0.0050 +vn -0.9847 -0.1743 -0.0013 +vn 0.4797 0.8774 0.0050 +vn -0.9880 -0.1545 0.0017 +vn -0.9353 0.3539 0.0008 +vn -0.9390 0.3429 -0.0246 +vn 0.0000 -0.2736 -0.9618 +vn 0.1745 0.9847 0.0001 +vn -0.8972 -0.4399 -0.0379 +vn -0.2995 -0.2581 -0.9185 +vn -0.9896 -0.1435 0.0015 +vn -0.1415 -0.9899 0.0004 +vn 0.0000 0.9591 -0.2830 +vn 0.5011 -0.8649 -0.0280 +vn -0.9454 -0.3259 -0.0077 +vn 0.0000 0.9894 0.1452 +vn 0.1415 -0.9899 0.0004 +vn 0.2995 -0.2581 -0.9185 +vn 0.0000 -0.9727 -0.2323 +vn -0.2822 -0.3453 0.8950 +vn -0.9424 -0.3345 0.0005 +vn 0.9454 -0.3259 -0.0077 +vn -0.9216 0.3879 -0.0139 +vn 0.0000 -0.1897 0.9818 +vn 0.9272 -0.3746 -0.0015 +vn 0.0000 -0.9955 0.0950 +vn -0.9488 -0.3158 0.0004 +vn 0.0000 0.8304 -0.5571 +vn -0.1745 0.9847 0.0001 +vn -0.8232 0.5670 -0.0299 +vn 0.0000 0.0000 -1.0000 +vn 0.8232 0.5670 -0.0299 +vn 0.0000 -0.9788 0.2046 +vn 0.0000 0.9973 -0.0741 +vn 0.8327 -0.5386 0.1285 +vn -0.8327 -0.5386 0.1285 +vn 0.0000 0.1171 -0.9931 +vn 0.0000 0.1171 0.9931 +vn 0.0000 0.0000 1.0000 +vn 0.8840 -0.4675 0.0000 +vn -0.8840 0.4675 0.0000 +vn -0.3182 -0.1861 -0.9296 +vn 0.0000 0.4876 0.8731 +vn 0.0000 0.7027 0.7115 +vn 0.0000 -0.8654 0.5010 +vn 0.7308 0.2640 0.6294 +vn -0.6899 0.2734 0.6703 +vn -0.9813 0.0919 0.1691 +vn 0.9851 0.0742 0.1549 +vn -0.0000 -0.9997 -0.0232 +vn -0.0035 0.9985 0.0541 +vn -0.8840 -0.4675 0.0000 +vn 0.8840 0.4675 0.0000 +vn 0.3182 -0.1861 -0.9296 +vn -0.7308 0.2640 0.6294 +vn 0.6899 0.2734 0.6703 +vn 0.9813 0.0919 0.1691 +vn -0.9851 0.0742 0.1549 +vn 0.0035 0.9985 0.0541 +usemtl Car_Mat.004 +s off +f 2/1/1 36/2/1 49/3/1 26/4/1 +f 38/5/2 44/6/2 10/7/2 4/8/2 +f 40/9/3 6/10/3 26/4/3 49/3/3 +f 2/11/4 10/12/4 14/13/4 13/14/4 +f 12/15/5 7/16/5 5/17/5 11/18/5 +f 15/19/6 17/20/6 16/21/6 18/22/6 +f 12/15/7 11/18/7 28/23/7 29/24/7 +f 11/18/8 10/12/8 2/11/8 28/23/8 +f 5/17/9 4/25/9 10/12/9 11/18/9 +f 35/26/10 1/27/10 8/28/10 42/29/10 +f 39/30/11 5/31/11 7/32/11 41/33/11 +f 3/34/12 7/16/12 12/15/12 9/35/12 +f 14/13/13 48/36/13 47/37/13 13/14/13 +f 29/24/14 28/23/14 6/38/14 8/39/14 +f 13/14/15 47/37/15 36/2/15 2/1/15 +f 50/40/16 27/41/16 1/42/16 35/43/16 +f 5/31/17 39/30/17 38/5/17 4/8/17 +f 9/44/18 43/45/18 37/46/18 3/47/18 +f 27/41/16 50/40/16 43/45/16 9/44/16 +f 6/10/19 40/9/19 42/29/19 8/28/19 +f 9/35/20 12/15/20 29/24/20 27/48/20 +f 3/49/21 37/50/21 41/33/21 7/32/21 +f 28/23/22 2/11/22 26/51/22 6/38/22 +f 8/39/23 1/52/23 27/48/23 29/24/23 +f 56/53/24 65/54/24 67/55/24 54/56/24 +f 64/57/25 63/58/25 62/59/25 61/60/25 +f 53/61/26 68/62/26 66/63/26 55/64/26 +f 36/65/27 47/37/27 48/36/27 44/66/27 +f 46/67/28 45/68/28 39/69/28 41/70/28 +f 33/71/29 15/72/29 18/22/29 20/73/29 +f 46/67/30 52/74/30 51/75/30 45/68/30 +f 45/68/31 51/75/31 36/65/31 44/66/31 +f 39/69/32 45/68/32 44/66/32 38/76/32 +f 19/77/33 66/63/33 65/54/33 20/73/33 +f 31/78/34 21/79/34 24/80/34 25/81/34 +f 37/82/35 43/83/35 46/67/35 41/70/35 +f 60/84/36 64/57/36 61/60/36 59/85/36 +f 52/74/37 42/86/37 40/87/37 51/75/37 +f 58/88/38 63/58/38 64/57/38 60/89/38 +f 20/73/39 65/54/39 56/90/39 33/91/39 +f 17/92/40 34/93/40 19/77/40 16/21/40 +f 66/63/41 68/62/41 67/55/41 65/54/41 +f 57/94/42 62/59/42 24/80/42 21/95/42 +f 32/96/43 30/97/43 22/98/43 23/99/43 +f 30/100/44 31/101/44 25/81/44 22/98/44 +f 55/102/45 66/63/45 19/77/45 34/103/45 +f 54/104/46 67/55/46 68/62/46 53/105/46 +f 43/83/47 50/106/47 52/74/47 46/67/47 +f 19/77/48 20/73/48 18/22/48 16/21/48 +f 51/75/49 40/87/49 49/107/49 36/65/49 +f 63/58/50 23/99/50 24/80/50 62/59/50 +f 22/98/51 25/81/51 24/80/51 23/99/51 +f 23/99/52 63/58/52 58/108/52 32/109/52 +f 42/86/53 52/74/53 50/106/53 35/110/53 +f 44/6/54 48/36/54 14/13/54 10/7/54 +f 59/111/55 61/60/55 62/59/55 57/112/55 +f 77/113/56 70/114/56 72/115/56 78/116/56 +f 78/117/57 72/118/57 76/119/57 79/120/57 +f 79/121/58 76/122/58 74/123/58 80/124/58 +f 71/125/59 75/126/59 73/127/59 69/128/59 +f 76/122/60 72/115/60 70/114/60 74/123/60 +f 75/126/61 79/121/61 80/124/61 73/127/61 +f 71/129/57 78/117/57 79/120/57 75/130/57 +f 69/128/62 77/113/62 78/116/62 71/125/62 +f 81/131/63 83/132/63 84/133/63 82/134/63 +f 93/135/56 86/136/56 88/137/56 94/138/56 +f 94/139/57 88/140/57 92/141/57 95/142/57 +f 95/143/58 92/144/58 90/145/58 96/146/58 +f 87/147/59 91/148/59 89/149/59 85/150/59 +f 92/144/60 88/137/60 86/136/60 90/145/60 +f 91/148/61 95/143/61 96/146/61 89/149/61 +f 87/151/57 94/139/57 95/142/57 91/152/57 +f 85/150/62 93/135/62 94/138/62 87/147/62 +f 97/153/64 99/154/64 100/155/64 98/156/64 +f 104/157/57 103/158/57 105/159/57 108/160/57 +f 101/161/65 102/162/65 107/163/65 106/164/65 +f 102/162/66 104/157/66 108/160/66 107/163/66 +f 103/158/67 101/165/67 106/166/67 105/159/67 +f 109/167/68 111/168/68 112/169/68 110/170/68 +f 114/171/69 115/172/69 116/173/69 113/174/69 +f 118/175/70 117/176/70 113/177/70 116/178/70 +f 120/179/71 119/180/71 115/172/71 114/171/71 +f 119/181/72 118/182/72 116/183/72 115/184/72 +f 117/185/73 120/186/73 114/187/73 113/188/73 +f 111/168/74 109/167/74 120/186/74 117/185/74 +f 110/170/75 112/169/75 118/182/75 119/181/75 +f 109/167/76 110/170/76 119/180/76 120/179/76 +f 112/169/77 111/168/77 117/176/77 118/175/77 +f 124/189/57 128/190/57 125/191/57 123/192/57 +f 121/193/65 126/194/65 127/195/65 122/196/65 +f 122/196/78 127/195/78 128/190/78 124/189/78 +f 123/192/79 125/191/79 126/197/79 121/198/79 +f 129/199/80 130/200/80 132/201/80 131/202/80 +f 134/203/69 133/204/69 136/205/69 135/206/69 +f 138/207/70 136/208/70 133/209/70 137/210/70 +f 140/211/71 134/203/71 135/206/71 139/212/71 +f 139/213/81 135/214/81 136/215/81 138/216/81 +f 137/217/82 133/218/82 134/219/82 140/220/82 +f 131/202/83 137/217/83 140/220/83 129/199/83 +f 130/200/84 139/213/84 138/216/84 132/201/84 +f 129/199/76 140/211/76 139/212/76 130/200/76 +f 132/201/85 138/207/85 137/210/85 131/202/85 +o Wheel.FL +v 0.870577 0.264787 1.023545 +v 0.870577 0.367124 1.043902 +v 0.870577 0.453882 1.101871 +v 0.870577 0.511852 1.188629 +v 0.870577 0.532208 1.290967 +v 0.870577 0.511852 1.393305 +v 0.903574 0.264819 1.290950 +v 0.870577 0.453882 1.480062 +v 0.870577 0.367124 1.538032 +v 0.870577 0.264787 1.558388 +v 0.870577 0.162449 1.538032 +v 0.870577 0.075691 1.480062 +v 0.870577 0.017721 1.393305 +v 0.870577 -0.002635 1.290967 +v 0.870577 0.017721 1.188629 +v 0.870577 0.075691 1.101871 +v 0.870577 0.162449 1.043902 +v 0.903574 0.354249 1.074985 +v 0.903574 0.264787 1.057189 +v 0.903574 0.430092 1.125661 +v 0.903574 0.480769 1.201504 +v 0.903574 0.498564 1.290967 +v 0.903574 0.480769 1.380430 +v 0.903574 0.430092 1.456273 +v 0.903574 0.354249 1.506949 +v 0.903574 0.264787 1.524744 +v 0.903574 0.175324 1.506949 +v 0.903574 0.099481 1.456273 +v 0.903574 0.048804 1.380430 +v 0.903574 0.031009 1.290967 +v 0.903574 0.048804 1.201504 +v 0.903574 0.099481 1.125661 +v 0.903574 0.175324 1.074985 +v 0.695591 0.264787 1.023545 +v 0.695591 0.367124 1.043902 +v 0.695591 0.453882 1.101871 +v 0.695591 0.511852 1.188629 +v 0.695591 0.532208 1.290967 +v 0.695591 0.511852 1.393305 +v 0.662593 0.264819 1.290950 +v 0.695591 0.453882 1.480062 +v 0.695591 0.367124 1.538032 +v 0.695591 0.264787 1.558388 +v 0.695591 0.162449 1.538032 +v 0.695591 0.075691 1.480062 +v 0.695591 0.017721 1.393305 +v 0.695591 -0.002635 1.290967 +v 0.695591 0.017721 1.188629 +v 0.695591 0.075691 1.101871 +v 0.695591 0.162449 1.043902 +v 0.662594 0.354249 1.074985 +v 0.662593 0.264787 1.057189 +v 0.662594 0.430092 1.125661 +v 0.662594 0.480769 1.201504 +v 0.662594 0.498564 1.290967 +v 0.662594 0.480769 1.380430 +v 0.662594 0.430092 1.456273 +v 0.662594 0.354249 1.506949 +v 0.662594 0.264787 1.524745 +v 0.662594 0.175324 1.506949 +v 0.662594 0.099481 1.456273 +v 0.662594 0.048804 1.380430 +v 0.662594 0.031009 1.290967 +v 0.662594 0.048804 1.201504 +v 0.662593 0.099481 1.125661 +v 0.662593 0.175324 1.074985 +vt 0.947129 0.746039 +vt 0.741723 0.746039 +vt 0.741723 0.623557 +vt 0.947129 0.623557 +vt 0.947129 0.624268 +vt 0.741723 0.624268 +vt 0.741723 0.501786 +vt 0.947129 0.501786 +vt 0.947129 0.746750 +vt 0.741723 0.746750 +vt 0.741723 0.501075 +vt 0.947129 0.501075 +vt 0.741723 0.379304 +vt 0.947129 0.379304 +vt 0.741723 0.378593 +vt 0.947129 0.378593 +vt 0.741723 0.256823 +vt 0.947129 0.256822 +vt 0.741723 0.256111 +vt 0.947129 0.256111 +vt 0.741723 0.134341 +vt 0.947129 0.134341 +vt 0.741724 0.133629 +vt 0.947129 0.133630 +vt 0.741723 0.011859 +vt 0.947129 0.011859 +vt 0.741724 0.011147 +vt 0.947129 0.011148 +vt 0.947129 0.991002 +vt 0.741723 0.991002 +vt 0.741723 0.868520 +vt 0.947129 0.868520 +vt 0.947129 0.991714 +vt 0.741724 0.991714 +vt 0.741724 0.869232 +vt 0.947129 0.869232 +vt 0.633313 0.736984 +vt 0.655743 0.624222 +vt 0.698148 0.624222 +vt 0.672491 0.753212 +vt 0.569439 0.832578 +vt 0.599424 0.862564 +vt 0.473844 0.896453 +vt 0.490072 0.935631 +vt 0.361082 0.918882 +vt 0.361082 0.961288 +vt 0.248320 0.896452 +vt 0.232092 0.935631 +vt 0.152726 0.832578 +vt 0.122740 0.862564 +vt 0.088851 0.736983 +vt 0.049673 0.753212 +vt 0.066422 0.624222 +vt 0.024016 0.624222 +vt 0.088851 0.511460 +vt 0.049673 0.495232 +vt 0.152726 0.415866 +vt 0.122740 0.385880 +vt 0.248321 0.351991 +vt 0.232092 0.312813 +vt 0.361082 0.329561 +vt 0.361082 0.287155 +vt 0.473844 0.351991 +vt 0.490072 0.312813 +vt 0.569439 0.415866 +vt 0.599424 0.385880 +vt 0.633313 0.511460 +vt 0.672491 0.495232 +vt 0.361103 0.624263 +vt 0.633313 0.736984 +vt 0.672491 0.753212 +vt 0.698148 0.624222 +vt 0.655743 0.624222 +vt 0.569438 0.832578 +vt 0.599424 0.862564 +vt 0.473844 0.896453 +vt 0.490072 0.935631 +vt 0.361082 0.918882 +vt 0.361082 0.961288 +vt 0.248320 0.896452 +vt 0.232092 0.935631 +vt 0.152726 0.832578 +vt 0.122740 0.862564 +vt 0.088851 0.736983 +vt 0.049673 0.753212 +vt 0.066422 0.624222 +vt 0.024016 0.624222 +vt 0.088851 0.511460 +vt 0.049673 0.495232 +vt 0.152726 0.415865 +vt 0.122740 0.385880 +vt 0.248321 0.351991 +vt 0.232092 0.312813 +vt 0.361082 0.329561 +vt 0.361082 0.287155 +vt 0.473844 0.351991 +vt 0.490072 0.312813 +vt 0.569439 0.415865 +vt 0.599424 0.385880 +vt 0.633313 0.511460 +vt 0.672491 0.495232 +vt 0.361103 0.624263 +vn -0.0000 -0.5556 0.8315 +vn -0.0000 0.8315 -0.5556 +vn 0.0000 0.5556 -0.8315 +vn 0.0000 -0.8315 0.5556 +vn 0.0000 0.9808 -0.1951 +vn 0.0000 -0.9808 0.1951 +vn 0.0000 0.9808 0.1951 +vn 0.0000 -0.9808 -0.1951 +vn 0.0000 0.8315 0.5556 +vn -0.0000 -0.8315 -0.5556 +vn 0.0000 0.5556 0.8315 +vn 0.0000 -0.5556 -0.8315 +vn 0.0000 0.1951 0.9808 +vn 0.0000 -0.1951 -0.9808 +vn 0.0000 -0.1951 0.9808 +vn 0.7071 0.1379 -0.6935 +vn 0.7071 0.3928 -0.5879 +vn 0.7071 0.5879 -0.3928 +vn 0.7071 0.6935 -0.1379 +vn 0.7071 0.6935 0.1379 +vn 0.7071 0.5879 0.3928 +vn 0.7071 0.3928 0.5879 +vn 0.7071 0.1379 0.6935 +vn 0.7071 -0.1379 0.6935 +vn 0.7071 -0.3928 0.5879 +vn 0.7071 -0.5879 0.3928 +vn 0.7071 -0.6935 0.1379 +vn 0.7071 -0.6935 -0.1379 +vn 0.7071 -0.5879 -0.3928 +vn 0.7071 -0.3928 -0.5879 +vn 0.7071 -0.1380 -0.6935 +vn 1.0000 0.0000 -0.0000 +vn -0.7071 0.1380 -0.6935 +vn -0.7071 0.3928 -0.5879 +vn -0.7071 0.5879 -0.3928 +vn -0.7071 0.6935 -0.1379 +vn -0.7071 0.6935 0.1380 +vn -0.7071 0.5879 0.3928 +vn -0.7071 0.3928 0.5879 +vn -0.7071 0.1379 0.6935 +vn -0.7071 -0.1379 0.6935 +vn -0.7071 -0.3928 0.5879 +vn -0.7071 -0.5879 0.3928 +vn -0.7071 -0.6935 0.1379 +vn -0.7071 -0.6935 -0.1379 +vn -0.7071 -0.5879 -0.3928 +vn -0.7071 -0.3928 -0.5879 +vn -0.7071 -0.1380 -0.6935 +vn -1.0000 0.0000 -0.0000 +vn 0.0000 0.1951 -0.9808 +usemtl Wheel_Mat.003 +s off +f 151/221/86 184/222/86 185/223/86 152/224/86 +f 143/225/87 176/226/87 177/227/87 144/228/87 +f 142/229/88 175/230/88 176/226/88 143/225/88 +f 152/224/89 185/223/89 186/231/89 153/232/89 +f 144/228/90 177/227/90 178/233/90 145/234/90 +f 153/232/91 186/231/91 187/235/91 154/236/91 +f 145/234/92 178/233/92 179/237/92 146/238/92 +f 154/236/93 187/235/93 188/239/93 155/240/93 +f 146/238/94 179/237/94 181/241/94 148/242/94 +f 155/240/95 188/239/95 189/243/95 156/244/95 +f 148/242/96 181/241/96 182/245/96 149/246/96 +f 156/244/97 189/243/97 190/247/97 157/248/97 +f 149/249/98 182/250/98 183/251/98 150/252/98 +f 157/253/99 190/254/99 174/255/99 141/256/99 +f 150/252/100 183/251/100 184/222/100 151/221/100 +f 158/257/101 159/258/101 141/259/101 142/260/101 +f 160/261/102 158/257/102 142/260/102 143/262/102 +f 161/263/103 160/261/103 143/262/103 144/264/103 +f 162/265/104 161/263/104 144/264/104 145/266/104 +f 163/267/105 162/265/105 145/266/105 146/268/105 +f 164/269/106 163/267/106 146/268/106 148/270/106 +f 165/271/107 164/269/107 148/270/107 149/272/107 +f 166/273/108 165/271/108 149/272/108 150/274/108 +f 167/275/109 166/273/109 150/274/109 151/276/109 +f 168/277/110 167/275/110 151/276/110 152/278/110 +f 169/279/111 168/277/111 152/278/111 153/280/111 +f 170/281/112 169/279/112 153/280/112 154/282/112 +f 171/283/113 170/281/113 154/282/113 155/284/113 +f 172/285/114 171/283/114 155/284/114 156/286/114 +f 173/287/115 172/285/115 156/286/115 157/288/115 +f 159/258/116 173/287/116 157/288/116 141/259/116 +f 147/289/117 159/258/117 158/257/117 +f 147/289/117 158/257/117 160/261/117 +f 147/289/117 160/261/117 161/263/117 +f 147/289/117 161/263/117 162/265/117 +f 147/289/117 162/265/117 163/267/117 +f 147/289/117 163/267/117 164/269/117 +f 147/289/117 164/269/117 165/271/117 +f 147/289/117 165/271/117 166/273/117 +f 147/289/117 166/273/117 167/275/117 +f 147/289/117 167/275/117 168/277/117 +f 147/289/117 168/277/117 169/279/117 +f 147/289/117 169/279/117 170/281/117 +f 147/289/117 170/281/117 171/283/117 +f 147/289/117 171/283/117 172/285/117 +f 147/289/117 172/285/117 173/287/117 +f 147/289/117 173/287/117 159/258/117 +f 191/290/118 175/291/118 174/292/118 192/293/118 +f 193/294/119 176/295/119 175/291/119 191/290/119 +f 194/296/120 177/297/120 176/295/120 193/294/120 +f 195/298/121 178/299/121 177/297/121 194/296/121 +f 196/300/122 179/301/122 178/299/122 195/298/122 +f 197/302/123 181/303/123 179/301/123 196/300/123 +f 198/304/124 182/305/124 181/303/124 197/302/124 +f 199/306/125 183/307/125 182/305/125 198/304/125 +f 200/308/126 184/309/126 183/307/126 199/306/126 +f 201/310/127 185/311/127 184/309/127 200/308/127 +f 202/312/128 186/313/128 185/311/128 201/310/128 +f 203/314/129 187/315/129 186/313/129 202/312/129 +f 204/316/130 188/317/130 187/315/130 203/314/130 +f 205/318/131 189/319/131 188/317/131 204/316/131 +f 206/320/132 190/321/132 189/319/132 205/318/132 +f 192/293/133 174/292/133 190/321/133 206/320/133 +f 180/322/134 191/290/134 192/293/134 +f 180/322/134 193/294/134 191/290/134 +f 180/322/134 194/296/134 193/294/134 +f 180/322/134 195/298/134 194/296/134 +f 180/322/134 196/300/134 195/298/134 +f 180/322/134 197/302/134 196/300/134 +f 180/322/134 198/304/134 197/302/134 +f 180/322/134 199/306/134 198/304/134 +f 180/322/134 200/308/134 199/306/134 +f 180/322/134 201/310/134 200/308/134 +f 180/322/134 202/312/134 201/310/134 +f 180/322/134 203/314/134 202/312/134 +f 180/322/134 204/316/134 203/314/134 +f 180/322/134 205/318/134 204/316/134 +f 180/322/134 206/320/134 205/318/134 +f 180/322/134 192/293/134 206/320/134 +f 141/256/135 174/255/135 175/230/135 142/229/135 +o Wheel.FR +v -0.870577 0.264787 1.023545 +v -0.870577 0.367124 1.043902 +v -0.870577 0.453882 1.101871 +v -0.870577 0.511852 1.188629 +v -0.870577 0.532208 1.290967 +v -0.870577 0.511852 1.393305 +v -0.903574 0.264819 1.290950 +v -0.870577 0.453882 1.480062 +v -0.870577 0.367124 1.538032 +v -0.870577 0.264786 1.558388 +v -0.870577 0.162449 1.538032 +v -0.870577 0.075691 1.480062 +v -0.870577 0.017721 1.393305 +v -0.870577 -0.002635 1.290967 +v -0.870577 0.017721 1.188629 +v -0.870577 0.075691 1.101871 +v -0.870577 0.162449 1.043902 +v -0.903574 0.354249 1.074985 +v -0.903574 0.264787 1.057189 +v -0.903574 0.430092 1.125661 +v -0.903574 0.480769 1.201504 +v -0.903574 0.498564 1.290967 +v -0.903574 0.480769 1.380430 +v -0.903574 0.430092 1.456273 +v -0.903574 0.354249 1.506949 +v -0.903574 0.264787 1.524744 +v -0.903574 0.175324 1.506949 +v -0.903574 0.099481 1.456273 +v -0.903574 0.048804 1.380430 +v -0.903574 0.031009 1.290967 +v -0.903574 0.048804 1.201504 +v -0.903574 0.099481 1.125661 +v -0.903574 0.175324 1.074985 +v -0.695591 0.264787 1.023545 +v -0.695591 0.367124 1.043902 +v -0.695591 0.453882 1.101871 +v -0.695591 0.511852 1.188629 +v -0.695591 0.532208 1.290967 +v -0.695591 0.511852 1.393305 +v -0.662593 0.264819 1.290950 +v -0.695591 0.453882 1.480062 +v -0.695591 0.367124 1.538032 +v -0.695591 0.264787 1.558388 +v -0.695591 0.162449 1.538032 +v -0.695591 0.075691 1.480062 +v -0.695591 0.017721 1.393305 +v -0.695591 -0.002635 1.290967 +v -0.695591 0.017721 1.188629 +v -0.695591 0.075691 1.101871 +v -0.695591 0.162449 1.043902 +v -0.662594 0.354249 1.074985 +v -0.662594 0.264787 1.057189 +v -0.662594 0.430092 1.125661 +v -0.662594 0.480769 1.201504 +v -0.662594 0.498564 1.290967 +v -0.662594 0.480769 1.380430 +v -0.662594 0.430092 1.456273 +v -0.662594 0.354249 1.506949 +v -0.662594 0.264787 1.524745 +v -0.662594 0.175324 1.506949 +v -0.662594 0.099481 1.456273 +v -0.662594 0.048804 1.380430 +v -0.662594 0.031009 1.290967 +v -0.662594 0.048804 1.201504 +v -0.662594 0.099481 1.125661 +v -0.662594 0.175324 1.074985 +vt 0.947129 0.746039 +vt 0.947129 0.623557 +vt 0.741723 0.623557 +vt 0.741723 0.746039 +vt 0.947129 0.624268 +vt 0.947129 0.501786 +vt 0.741723 0.501786 +vt 0.741723 0.624268 +vt 0.947129 0.746750 +vt 0.741723 0.746750 +vt 0.947129 0.501075 +vt 0.741723 0.501075 +vt 0.947129 0.379304 +vt 0.741723 0.379304 +vt 0.947129 0.378593 +vt 0.741723 0.378593 +vt 0.947129 0.256822 +vt 0.741723 0.256823 +vt 0.947129 0.256111 +vt 0.741723 0.256111 +vt 0.947129 0.134341 +vt 0.741723 0.134341 +vt 0.947129 0.133630 +vt 0.741724 0.133629 +vt 0.947129 0.011859 +vt 0.741723 0.011859 +vt 0.947129 0.011148 +vt 0.741724 0.011147 +vt 0.947129 0.991002 +vt 0.947129 0.868520 +vt 0.741723 0.868520 +vt 0.741723 0.991002 +vt 0.947129 0.991714 +vt 0.947129 0.869232 +vt 0.741724 0.869232 +vt 0.741724 0.991714 +vt 0.633313 0.736984 +vt 0.672491 0.753212 +vt 0.698148 0.624222 +vt 0.655743 0.624222 +vt 0.569439 0.832578 +vt 0.599424 0.862564 +vt 0.473844 0.896453 +vt 0.490072 0.935631 +vt 0.361082 0.918882 +vt 0.361082 0.961288 +vt 0.248320 0.896452 +vt 0.232092 0.935631 +vt 0.152726 0.832578 +vt 0.122740 0.862564 +vt 0.088851 0.736983 +vt 0.049673 0.753212 +vt 0.066422 0.624222 +vt 0.024016 0.624222 +vt 0.088851 0.511460 +vt 0.049673 0.495232 +vt 0.152726 0.415866 +vt 0.122740 0.385880 +vt 0.248321 0.351991 +vt 0.232092 0.312813 +vt 0.361082 0.329561 +vt 0.361082 0.287155 +vt 0.473844 0.351991 +vt 0.490072 0.312813 +vt 0.569439 0.415866 +vt 0.599424 0.385880 +vt 0.633313 0.511460 +vt 0.672491 0.495232 +vt 0.361103 0.624263 +vt 0.633313 0.736984 +vt 0.655743 0.624222 +vt 0.698148 0.624222 +vt 0.672491 0.753212 +vt 0.569438 0.832578 +vt 0.599424 0.862564 +vt 0.473844 0.896453 +vt 0.490072 0.935631 +vt 0.361082 0.918882 +vt 0.361082 0.961288 +vt 0.248320 0.896452 +vt 0.232092 0.935631 +vt 0.152726 0.832578 +vt 0.122740 0.862564 +vt 0.088851 0.736983 +vt 0.049673 0.753212 +vt 0.066422 0.624222 +vt 0.024016 0.624222 +vt 0.088851 0.511460 +vt 0.049673 0.495232 +vt 0.152726 0.415865 +vt 0.122740 0.385880 +vt 0.248321 0.351991 +vt 0.232092 0.312813 +vt 0.361082 0.329561 +vt 0.361082 0.287155 +vt 0.473844 0.351991 +vt 0.490072 0.312813 +vt 0.569439 0.415865 +vt 0.599424 0.385880 +vt 0.633313 0.511460 +vt 0.672491 0.495232 +vt 0.361103 0.624263 +vn 0.0000 -0.5556 0.8315 +vn 0.0000 0.8315 -0.5556 +vn 0.0000 0.5556 -0.8315 +vn 0.0000 -0.8315 0.5556 +vn 0.0000 0.9808 -0.1951 +vn -0.0000 -0.9808 0.1951 +vn 0.0000 0.9808 0.1951 +vn -0.0000 -0.9808 -0.1951 +vn 0.0000 0.8315 0.5556 +vn 0.0000 -0.8315 -0.5556 +vn 0.0000 0.5556 0.8315 +vn 0.0000 -0.5556 -0.8315 +vn 0.0000 0.1951 0.9808 +vn 0.0000 -0.1951 -0.9808 +vn 0.0000 -0.1951 0.9808 +vn -0.7071 0.1379 -0.6935 +vn -0.7071 0.3928 -0.5879 +vn -0.7071 0.5879 -0.3928 +vn -0.7071 0.6935 -0.1380 +vn -0.7071 0.6935 0.1379 +vn -0.7071 0.5879 0.3928 +vn -0.7071 0.3928 0.5879 +vn -0.7071 0.1380 0.6935 +vn -0.7071 -0.1379 0.6935 +vn -0.7071 -0.3928 0.5879 +vn -0.7071 -0.5879 0.3928 +vn -0.7071 -0.6935 0.1379 +vn -0.7071 -0.6935 -0.1379 +vn -0.7071 -0.5879 -0.3928 +vn -0.7071 -0.3928 -0.5879 +vn -0.7071 -0.1380 -0.6935 +vn -1.0000 0.0000 -0.0000 +vn 0.7071 0.1379 -0.6935 +vn 0.7071 0.3928 -0.5879 +vn 0.7071 0.5879 -0.3928 +vn 0.7071 0.6935 -0.1379 +vn 0.7071 0.6935 0.1379 +vn 0.7071 0.5879 0.3928 +vn 0.7071 0.3928 0.5879 +vn 0.7071 0.1380 0.6935 +vn 0.7071 -0.1380 0.6935 +vn 0.7071 -0.3928 0.5879 +vn 0.7071 -0.5879 0.3928 +vn 0.7071 -0.6935 0.1379 +vn 0.7071 -0.6935 -0.1379 +vn 0.7071 -0.5879 -0.3928 +vn 0.7071 -0.3928 -0.5879 +vn 0.7071 -0.1379 -0.6935 +vn 1.0000 -0.0000 -0.0000 +vn 0.0000 0.1951 -0.9808 +usemtl Wheel_Mat.003 +s off +f 217/323/136 218/324/136 251/325/136 250/326/136 +f 209/327/137 210/328/137 243/329/137 242/330/137 +f 208/331/138 209/327/138 242/330/138 241/332/138 +f 218/324/139 219/333/139 252/334/139 251/325/139 +f 210/328/140 211/335/140 244/336/140 243/329/140 +f 219/333/141 220/337/141 253/338/141 252/334/141 +f 211/335/142 212/339/142 245/340/142 244/336/142 +f 220/337/143 221/341/143 254/342/143 253/338/143 +f 212/339/144 214/343/144 247/344/144 245/340/144 +f 221/341/145 222/345/145 255/346/145 254/342/145 +f 214/343/146 215/347/146 248/348/146 247/344/146 +f 222/345/147 223/349/147 256/350/147 255/346/147 +f 215/351/148 216/352/148 249/353/148 248/354/148 +f 223/355/149 207/356/149 240/357/149 256/358/149 +f 216/352/150 217/323/150 250/326/150 249/353/150 +f 224/359/151 208/360/151 207/361/151 225/362/151 +f 226/363/152 209/364/152 208/360/152 224/359/152 +f 227/365/153 210/366/153 209/364/153 226/363/153 +f 228/367/154 211/368/154 210/366/154 227/365/154 +f 229/369/155 212/370/155 211/368/155 228/367/155 +f 230/371/156 214/372/156 212/370/156 229/369/156 +f 231/373/157 215/374/157 214/372/157 230/371/157 +f 232/375/158 216/376/158 215/374/158 231/373/158 +f 233/377/159 217/378/159 216/376/159 232/375/159 +f 234/379/160 218/380/160 217/378/160 233/377/160 +f 235/381/161 219/382/161 218/380/161 234/379/161 +f 236/383/162 220/384/162 219/382/162 235/381/162 +f 237/385/163 221/386/163 220/384/163 236/383/163 +f 238/387/164 222/388/164 221/386/164 237/385/164 +f 239/389/165 223/390/165 222/388/165 238/387/165 +f 225/362/166 207/361/166 223/390/166 239/389/166 +f 213/391/167 224/359/167 225/362/167 +f 213/391/167 226/363/167 224/359/167 +f 213/391/167 227/365/167 226/363/167 +f 213/391/167 228/367/167 227/365/167 +f 213/391/167 229/369/167 228/367/167 +f 213/391/167 230/371/167 229/369/167 +f 213/391/167 231/373/167 230/371/167 +f 213/391/167 232/375/167 231/373/167 +f 213/391/167 233/377/167 232/375/167 +f 213/391/167 234/379/167 233/377/167 +f 213/391/167 235/381/167 234/379/167 +f 213/391/167 236/383/167 235/381/167 +f 213/391/167 237/385/167 236/383/167 +f 213/391/167 238/387/167 237/385/167 +f 213/391/167 239/389/167 238/387/167 +f 213/391/167 225/362/167 239/389/167 +f 257/392/168 258/393/168 240/394/168 241/395/168 +f 259/396/169 257/392/169 241/395/169 242/397/169 +f 260/398/170 259/396/170 242/397/170 243/399/170 +f 261/400/171 260/398/171 243/399/171 244/401/171 +f 262/402/172 261/400/172 244/401/172 245/403/172 +f 263/404/173 262/402/173 245/403/173 247/405/173 +f 264/406/174 263/404/174 247/405/174 248/407/174 +f 265/408/175 264/406/175 248/407/175 249/409/175 +f 266/410/176 265/408/176 249/409/176 250/411/176 +f 267/412/177 266/410/177 250/411/177 251/413/177 +f 268/414/178 267/412/178 251/413/178 252/415/178 +f 269/416/179 268/414/179 252/415/179 253/417/179 +f 270/418/180 269/416/180 253/417/180 254/419/180 +f 271/420/181 270/418/181 254/419/181 255/421/181 +f 272/422/182 271/420/182 255/421/182 256/423/182 +f 258/393/183 272/422/183 256/423/183 240/394/183 +f 246/424/184 258/393/184 257/392/184 +f 246/424/184 257/392/184 259/396/184 +f 246/424/184 259/396/184 260/398/184 +f 246/424/184 260/398/184 261/400/184 +f 246/424/184 261/400/184 262/402/184 +f 246/424/184 262/402/184 263/404/184 +f 246/424/184 263/404/184 264/406/184 +f 246/424/184 264/406/184 265/408/184 +f 246/424/184 265/408/184 266/410/184 +f 246/424/184 266/410/184 267/412/184 +f 246/424/184 267/412/184 268/414/184 +f 246/424/184 268/414/184 269/416/184 +f 246/424/184 269/416/184 270/418/184 +f 246/424/184 270/418/184 271/420/184 +f 246/424/184 271/420/184 272/422/184 +f 246/424/184 272/422/184 258/393/184 +f 207/356/185 208/331/185 241/332/185 240/357/185 +o Wheel.RL +v 0.870577 0.264787 -1.523690 +v 0.870577 0.367124 -1.503333 +v 0.870577 0.453882 -1.445364 +v 0.870577 0.511852 -1.358606 +v 0.870577 0.532208 -1.256268 +v 0.870577 0.511852 -1.153930 +v 0.903574 0.264819 -1.256284 +v 0.870577 0.453882 -1.067172 +v 0.870577 0.367124 -1.009203 +v 0.870577 0.264787 -0.988846 +v 0.870577 0.162449 -1.009203 +v 0.870577 0.075691 -1.067172 +v 0.870577 0.017721 -1.153930 +v 0.870577 -0.002635 -1.256268 +v 0.870577 0.017721 -1.358606 +v 0.870577 0.075691 -1.445364 +v 0.870577 0.162449 -1.503333 +v 0.903574 0.354249 -1.472250 +v 0.903574 0.264787 -1.490045 +v 0.903574 0.430092 -1.421574 +v 0.903574 0.480769 -1.345731 +v 0.903574 0.498564 -1.256268 +v 0.903574 0.480769 -1.166805 +v 0.903574 0.430092 -1.090962 +v 0.903574 0.354249 -1.040286 +v 0.903574 0.264787 -1.022490 +v 0.903574 0.175324 -1.040286 +v 0.903574 0.099481 -1.090962 +v 0.903574 0.048804 -1.166805 +v 0.903574 0.031009 -1.256268 +v 0.903574 0.048804 -1.345731 +v 0.903574 0.099481 -1.421574 +v 0.903574 0.175324 -1.472250 +v 0.695591 0.264787 -1.523690 +v 0.695591 0.367124 -1.503333 +v 0.695591 0.453882 -1.445363 +v 0.695591 0.511852 -1.358606 +v 0.695591 0.532208 -1.256268 +v 0.695591 0.511852 -1.153930 +v 0.662593 0.264819 -1.256284 +v 0.695591 0.453882 -1.067172 +v 0.695591 0.367124 -1.009203 +v 0.695591 0.264787 -0.988846 +v 0.695591 0.162449 -1.009203 +v 0.695591 0.075691 -1.067172 +v 0.695591 0.017721 -1.153930 +v 0.695591 -0.002635 -1.256268 +v 0.695591 0.017721 -1.358606 +v 0.695591 0.075691 -1.445364 +v 0.695591 0.162449 -1.503333 +v 0.662594 0.354249 -1.472250 +v 0.662593 0.264787 -1.490045 +v 0.662594 0.430092 -1.421574 +v 0.662594 0.480769 -1.345731 +v 0.662594 0.498564 -1.256268 +v 0.662594 0.480769 -1.166805 +v 0.662594 0.430092 -1.090962 +v 0.662594 0.354249 -1.040286 +v 0.662594 0.264787 -1.022490 +v 0.662594 0.175324 -1.040286 +v 0.662594 0.099481 -1.090962 +v 0.662594 0.048804 -1.166805 +v 0.662594 0.031009 -1.256268 +v 0.662594 0.048804 -1.345731 +v 0.662593 0.099481 -1.421574 +v 0.662593 0.175324 -1.472250 +vt 0.947129 0.746039 +vt 0.741723 0.746039 +vt 0.741723 0.623557 +vt 0.947129 0.623557 +vt 0.947129 0.624268 +vt 0.741723 0.624268 +vt 0.741723 0.501786 +vt 0.947129 0.501786 +vt 0.947129 0.746750 +vt 0.741723 0.746750 +vt 0.741723 0.501075 +vt 0.947129 0.501075 +vt 0.741723 0.379304 +vt 0.947129 0.379304 +vt 0.741723 0.378593 +vt 0.947129 0.378593 +vt 0.741723 0.256823 +vt 0.947129 0.256822 +vt 0.741723 0.256111 +vt 0.947129 0.256111 +vt 0.741723 0.134341 +vt 0.947129 0.134341 +vt 0.741724 0.133629 +vt 0.947129 0.133630 +vt 0.741723 0.011859 +vt 0.947129 0.011859 +vt 0.741724 0.011147 +vt 0.947129 0.011148 +vt 0.947129 0.991002 +vt 0.741723 0.991002 +vt 0.741723 0.868520 +vt 0.947129 0.868520 +vt 0.947129 0.991714 +vt 0.741724 0.991714 +vt 0.741724 0.869232 +vt 0.947129 0.869232 +vt 0.633313 0.736984 +vt 0.655743 0.624222 +vt 0.698148 0.624222 +vt 0.672491 0.753212 +vt 0.569439 0.832578 +vt 0.599424 0.862564 +vt 0.473844 0.896453 +vt 0.490072 0.935631 +vt 0.361082 0.918882 +vt 0.361082 0.961288 +vt 0.248320 0.896452 +vt 0.232092 0.935631 +vt 0.152726 0.832578 +vt 0.122740 0.862564 +vt 0.088851 0.736983 +vt 0.049673 0.753212 +vt 0.066422 0.624222 +vt 0.024016 0.624222 +vt 0.088851 0.511460 +vt 0.049673 0.495232 +vt 0.152726 0.415866 +vt 0.122740 0.385880 +vt 0.248321 0.351991 +vt 0.232092 0.312813 +vt 0.361082 0.329561 +vt 0.361082 0.287155 +vt 0.473844 0.351991 +vt 0.490072 0.312813 +vt 0.569439 0.415866 +vt 0.599424 0.385880 +vt 0.633313 0.511460 +vt 0.672491 0.495232 +vt 0.361103 0.624263 +vt 0.633313 0.736984 +vt 0.672491 0.753212 +vt 0.698148 0.624222 +vt 0.655743 0.624222 +vt 0.569438 0.832578 +vt 0.599424 0.862564 +vt 0.473844 0.896453 +vt 0.490072 0.935631 +vt 0.361082 0.918882 +vt 0.361082 0.961288 +vt 0.248320 0.896452 +vt 0.232092 0.935631 +vt 0.152726 0.832578 +vt 0.122740 0.862564 +vt 0.088851 0.736983 +vt 0.049673 0.753212 +vt 0.066422 0.624222 +vt 0.024016 0.624222 +vt 0.088851 0.511460 +vt 0.049673 0.495232 +vt 0.152726 0.415865 +vt 0.122740 0.385880 +vt 0.248321 0.351991 +vt 0.232092 0.312813 +vt 0.361082 0.329561 +vt 0.361082 0.287155 +vt 0.473844 0.351991 +vt 0.490072 0.312813 +vt 0.569439 0.415865 +vt 0.599424 0.385880 +vt 0.633313 0.511460 +vt 0.672491 0.495232 +vt 0.361103 0.624263 +vn 0.0000 -0.5556 0.8315 +vn -0.0000 0.8315 -0.5556 +vn 0.0000 0.5556 -0.8315 +vn 0.0000 -0.8315 0.5556 +vn 0.0000 0.9808 -0.1951 +vn 0.0000 -0.9808 0.1951 +vn 0.0000 0.9808 0.1951 +vn 0.0000 -0.9808 -0.1951 +vn 0.0000 0.8315 0.5556 +vn 0.0000 -0.8315 -0.5556 +vn 0.0000 0.5556 0.8315 +vn -0.0000 -0.5556 -0.8315 +vn 0.0000 0.1951 0.9808 +vn 0.0000 -0.1951 -0.9808 +vn 0.0000 -0.1951 0.9808 +vn 0.7071 0.1379 -0.6935 +vn 0.7071 0.3928 -0.5879 +vn 0.7071 0.5879 -0.3928 +vn 0.7071 0.6935 -0.1379 +vn 0.7071 0.6935 0.1379 +vn 0.7071 0.5879 0.3928 +vn 0.7071 0.3928 0.5879 +vn 0.7071 0.1379 0.6935 +vn 0.7071 -0.1379 0.6935 +vn 0.7071 -0.3928 0.5879 +vn 0.7071 -0.5879 0.3928 +vn 0.7071 -0.6935 0.1379 +vn 0.7071 -0.6935 -0.1379 +vn 0.7071 -0.5879 -0.3928 +vn 0.7071 -0.3928 -0.5879 +vn 0.7071 -0.1379 -0.6935 +vn 1.0000 0.0000 -0.0000 +vn -0.7071 0.1380 -0.6935 +vn -0.7071 0.3928 -0.5879 +vn -0.7071 0.5879 -0.3928 +vn -0.7071 0.6935 -0.1379 +vn -0.7071 0.6935 0.1380 +vn -0.7071 0.5879 0.3928 +vn -0.7071 0.3928 0.5879 +vn -0.7071 0.1380 0.6935 +vn -0.7071 -0.1380 0.6935 +vn -0.7071 -0.3928 0.5879 +vn -0.7071 -0.5879 0.3928 +vn -0.7071 -0.6935 0.1379 +vn -0.7071 -0.6935 -0.1379 +vn -0.7071 -0.5879 -0.3928 +vn -0.7071 -0.3928 -0.5879 +vn -0.7071 -0.1380 -0.6935 +vn -1.0000 0.0000 -0.0000 +vn 0.0000 0.1951 -0.9808 +usemtl Wheel_Mat.003 +s off +f 283/425/186 316/426/186 317/427/186 284/428/186 +f 275/429/187 308/430/187 309/431/187 276/432/187 +f 274/433/188 307/434/188 308/430/188 275/429/188 +f 284/428/189 317/427/189 318/435/189 285/436/189 +f 276/432/190 309/431/190 310/437/190 277/438/190 +f 285/436/191 318/435/191 319/439/191 286/440/191 +f 277/438/192 310/437/192 311/441/192 278/442/192 +f 286/440/193 319/439/193 320/443/193 287/444/193 +f 278/442/194 311/441/194 313/445/194 280/446/194 +f 287/444/195 320/443/195 321/447/195 288/448/195 +f 280/446/196 313/445/196 314/449/196 281/450/196 +f 288/448/197 321/447/197 322/451/197 289/452/197 +f 281/453/198 314/454/198 315/455/198 282/456/198 +f 289/457/199 322/458/199 306/459/199 273/460/199 +f 282/456/200 315/455/200 316/426/200 283/425/200 +f 290/461/201 291/462/201 273/463/201 274/464/201 +f 292/465/202 290/461/202 274/464/202 275/466/202 +f 293/467/203 292/465/203 275/466/203 276/468/203 +f 294/469/204 293/467/204 276/468/204 277/470/204 +f 295/471/205 294/469/205 277/470/205 278/472/205 +f 296/473/206 295/471/206 278/472/206 280/474/206 +f 297/475/207 296/473/207 280/474/207 281/476/207 +f 298/477/208 297/475/208 281/476/208 282/478/208 +f 299/479/209 298/477/209 282/478/209 283/480/209 +f 300/481/210 299/479/210 283/480/210 284/482/210 +f 301/483/211 300/481/211 284/482/211 285/484/211 +f 302/485/212 301/483/212 285/484/212 286/486/212 +f 303/487/213 302/485/213 286/486/213 287/488/213 +f 304/489/214 303/487/214 287/488/214 288/490/214 +f 305/491/215 304/489/215 288/490/215 289/492/215 +f 291/462/216 305/491/216 289/492/216 273/463/216 +f 279/493/217 291/462/217 290/461/217 +f 279/493/217 290/461/217 292/465/217 +f 279/493/217 292/465/217 293/467/217 +f 279/493/217 293/467/217 294/469/217 +f 279/493/217 294/469/217 295/471/217 +f 279/493/217 295/471/217 296/473/217 +f 279/493/217 296/473/217 297/475/217 +f 279/493/217 297/475/217 298/477/217 +f 279/493/217 298/477/217 299/479/217 +f 279/493/217 299/479/217 300/481/217 +f 279/493/217 300/481/217 301/483/217 +f 279/493/217 301/483/217 302/485/217 +f 279/493/217 302/485/217 303/487/217 +f 279/493/217 303/487/217 304/489/217 +f 279/493/217 304/489/217 305/491/217 +f 279/493/217 305/491/217 291/462/217 +f 323/494/218 307/495/218 306/496/218 324/497/218 +f 325/498/219 308/499/219 307/495/219 323/494/219 +f 326/500/220 309/501/220 308/499/220 325/498/220 +f 327/502/221 310/503/221 309/501/221 326/500/221 +f 328/504/222 311/505/222 310/503/222 327/502/222 +f 329/506/223 313/507/223 311/505/223 328/504/223 +f 330/508/224 314/509/224 313/507/224 329/506/224 +f 331/510/225 315/511/225 314/509/225 330/508/225 +f 332/512/226 316/513/226 315/511/226 331/510/226 +f 333/514/227 317/515/227 316/513/227 332/512/227 +f 334/516/228 318/517/228 317/515/228 333/514/228 +f 335/518/229 319/519/229 318/517/229 334/516/229 +f 336/520/230 320/521/230 319/519/230 335/518/230 +f 337/522/231 321/523/231 320/521/231 336/520/231 +f 338/524/232 322/525/232 321/523/232 337/522/232 +f 324/497/233 306/496/233 322/525/233 338/524/233 +f 312/526/234 323/494/234 324/497/234 +f 312/526/234 325/498/234 323/494/234 +f 312/526/234 326/500/234 325/498/234 +f 312/526/234 327/502/234 326/500/234 +f 312/526/234 328/504/234 327/502/234 +f 312/526/234 329/506/234 328/504/234 +f 312/526/234 330/508/234 329/506/234 +f 312/526/234 331/510/234 330/508/234 +f 312/526/234 332/512/234 331/510/234 +f 312/526/234 333/514/234 332/512/234 +f 312/526/234 334/516/234 333/514/234 +f 312/526/234 335/518/234 334/516/234 +f 312/526/234 336/520/234 335/518/234 +f 312/526/234 337/522/234 336/520/234 +f 312/526/234 338/524/234 337/522/234 +f 312/526/234 324/497/234 338/524/234 +f 273/460/235 306/459/235 307/434/235 274/433/235 +o Wheel.RR +v -0.870577 0.264787 -1.523690 +v -0.870577 0.367124 -1.503333 +v -0.870577 0.453882 -1.445364 +v -0.870577 0.511852 -1.358606 +v -0.870577 0.532208 -1.256268 +v -0.870577 0.511852 -1.153930 +v -0.903574 0.264819 -1.256284 +v -0.870577 0.453882 -1.067172 +v -0.870577 0.367124 -1.009203 +v -0.870577 0.264786 -0.988846 +v -0.870577 0.162449 -1.009203 +v -0.870577 0.075691 -1.067172 +v -0.870577 0.017721 -1.153930 +v -0.870577 -0.002635 -1.256268 +v -0.870577 0.017721 -1.358606 +v -0.870577 0.075691 -1.445364 +v -0.870577 0.162449 -1.503333 +v -0.903574 0.354249 -1.472250 +v -0.903574 0.264787 -1.490045 +v -0.903574 0.430092 -1.421574 +v -0.903574 0.480769 -1.345731 +v -0.903574 0.498564 -1.256268 +v -0.903574 0.480769 -1.166805 +v -0.903574 0.430092 -1.090962 +v -0.903574 0.354249 -1.040286 +v -0.903574 0.264787 -1.022490 +v -0.903574 0.175324 -1.040286 +v -0.903574 0.099481 -1.090962 +v -0.903574 0.048804 -1.166805 +v -0.903574 0.031009 -1.256268 +v -0.903574 0.048804 -1.345731 +v -0.903574 0.099481 -1.421574 +v -0.903574 0.175324 -1.472250 +v -0.695591 0.264787 -1.523690 +v -0.695591 0.367124 -1.503333 +v -0.695591 0.453882 -1.445363 +v -0.695591 0.511852 -1.358606 +v -0.695591 0.532208 -1.256268 +v -0.695591 0.511852 -1.153930 +v -0.662593 0.264819 -1.256284 +v -0.695591 0.453882 -1.067172 +v -0.695591 0.367124 -1.009203 +v -0.695591 0.264787 -0.988846 +v -0.695591 0.162449 -1.009203 +v -0.695591 0.075691 -1.067172 +v -0.695591 0.017721 -1.153930 +v -0.695591 -0.002635 -1.256268 +v -0.695591 0.017721 -1.358606 +v -0.695591 0.075691 -1.445364 +v -0.695591 0.162449 -1.503333 +v -0.662594 0.354249 -1.472250 +v -0.662594 0.264787 -1.490045 +v -0.662594 0.430092 -1.421574 +v -0.662594 0.480769 -1.345731 +v -0.662594 0.498564 -1.256268 +v -0.662594 0.480769 -1.166805 +v -0.662594 0.430092 -1.090962 +v -0.662594 0.354249 -1.040286 +v -0.662594 0.264787 -1.022490 +v -0.662594 0.175324 -1.040286 +v -0.662594 0.099481 -1.090962 +v -0.662594 0.048804 -1.166805 +v -0.662594 0.031009 -1.256268 +v -0.662594 0.048804 -1.345731 +v -0.662594 0.099481 -1.421574 +v -0.662594 0.175324 -1.472250 +vt 0.947129 0.746039 +vt 0.947129 0.623557 +vt 0.741723 0.623557 +vt 0.741723 0.746039 +vt 0.947129 0.624268 +vt 0.947129 0.501786 +vt 0.741723 0.501786 +vt 0.741723 0.624268 +vt 0.947129 0.746750 +vt 0.741723 0.746750 +vt 0.947129 0.501075 +vt 0.741723 0.501075 +vt 0.947129 0.379304 +vt 0.741723 0.379304 +vt 0.947129 0.378593 +vt 0.741723 0.378593 +vt 0.947129 0.256822 +vt 0.741723 0.256823 +vt 0.947129 0.256111 +vt 0.741723 0.256111 +vt 0.947129 0.134341 +vt 0.741723 0.134341 +vt 0.947129 0.133630 +vt 0.741724 0.133629 +vt 0.947129 0.011859 +vt 0.741723 0.011859 +vt 0.947129 0.011148 +vt 0.741724 0.011147 +vt 0.947129 0.991002 +vt 0.947129 0.868520 +vt 0.741723 0.868520 +vt 0.741723 0.991002 +vt 0.947129 0.991714 +vt 0.947129 0.869232 +vt 0.741724 0.869232 +vt 0.741724 0.991714 +vt 0.633313 0.736984 +vt 0.672491 0.753212 +vt 0.698148 0.624222 +vt 0.655743 0.624222 +vt 0.569439 0.832578 +vt 0.599424 0.862564 +vt 0.473844 0.896453 +vt 0.490072 0.935631 +vt 0.361082 0.918882 +vt 0.361082 0.961288 +vt 0.248320 0.896452 +vt 0.232092 0.935631 +vt 0.152726 0.832578 +vt 0.122740 0.862564 +vt 0.088851 0.736983 +vt 0.049673 0.753212 +vt 0.066422 0.624222 +vt 0.024016 0.624222 +vt 0.088851 0.511460 +vt 0.049673 0.495232 +vt 0.152726 0.415866 +vt 0.122740 0.385880 +vt 0.248321 0.351991 +vt 0.232092 0.312813 +vt 0.361082 0.329561 +vt 0.361082 0.287155 +vt 0.473844 0.351991 +vt 0.490072 0.312813 +vt 0.569439 0.415866 +vt 0.599424 0.385880 +vt 0.633313 0.511460 +vt 0.672491 0.495232 +vt 0.361103 0.624263 +vt 0.633313 0.736984 +vt 0.655743 0.624222 +vt 0.698148 0.624222 +vt 0.672491 0.753212 +vt 0.569438 0.832578 +vt 0.599424 0.862564 +vt 0.473844 0.896453 +vt 0.490072 0.935631 +vt 0.361082 0.918882 +vt 0.361082 0.961288 +vt 0.248320 0.896452 +vt 0.232092 0.935631 +vt 0.152726 0.832578 +vt 0.122740 0.862564 +vt 0.088851 0.736983 +vt 0.049673 0.753212 +vt 0.066422 0.624222 +vt 0.024016 0.624222 +vt 0.088851 0.511460 +vt 0.049673 0.495232 +vt 0.152726 0.415865 +vt 0.122740 0.385880 +vt 0.248321 0.351991 +vt 0.232092 0.312813 +vt 0.361082 0.329561 +vt 0.361082 0.287155 +vt 0.473844 0.351991 +vt 0.490072 0.312813 +vt 0.569439 0.415865 +vt 0.599424 0.385880 +vt 0.633313 0.511460 +vt 0.672491 0.495232 +vt 0.361103 0.624263 +vn 0.0000 -0.5556 0.8315 +vn 0.0000 0.8315 -0.5556 +vn 0.0000 0.5556 -0.8315 +vn 0.0000 -0.8315 0.5556 +vn 0.0000 0.9808 -0.1951 +vn -0.0000 -0.9808 0.1951 +vn 0.0000 0.9808 0.1951 +vn -0.0000 -0.9808 -0.1951 +vn 0.0000 0.8315 0.5556 +vn 0.0000 -0.8315 -0.5556 +vn 0.0000 0.5556 0.8315 +vn 0.0000 -0.5556 -0.8315 +vn 0.0000 0.1951 0.9808 +vn -0.0000 -0.1951 -0.9808 +vn 0.0000 -0.1951 0.9808 +vn -0.7071 0.1380 -0.6935 +vn -0.7071 0.3928 -0.5879 +vn -0.7071 0.5879 -0.3928 +vn -0.7071 0.6935 -0.1380 +vn -0.7071 0.6935 0.1379 +vn -0.7071 0.5879 0.3928 +vn -0.7071 0.3928 0.5879 +vn -0.7071 0.1380 0.6935 +vn -0.7071 -0.1380 0.6935 +vn -0.7071 -0.3928 0.5879 +vn -0.7071 -0.5879 0.3928 +vn -0.7071 -0.6935 0.1379 +vn -0.7071 -0.6935 -0.1379 +vn -0.7071 -0.5879 -0.3928 +vn -0.7071 -0.3928 -0.5879 +vn -0.7071 -0.1380 -0.6935 +vn -1.0000 0.0000 -0.0000 +vn 0.7071 0.1379 -0.6935 +vn 0.7071 0.3928 -0.5879 +vn 0.7071 0.5879 -0.3928 +vn 0.7071 0.6935 -0.1379 +vn 0.7071 0.6935 0.1379 +vn 0.7071 0.5879 0.3928 +vn 0.7071 0.3928 0.5879 +vn 0.7071 0.1380 0.6935 +vn 0.7071 -0.1380 0.6935 +vn 0.7071 -0.3928 0.5879 +vn 0.7071 -0.5879 0.3928 +vn 0.7071 -0.6935 0.1379 +vn 0.7071 -0.6935 -0.1379 +vn 0.7071 -0.5879 -0.3928 +vn 0.7071 -0.3928 -0.5879 +vn 0.7071 -0.1379 -0.6935 +vn 1.0000 -0.0000 -0.0000 +vn 0.0000 0.1951 -0.9808 +usemtl Wheel_Mat.003 +s off +f 349/527/236 350/528/236 383/529/236 382/530/236 +f 341/531/237 342/532/237 375/533/237 374/534/237 +f 340/535/238 341/531/238 374/534/238 373/536/238 +f 350/528/239 351/537/239 384/538/239 383/529/239 +f 342/532/240 343/539/240 376/540/240 375/533/240 +f 351/537/241 352/541/241 385/542/241 384/538/241 +f 343/539/242 344/543/242 377/544/242 376/540/242 +f 352/541/243 353/545/243 386/546/243 385/542/243 +f 344/543/244 346/547/244 379/548/244 377/544/244 +f 353/545/245 354/549/245 387/550/245 386/546/245 +f 346/547/246 347/551/246 380/552/246 379/548/246 +f 354/549/247 355/553/247 388/554/247 387/550/247 +f 347/555/248 348/556/248 381/557/248 380/558/248 +f 355/559/249 339/560/249 372/561/249 388/562/249 +f 348/556/250 349/527/250 382/530/250 381/557/250 +f 356/563/251 340/564/251 339/565/251 357/566/251 +f 358/567/252 341/568/252 340/564/252 356/563/252 +f 359/569/253 342/570/253 341/568/253 358/567/253 +f 360/571/254 343/572/254 342/570/254 359/569/254 +f 361/573/255 344/574/255 343/572/255 360/571/255 +f 362/575/256 346/576/256 344/574/256 361/573/256 +f 363/577/257 347/578/257 346/576/257 362/575/257 +f 364/579/258 348/580/258 347/578/258 363/577/258 +f 365/581/259 349/582/259 348/580/259 364/579/259 +f 366/583/260 350/584/260 349/582/260 365/581/260 +f 367/585/261 351/586/261 350/584/261 366/583/261 +f 368/587/262 352/588/262 351/586/262 367/585/262 +f 369/589/263 353/590/263 352/588/263 368/587/263 +f 370/591/264 354/592/264 353/590/264 369/589/264 +f 371/593/265 355/594/265 354/592/265 370/591/265 +f 357/566/266 339/565/266 355/594/266 371/593/266 +f 345/595/267 356/563/267 357/566/267 +f 345/595/267 358/567/267 356/563/267 +f 345/595/267 359/569/267 358/567/267 +f 345/595/267 360/571/267 359/569/267 +f 345/595/267 361/573/267 360/571/267 +f 345/595/267 362/575/267 361/573/267 +f 345/595/267 363/577/267 362/575/267 +f 345/595/267 364/579/267 363/577/267 +f 345/595/267 365/581/267 364/579/267 +f 345/595/267 366/583/267 365/581/267 +f 345/595/267 367/585/267 366/583/267 +f 345/595/267 368/587/267 367/585/267 +f 345/595/267 369/589/267 368/587/267 +f 345/595/267 370/591/267 369/589/267 +f 345/595/267 371/593/267 370/591/267 +f 345/595/267 357/566/267 371/593/267 +f 389/596/268 390/597/268 372/598/268 373/599/268 +f 391/600/269 389/596/269 373/599/269 374/601/269 +f 392/602/270 391/600/270 374/601/270 375/603/270 +f 393/604/271 392/602/271 375/603/271 376/605/271 +f 394/606/272 393/604/272 376/605/272 377/607/272 +f 395/608/273 394/606/273 377/607/273 379/609/273 +f 396/610/274 395/608/274 379/609/274 380/611/274 +f 397/612/275 396/610/275 380/611/275 381/613/275 +f 398/614/276 397/612/276 381/613/276 382/615/276 +f 399/616/277 398/614/277 382/615/277 383/617/277 +f 400/618/278 399/616/278 383/617/278 384/619/278 +f 401/620/279 400/618/279 384/619/279 385/621/279 +f 402/622/280 401/620/280 385/621/280 386/623/280 +f 403/624/281 402/622/281 386/623/281 387/625/281 +f 404/626/282 403/624/282 387/625/282 388/627/282 +f 390/597/283 404/626/283 388/627/283 372/598/283 +f 378/628/284 390/597/284 389/596/284 +f 378/628/284 389/596/284 391/600/284 +f 378/628/284 391/600/284 392/602/284 +f 378/628/284 392/602/284 393/604/284 +f 378/628/284 393/604/284 394/606/284 +f 378/628/284 394/606/284 395/608/284 +f 378/628/284 395/608/284 396/610/284 +f 378/628/284 396/610/284 397/612/284 +f 378/628/284 397/612/284 398/614/284 +f 378/628/284 398/614/284 399/616/284 +f 378/628/284 399/616/284 400/618/284 +f 378/628/284 400/618/284 401/620/284 +f 378/628/284 401/620/284 402/622/284 +f 378/628/284 402/622/284 403/624/284 +f 378/628/284 403/624/284 404/626/284 +f 378/628/284 404/626/284 390/597/284 +f 339/560/285 340/535/285 373/536/285 372/561/285 diff --git a/resources/models/TestCarModel/Car_D.png b/resources/models/TestCarModel/Car_D.png new file mode 100644 index 0000000..8f686e6 Binary files /dev/null and b/resources/models/TestCarModel/Car_D.png differ diff --git a/resources/models/TestCarModel/Wheel_D.png b/resources/models/TestCarModel/Wheel_D.png new file mode 100644 index 0000000..10ec255 Binary files /dev/null and b/resources/models/TestCarModel/Wheel_D.png differ diff --git a/resources/shaders/model/shader.frag b/resources/shaders/model/shader.frag new file mode 100644 index 0000000..66d5e6c --- /dev/null +++ b/resources/shaders/model/shader.frag @@ -0,0 +1,11 @@ +#version 330 core +out vec4 FragColor; + +in vec2 TexCoords; + +uniform sampler2D texture_diffuse1; + +void main() +{ + FragColor = texture(texture_diffuse1, TexCoords); +} diff --git a/resources/shaders/model/shader.vert b/resources/shaders/model/shader.vert new file mode 100644 index 0000000..ed5332c --- /dev/null +++ b/resources/shaders/model/shader.vert @@ -0,0 +1,16 @@ +#version 330 core +layout (location = 0) in vec3 aPos; +layout (location = 1) in vec3 aNormal; +layout (location = 2) in vec2 aTexCoords; + +out vec2 TexCoords; + +uniform mat4 model; +uniform mat4 view; +uniform mat4 projection; + +void main() +{ + TexCoords = aTexCoords; + gl_Position = projection * view * model * vec4(aPos, 1.0); +} diff --git a/resources/shaders/test/shader.frag b/resources/shaders/test/shader.frag new file mode 100644 index 0000000..fd890f3 --- /dev/null +++ b/resources/shaders/test/shader.frag @@ -0,0 +1,14 @@ +#version 330 core +out vec4 FragColor; + +in vec2 TexCoord; + +// texture samplers +uniform sampler2D texture1; +uniform sampler2D texture2; + +void main() +{ + // linearly interpolate between both textures (80% container, 20% awesomeface) + FragColor = mix(texture(texture1, TexCoord), texture(texture2, TexCoord), 1.0); +} diff --git a/resources/shaders/test/shader.vert b/resources/shaders/test/shader.vert new file mode 100644 index 0000000..e75ab6b --- /dev/null +++ b/resources/shaders/test/shader.vert @@ -0,0 +1,15 @@ +#version 330 core +layout (location = 0) in vec3 aPos; +layout (location = 1) in vec2 aTexCoord; + +out vec2 TexCoord; + +uniform mat4 model; +uniform mat4 view; +uniform mat4 projection; + +void main() +{ + gl_Position = projection * view * model * vec4(aPos, 1.0); + TexCoord = vec2(aTexCoord.x, aTexCoord.y); +} diff --git a/src/camera.rs b/src/camera.rs new file mode 100644 index 0000000..1767493 --- /dev/null +++ b/src/camera.rs @@ -0,0 +1,136 @@ +#![allow(non_camel_case_types)] +#![allow(non_snake_case)] +#![allow(dead_code)] + +use cgmath; +use cgmath::vec3; +use cgmath::prelude::*; + +type Point3 = cgmath::Point3; +type Vector3 = cgmath::Vector3; +type Matrix4 = cgmath::Matrix4; + +// Defines several possible options for camera movement. Used as abstraction to stay away from window-system specific input methods +#[derive(PartialEq, Clone, Copy)] +pub enum Camera_Movement { + FORWARD, + BACKWARD, + LEFT, + RIGHT, +} +use self::Camera_Movement::*; + +// Default camera values +const YAW: f32 = -90.0; +const PITCH: f32 = 0.0; +const SPEED: f32 = 2.5; +const SENSITIVTY: f32 = 0.1; +const ZOOM: f32 = 45.0; + +pub struct Camera { + // Camera Attributes + pub Position: Point3, + pub Front: Vector3, + pub Up: Vector3, + pub Right: Vector3, + pub WorldUp: Vector3, + // Euler Angles + pub Yaw: f32, + pub Pitch: f32, + // Camera options + pub MovementSpeed: f32, + pub MouseSensitivity: f32, + pub Zoom: f32, +} + +impl Default for Camera { + fn default() -> Camera { + let mut camera = Camera { + Position: Point3::new(0.0, 0.0, 0.0), + Front: vec3(0.0, 0.0, -1.0), + Up: Vector3::zero(), // initialized later + Right: Vector3::zero(), // initialized later + WorldUp: Vector3::unit_y(), + Yaw: YAW, + Pitch: PITCH, + MovementSpeed: SPEED, + MouseSensitivity: SENSITIVTY, + Zoom: ZOOM, + }; + camera.updateCameraVectors(); + camera + } +} + +impl Camera { + /// Returns the view matrix calculated using Eular Angles and the LookAt Matrix + pub fn GetViewMatrix(&self) -> Matrix4 { + Matrix4::look_at(self.Position, self.Position + self.Front, self.Up) + } + + /// Processes input received from any keyboard-like input system. Accepts input parameter in the form of camera defined ENUM (to abstract it from windowing systems) + pub fn ProcessKeyboard(&mut self, direction: Camera_Movement, deltaTime: f32) { + let velocity = self.MovementSpeed * deltaTime; + if direction == FORWARD { + self.Position += self.Front * velocity; + } + if direction == BACKWARD { + self.Position += -(self.Front * velocity); + } + if direction == LEFT { + self.Position += -(self.Right * velocity); + } + if direction == RIGHT { + self.Position += self.Right * velocity; + } + } + + /// Processes input received from a mouse input system. Expects the offset value in both the x and y direction. + pub fn ProcessMouseMovement(&mut self, mut xoffset: f32, mut yoffset: f32, constrainPitch: bool) { + xoffset *= self.MouseSensitivity; + yoffset *= self.MouseSensitivity; + + self.Yaw += xoffset; + self.Pitch += yoffset; + + // Make sure that when pitch is out of bounds, screen doesn't get flipped + if constrainPitch { + if self.Pitch > 89.0 { + self.Pitch = 89.0; + } + if self.Pitch < -89.0 { + self.Pitch = -89.0; + } + } + + // Update Front, Right and Up Vectors using the updated Eular angles + self.updateCameraVectors(); + } + + // Processes input received from a mouse scroll-wheel event. Only requires input on the vertical wheel-axis + pub fn ProcessMouseScroll(&mut self, yoffset: f32) { + if self.Zoom >= 1.0 && self.Zoom <= 45.0 { + self.Zoom -= yoffset; + } + if self.Zoom <= 1.0 { + self.Zoom = 1.0; + } + if self.Zoom >= 45.0 { + self.Zoom = 45.0; + } + } + + /// Calculates the front vector from the Camera's (updated) Eular Angles + fn updateCameraVectors(&mut self) { + // Calculate the new Front vector + let front = Vector3 { + x: self.Yaw.to_radians().cos() * self.Pitch.to_radians().cos(), + y: self.Pitch.to_radians().sin(), + z: self.Yaw.to_radians().sin() * self.Pitch.to_radians().cos(), + }; + self.Front = front.normalize(); + // Also re-calculate the Right and Up vector + self.Right = self.Front.cross(self.WorldUp).normalize(); // Normalize the vectors, because their length gets closer to 0 the more you look up or down which results in slower movement. + self.Up = self.Right.cross(self.Front).normalize(); + } +} diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..66c9d91 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,175 @@ +use std::convert::TryInto; +use glfw; +use glfw::{Action, Context, Key}; +use cgmath::{Matrix4, vec3, Point3, Deg, perspective}; +use cgmath::prelude::*; +const SCR_WIDTH: u32 = 1600; +const SCR_HEIGHT: u32 = 900; +const TITLE: &str = "GLFWtest"; + + +use std::sync::mpsc::Receiver; +use std::ptr; +use std::mem; +use std::os::raw::c_void; +use std::path::Path; +use std::ffi::{CString, CStr}; +mod shader; +mod model; +mod camera; +fn main() { + + let mut glfw = glfw::init(glfw::FAIL_ON_ERRORS).unwrap(); + + glfw.window_hint(glfw::WindowHint::ContextVersion(3, 3)); + glfw.window_hint(glfw::WindowHint::OpenGlProfile(glfw::OpenGlProfileHint::Core)); + glfw.window_hint(glfw::WindowHint::OpenGlForwardCompat(true)); + glfw.window_hint(glfw::WindowHint::Resizable(false)); + glfw.window_hint(glfw::WindowHint::TransparentFramebuffer(true)); + glfw.window_hint(glfw::WindowHint::Decorated(false)); + + let (mut window, events) = glfw.create_window(SCR_WIDTH, SCR_HEIGHT, TITLE, glfw::WindowMode::Windowed).unwrap(); + + let (screen_width, screen_height) = window.get_framebuffer_size(); + + + window.make_current(); + window.set_key_polling(true); + window.set_framebuffer_size_polling(true); + window.set_cursor_pos_polling(true); + window.set_cursor_mode(glfw::CursorMode::Disabled); + + + let mut camera = camera::Camera { + Position: Point3::new(0.0, 0.25, 1.0), + Pitch: -20.0, + ..camera::Camera::default() + }; + + let mut firstMouse = true; + let mut lastX: f32 = SCR_WIDTH as f32 / 2.0; + let mut lastY: f32 = SCR_HEIGHT as f32 / 2.0; + + // timing + let mut deltaTime: f32; // time between current frame and last frame + let mut lastFrame: f32 = 0.0; + + gl::load_with(|ptr| window.get_proc_address(ptr) as *const _); + + unsafe{ + gl::Enable(gl::DEPTH_TEST); + gl::DepthFunc(gl::LESS); + gl::Enable(gl::STENCIL_TEST); + gl::StencilFunc(gl::NOTEQUAL, 1, 0xFF); + gl::StencilOp(gl::KEEP, gl::KEEP, gl::REPLACE); + }; + + let (ourshader, ourModel) = unsafe { + gl::Enable(gl::DEPTH_TEST); + + let ourShader = shader::shader::new("model"); + + let ourModel = model::Model::new("resources/models/TestCarModel/CarW4.obj"); + + (ourShader, ourModel) + }; + + + + let projection: Matrix4 = perspective(Deg(45.0), SCR_WIDTH as f32/ SCR_HEIGHT as f32, 0.1, 100.0); + println!("entering main loop"); + while !window.should_close() { + let currentFrame = glfw.get_time() as f32; + deltaTime = currentFrame - lastFrame; + lastFrame = currentFrame; + + process_events(&events, &mut firstMouse, &mut lastX, &mut lastY, &mut camera); + + processInput(&mut window, deltaTime, &mut camera); + + unsafe { + gl::Clear(gl::COLOR_BUFFER_BIT | gl::DEPTH_BUFFER_BIT | gl::STENCIL_BUFFER_BIT); + gl::ClearColor(1.0, 1.0, 1.0, 1.0); + + + ourshader.Use(); + let Projection: Matrix4 = perspective(Deg(camera.Zoom), SCR_WIDTH as f32 / SCR_HEIGHT as f32, 0.1, 100.0); + let view = camera.GetViewMatrix(); + ourshader.setMat4(&CString::new("projection").unwrap(), &projection); + ourshader.setMat4(&CString::new("view").unwrap(), &view); + + + let mut model = Matrix4::::from_translation(vec3(0.0, -0.3, 0.0)); + model = model * Matrix4::from_scale(0.2); + ourshader.setMat4(&CString::new("model").unwrap(), &model); + gl::StencilFunc(gl::NOTEQUAL, 1, 0xFF); + gl::StencilMask(0x00); + //gl::Disable(gl::DEPTH_TEST); + ourModel.Draw(&ourshader); + gl::Enable(gl::DEPTH_TEST); + + } + + + window.swap_buffers(); + glfw.poll_events(); + } +} + + + + + fn processInput(window: &mut glfw::Window, deltaTime: f32, camera: &mut camera::Camera) { + if window.get_key(Key::Escape) == Action::Press { + window.set_should_close(true) + } + + if window.get_key(Key::W) == Action::Press { + camera.ProcessKeyboard(camera::Camera_Movement::FORWARD, deltaTime); + } + if window.get_key(Key::S) == Action::Press { + camera.ProcessKeyboard(camera::Camera_Movement::BACKWARD, deltaTime); + } + if window.get_key(Key::A) == Action::Press { + camera.ProcessKeyboard(camera::Camera_Movement::LEFT, deltaTime); + } + if window.get_key(Key::D) == Action::Press { + camera.ProcessKeyboard(camera::Camera_Movement::RIGHT, deltaTime); + } +} + +fn process_events(events: &Receiver<(f64, glfw::WindowEvent)>, + firstMouse: &mut bool, + lastX: &mut f32, + lastY: &mut f32, + camera: &mut camera::Camera) { + for (_, event) in glfw::flush_messages(events) { + match event { + glfw::WindowEvent::FramebufferSize(width, height) => { + // make sure the viewport matches the new window dimensions; note that width and + // height will be significantly larger than specified on retina displays. + unsafe { gl::Viewport(0, 0, width, height) } + } + glfw::WindowEvent::CursorPos(xpos, ypos) => { + let (xpos, ypos) = (xpos as f32, ypos as f32); + if *firstMouse { + *lastX = xpos; + *lastY = ypos; + *firstMouse = false; + } + + let xoffset = xpos - *lastX; + let yoffset = *lastY - ypos; // reversed since y-coordinates go from bottom to top + + *lastX = xpos; + *lastY = ypos; + + camera.ProcessMouseMovement(xoffset, yoffset, true); + } + glfw::WindowEvent::Scroll(_xoffset, yoffset) => { + camera.ProcessMouseScroll(yoffset as f32); + } + _ => {} + } + } +} diff --git a/src/model.rs b/src/model.rs new file mode 100644 index 0000000..321b695 --- /dev/null +++ b/src/model.rs @@ -0,0 +1,144 @@ +#![allow(non_snake_case)] +#![allow(dead_code)] + +use std::os::raw::c_void; +use std::path::Path; + +use cgmath::{vec2, vec3}; +use gl; +use image; +use image::DynamicImage::*; +use image::GenericImage; +use tobj; +mod mesh; +use mesh::{ Mesh, Texture, Vertex }; +use crate::shader::shader; + +#[derive(Default)] +pub struct Model { + /* Model Data */ + pub meshes: Vec, + pub textures_loaded: Vec, // stores all the textures loaded so far, optimization to make sure textures aren't loaded more than once. + directory: String, +} + +impl Model { + /// constructor, expects a filepath to a 3D model. + pub fn new(path: &str) -> Model { + let mut model = Model::default(); + model.loadModel(path); + model + } + + pub fn Draw(&self, shader: &shader) { + for mesh in &self.meshes { + unsafe { mesh.Draw(shader); } + } + } + + // loads a model from file and stores the resulting meshes in the meshes vector. + fn loadModel(&mut self, path: &str) { + let path = Path::new(path); + + // retrieve the directory path of the filepath + self.directory = path.parent().unwrap_or_else(|| Path::new("")).to_str().unwrap().into(); + let obj = tobj::load_obj(path, true/*, &tobj::LoadOptions::default()*/); + + let (models, materials) = obj.unwrap(); + for model in models { + let mesh = &model.mesh; + let num_vertices = mesh.positions.len() / 3; + + // data to fill + let mut vertices: Vec = Vec::with_capacity(num_vertices); + let indices: Vec = mesh.indices.clone(); + + println!("num vertices = {}", num_vertices); + println!("num normals = {}", &mesh.normals.len()); + println!("num TexCoords = {}", &mesh.texcoords.len()); + let (p, n, t) = (&mesh.positions, &mesh.normals, &mesh.texcoords); + for i in 0..num_vertices { + vertices.push(Vertex { + Position: vec3(p[i*3], p[i*3+1], p[i*3+2]), + Normal: vec3(n[i*3], n[i*3+1], n[i*3+2]), + TexCoords: vec2(t[i*2], t[i*2+1]), + ..Vertex::default() + }) + } + + // process material + let mut textures = Vec::new(); + if let Some(material_id) = mesh.material_id { + let material = &materials[material_id]; + + // 1. diffuse map + if !material.diffuse_texture.is_empty() { + let texture = self.loadMaterialTexture(&material.diffuse_texture, "texture_diffuse"); + textures.push(texture); + } + // 2. specular map + if !material.specular_texture.is_empty() { + let texture = self.loadMaterialTexture(&material.specular_texture, "texture_specular"); + textures.push(texture); + } + // 3. normal map + if !material.normal_texture.is_empty() { + let texture = self.loadMaterialTexture(&material.normal_texture, "texture_normal"); + textures.push(texture); + } + // NOTE: no height maps + } + + self.meshes.push(Mesh::new(vertices, indices, textures)); + } + + } + + fn loadMaterialTexture(&mut self, path: &str, typeName: &str) -> Texture { + { + let texture = self.textures_loaded.iter().find(|t| t.path == path); + if let Some(texture) = texture { + return texture.clone(); + } + } + + let texture = Texture { + id: unsafe { TextureFromFile(path, &self.directory) }, + type_: typeName.into(), + path: path.into() + }; + self.textures_loaded.push(texture.clone()); + texture + } +} + +unsafe fn TextureFromFile(path: &str, directory: &str) -> u32 { + let filename = format!("{}/{}", directory, path); + + let mut textureID = 0; + gl::GenTextures(1, &mut textureID); + + let img = image::open(&Path::new(&filename)).expect("Texture failed to load"); + let img = img.flipv(); + let format = match img { + ImageLuma8(_) => gl::RED, + ImageLumaA8(_) => gl::RG, + ImageRgb8(_) => gl::RGB, + ImageRgba8(_) => gl::RGBA, + _ => panic!("really weird image type"), + }; + + let data = img.as_bytes(); + + gl::BindTexture(gl::TEXTURE_2D, textureID); + gl::TexImage2D(gl::TEXTURE_2D, 0, format as i32, img.width() as i32, img.height() as i32, + 0, format, gl::UNSIGNED_BYTE, &data[0] as *const u8 as *const c_void); + gl::GenerateMipmap(gl::TEXTURE_2D); + + gl::TexParameteri(gl::TEXTURE_2D, gl::TEXTURE_WRAP_S, gl::REPEAT as i32); + gl::TexParameteri(gl::TEXTURE_2D, gl::TEXTURE_WRAP_T, gl::REPEAT as i32); + gl::TexParameteri(gl::TEXTURE_2D, gl::TEXTURE_MIN_FILTER, gl::LINEAR_MIPMAP_LINEAR as i32); + gl::TexParameteri(gl::TEXTURE_2D, gl::TEXTURE_MAG_FILTER, gl::LINEAR as i32); + + textureID +} diff --git a/src/model/mesh.rs b/src/model/mesh.rs new file mode 100644 index 0000000..a94421c --- /dev/null +++ b/src/model/mesh.rs @@ -0,0 +1,162 @@ +#![allow(non_snake_case)] +#![allow(dead_code)] + +use std::ffi::CString; +use std::mem::size_of; +use std::os::raw::c_void; +use std::ptr; + +use cgmath::{ Vector3, Vector2 }; +use cgmath::prelude::*; +use gl; +use field_offset::offset_of; + +use crate::shader::shader; +// NOTE: without repr(C) the compiler may reorder the fields or use different padding/alignment than C. +// Depending on how you pass the data to OpenGL, this may be bad. In this case it's not strictly +// necessary though because of the `offset!` macro used below in setupMesh() +#[repr(C)] +pub struct Vertex { + // position + pub Position: Vector3, + // normal + pub Normal: Vector3, + // texCoords + pub TexCoords: Vector2, + // tangent + pub Tangent: Vector3, + // bitangent + pub Bitangent: Vector3, +} + +impl Default for Vertex { + fn default() -> Self { + Vertex { + Position: Vector3::zero(), + Normal: Vector3::zero(), + TexCoords: Vector2::zero(), + Tangent: Vector3::zero(), + Bitangent: Vector3::zero(), + } + } +} + +#[derive(Clone)] +pub struct Texture { + pub id: u32, + pub type_: String, + pub path: String, +} + +pub struct Mesh { + /* Mesh Data */ + pub vertices: Vec, + pub indices: Vec, + pub textures: Vec, + pub VAO: u32, + + /* Render data */ + VBO: u32, + EBO: u32, +} + +impl Mesh { + pub fn new(vertices: Vec, indices: Vec, textures: Vec) -> Mesh { + let mut mesh = Mesh { + vertices, indices, textures, + VAO: 0, VBO: 0, EBO: 0 + }; + + // now that we have all the required data, set the vertex buffers and its attribute pointers. + unsafe { mesh.setupMesh() } + mesh + } + + /// render the mesh + pub unsafe fn Draw(&self, shader: &shader) { + // bind appropriate textures + let mut diffuseNr = 0; + let mut specularNr = 0; + let mut normalNr = 0; + let mut heightNr = 0; + for (i, texture) in self.textures.iter().enumerate() { + gl::ActiveTexture(gl::TEXTURE0 + i as u32); // active proper texture unit before binding + // retrieve texture number (the N in diffuse_textureN) + let name = &texture.type_; + let number = match name.as_str() { + "texture_diffuse" => { + diffuseNr += 1; + diffuseNr + }, + "texture_specular" => { + specularNr += 1; + specularNr + } + "texture_normal" => { + normalNr += 1; + normalNr + } + "texture_height" => { + heightNr += 1; + heightNr + } + _ => panic!("unknown texture type") + }; + // now set the sampler to the correct texture unit + let sampler = CString::new(format!("{}{}", name, number)).unwrap(); + gl::Uniform1i(gl::GetUniformLocation(shader.ID, sampler.as_ptr()), i as i32); + // and finally bind the texture + gl::BindTexture(gl::TEXTURE_2D, texture.id); + } + + // draw mesh + gl::BindVertexArray(self.VAO); + gl::DrawElements(gl::TRIANGLES, self.indices.len() as i32, gl::UNSIGNED_INT, ptr::null()); + gl::BindVertexArray(0); + + // always good practice to set everything back to defaults once configured. + gl::ActiveTexture(gl::TEXTURE0); + } + + unsafe fn setupMesh(&mut self) { + // create buffers/arrays + gl::GenVertexArrays(1, &mut self.VAO); + gl::GenBuffers(1, &mut self.VBO); + gl::GenBuffers(1, &mut self.EBO); + + gl::BindVertexArray(self.VAO); + // load data into vertex buffers + gl::BindBuffer(gl::ARRAY_BUFFER, self.VBO); + // A great thing about structs with repr(C) is that their memory layout is sequential for all its items. + // The effect is that we can simply pass a pointer to the struct and it translates perfectly to a glm::vec3/2 array which + // again translates to 3/2 floats which translates to a byte array. + let size = (self.vertices.len() * size_of::()) as isize; + let data = &self.vertices[0] as *const Vertex as *const c_void; + gl::BufferData(gl::ARRAY_BUFFER, size, data, gl::STATIC_DRAW); + + gl::BindBuffer(gl::ELEMENT_ARRAY_BUFFER, self.EBO); + let size = (self.indices.len() * size_of::()) as isize; + let data = &self.indices[0] as *const u32 as *const c_void; + gl::BufferData(gl::ELEMENT_ARRAY_BUFFER, size, data, gl::STATIC_DRAW); + + // set the vertex attribute pointers + let size = size_of::() as i32; + // vertex Positions + gl::EnableVertexAttribArray(0); + gl::VertexAttribPointer(0, 3, gl::FLOAT, gl::FALSE, size, offset_of!(Vertex => Position).get_byte_offset() as *const c_void); + // vertex normals + gl::EnableVertexAttribArray(1); + gl::VertexAttribPointer(1, 3, gl::FLOAT, gl::FALSE, size, offset_of!(Vertex => Normal).get_byte_offset() as *const c_void); + // vertex texture coords + gl::EnableVertexAttribArray(2); + gl::VertexAttribPointer(2, 2, gl::FLOAT, gl::FALSE, size, offset_of!(Vertex => TexCoords).get_byte_offset() as *const c_void); + // vertex tangent + gl::EnableVertexAttribArray(3); + gl::VertexAttribPointer(3, 3, gl::FLOAT, gl::FALSE, size, offset_of!(Vertex => Tangent).get_byte_offset() as *const c_void); + // vertex bitangent + gl::EnableVertexAttribArray(4); + gl::VertexAttribPointer(4, 3, gl::FLOAT, gl::FALSE, size, offset_of!(Vertex => Bitangent).get_byte_offset() as *const c_void); + + gl::BindVertexArray(0); + } +} diff --git a/src/shader.rs b/src/shader.rs new file mode 100644 index 0000000..8669e62 --- /dev/null +++ b/src/shader.rs @@ -0,0 +1,171 @@ + +use gl; +use std::fs; +use std::ffi::{CString, CStr}; +use std::str; +use cgmath::prelude::*; + /// Shader Struct for creating and using shaders in the Context of engine + /// + pub struct shader { + + pub ID: gl::types::GLuint, + } + + + + impl shader + { + /// Shader Constructor, will read, Compile and Create GLSL Program for use + /// + /// # Example + /// `new(String::from("Example"))` + /// if the String given was "Example" the Program expects both shaders to be in the directory "resources/shaders/Example/" + /// with the vertex shader being called "shader.vert" and fragment "shader.frag" + pub fn new(path: &str) -> shader + { + //read file contents + let VERT_SHADER = fs::read_to_string(format!("resources/shaders/{path}/shader.vert")).unwrap(); + let FRAG_SHADER = std::fs::read_to_string(format!("resources/shaders/{path}/shader.frag")).unwrap(); + + //create vertex shader + let vertex_shader = unsafe {gl::CreateShader(gl::VERTEX_SHADER) }; + unsafe { + gl::ShaderSource(vertex_shader, 1, &VERT_SHADER.as_bytes().as_ptr().cast(), &VERT_SHADER.len().try_into().unwrap()); + gl::CompileShader(vertex_shader); + } + //error Checking + let mut success = 0; + unsafe { + gl::GetShaderiv(vertex_shader, gl::COMPILE_STATUS, &mut success); + if success == 0 { + let mut log_len = 0_i32; + + let mut v: Vec = Vec::with_capacity(1024); + gl::GetShaderInfoLog(vertex_shader, 1024, &mut log_len, v.as_mut_ptr().cast()); + v.set_len(log_len.try_into().unwrap()); + panic!("Vertex Shader Compile Error: {}", String::from_utf8_lossy(&v)); + } + + let fragment_shader = gl::CreateShader(gl::FRAGMENT_SHADER); + gl::ShaderSource(fragment_shader, 1, &FRAG_SHADER.as_bytes().as_ptr().cast(), &FRAG_SHADER.len().try_into().unwrap()); + gl::CompileShader(fragment_shader); + + let mut success = 0; + gl::GetShaderiv(fragment_shader, gl::COMPILE_STATUS, &mut success); + if success == 0 { + let mut v: Vec = Vec::with_capacity(1024); + let mut log_len = 0_i32; + gl::GetShaderInfoLog(fragment_shader, 1024, &mut log_len, v.as_mut_ptr().cast()); + v.set_len(log_len.try_into().unwrap()); + panic!("Fragment Shader Compile Error: {}", String::from_utf8_lossy(&v)); + } + + let shader_program = gl::CreateProgram(); + + gl::AttachShader(shader_program, vertex_shader); + gl::AttachShader(shader_program, fragment_shader); + gl::LinkProgram(shader_program); + + let mut success = 0; + gl::GetProgramiv(shader_program, gl::LINK_STATUS, &mut success); + if success == 0 { + let mut v: Vec = Vec::with_capacity(1024); + let mut log_len = 0_i32; + gl::GetProgramInfoLog(shader_program, 1024, &mut log_len, v.as_mut_ptr().cast()); + v.set_len(log_len.try_into().unwrap()); + panic!("Program Link Error: {}", String::from_utf8_lossy(&v)); + } + + gl::DetachShader(shader_program, vertex_shader); + gl::DetachShader(shader_program, fragment_shader); + gl::DeleteShader(vertex_shader); + gl::DeleteShader(fragment_shader); + + + + // return program + shader { + ID: shader_program, + } + } + } + /// uses Shader + pub fn Use(&self) + { + unsafe {gl::UseProgram(self.ID);} + } + + // BOILERPLATE JUMPSCARE + pub fn setBool(&self, name: &CStr, value: bool ) + {unsafe {gl::Uniform1i(gl::GetUniformLocation(self.ID, name.as_ptr()), value as i32);}} + + pub fn setInt(&self, name: &CStr, value: u32 ) + {unsafe {gl::Uniform1i(gl::GetUniformLocation(self.ID, name.as_ptr()), value as i32);}} + + pub fn setFloat(&self, name: &CStr, value: f32 ) + {unsafe {gl::Uniform1f(gl::GetUniformLocation(self.ID, name.as_ptr()), value as f32);}} + + pub fn setVec2(&self, name: &CStr, value: &cgmath::Vector2 ) + {unsafe {gl::Uniform2fv(gl::GetUniformLocation(self.ID, name.as_ptr()), 1, value.as_ptr());}} + + pub fn setVector2d(&self, name: &CStr, x: f32, y: f32) + {unsafe {gl::Uniform2f(gl::GetUniformLocation(self.ID, name.as_ptr()), x, y);}} + + pub fn setVector3(&self, name: &CStr, value: cgmath::Vector3 ) + {unsafe {gl::Uniform3fv(gl::GetUniformLocation(self.ID, name.as_ptr()), 1, value.as_ptr());}} + + pub fn setVector3d(&self, name: &CStr, x: f32, y: f32, z: f32 ) + {unsafe {gl::Uniform3f(gl::GetUniformLocation(self.ID, name.as_ptr()), x, y, z);}} + + pub fn setVector4(&self, name: &CStr, value: &cgmath::Vector4 ) + {unsafe {gl::Uniform4fv(gl::GetUniformLocation(self.ID, name.as_ptr()), 1, value.as_ptr());}} + + pub fn setVector4d(&self, name: &CStr, x: f32, y: f32, z: f32, w: f32) + {unsafe {gl::Uniform4f(gl::GetUniformLocation(self.ID, name.as_ptr()), x, y, z, w);}} + + pub fn setMat2(&self, name: &CStr, value: &cgmath::Matrix2) + {unsafe {gl::UniformMatrix2fv(gl::GetUniformLocation(self.ID, name.as_ptr()), 1, gl::FALSE, value.as_ptr());}} + + pub fn setMat3(&self, name: &CStr, value: &cgmath::Matrix3) + {unsafe {gl::UniformMatrix3fv(gl::GetUniformLocation(self.ID, name.as_ptr()), 1, gl::FALSE, value.as_ptr());}} + + pub fn setMat4(&self, name: &CStr, value: &cgmath::Matrix4) + {unsafe {gl::UniformMatrix4fv(gl::GetUniformLocation(self.ID, name.as_ptr()), 1, gl::FALSE, value.as_ptr());}} + + + } + + + +#[cfg(test)] + mod tests { + use glfw; + use glfw::Context; + use gl; + use super::*; + + #[test] + fn ShaderLoading() { + + // initialize GLFW + let mut glfw = glfw::init(glfw::FAIL_ON_ERRORS).unwrap(); + // set window hints + glfw.window_hint(glfw::WindowHint::ContextVersion(3, 3)); + glfw.window_hint(glfw::WindowHint::OpenGlProfile(glfw::OpenGlProfileHint::Core)); + glfw.window_hint(glfw::WindowHint::OpenGlForwardCompat(true)); + glfw.window_hint(glfw::WindowHint::Resizable(false)); + + //create Window + let (mut window, events) = glfw.create_window(480, 320, "Shader Test", glfw::WindowMode::Windowed).unwrap(); + let (screen_width, screen_height) = window.get_framebuffer_size(); + + // setup window + window.make_current(); + window.set_key_polling(true); + // initialize gl + gl::load_with(|ptr| window.get_proc_address(ptr) as *const _); + + let Shader = shader::new("basic"); + Shader.Use(); + } + }