diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..b18963f4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,11 @@ +blank_issues_enabled: true +contact_links: + - name: Game issue + about: Create an Game related issue + url: https://github.com/AnonymusRaccoon/Bomberman/issues/new?projects=AnonymusRaccoon/Bomberman/2&labels=Game + - name: ECS issue + about: Create an ECS related issue + url: https://github.com/AnonymusRaccoon/Bomberman/issues/new?projects=AnonymusRaccoon/Bomberman/1&labels=ECS + - name: Renderer issue + about: Create an Renderer/Encapsulation related issue + url: https://github.com/AnonymusRaccoon/Bomberman/issues/new?projects=AnonymusRaccoon/Bomberman/3&labels=Renderer \ No newline at end of file diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..2753adaa --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,24 @@ +## Proposed changes + +### Make sure that the pull request is going to `develop` branch + +### Add all necessary labels to understand with ease the scope of this pull request + +Describe here the big picture of your changes here to communicate to the others members of the group and why we should accept this pull request. + +### If it fixes a bug or resolves a feature request, be sure to link to that issue. + +## Information +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] Non-breaking changes + +## Checklist + +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] I have added necessary documentation + +## Further comments + +### If not needed, remove this section +If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did +and what alternatives you considered, etc... diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 72b6ac4d..beea1b7f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,8 +9,8 @@ jobs: strategy: matrix: include: - - os: ubuntu-latest - name: Linux + # - os: ubuntu-latest + # name: Linux # - os: macOS-latest # name: MacOS - os: windows-latest diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml new file mode 100644 index 00000000..5bcd28fe --- /dev/null +++ b/.github/workflows/build_linux.yml @@ -0,0 +1,21 @@ +name: Linux Build epi env +on: [push, pull_request] + +jobs: + testbox: + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository + runs-on: ubuntu-latest + container: + image: epitechcontent/epitest-docker:latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Build + run: | + mkdir build && cd build + cmake .. + cmake --build . + - name: CheckBinaryName + shell: bash + run: test -f build/bomberman \ No newline at end of file diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml new file mode 100644 index 00000000..c8456f8d --- /dev/null +++ b/.github/workflows/codingstyle.yml @@ -0,0 +1,13 @@ +name: Check coding style +on: [push] + +jobs: + Building: + runs-on: [ubuntu-latest] + steps: + - uses: actions/checkout@v1 + - name: Install cpplint + run: pip install cpplint + - name: Check coding style + run: | + cpplint --recursive --quiet --verbose=3 . \ No newline at end of file diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index de0e84de..c95c1527 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -4,7 +4,6 @@ on: push: branches: - master - - workflow jobs: Building: diff --git a/CMakeLists.txt b/CMakeLists.txt index c948f529..5c601834 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,7 @@ set(CMAKE_CXX_STANDARD 20) include_directories(bomberman lib/Ray/sources) include_directories(bomberman lib/wal/sources) +include_directories(bomberman sources) add_subdirectory(${PROJECT_SOURCE_DIR}/lib/wal) add_subdirectory(${PROJECT_SOURCE_DIR}/lib/Ray) @@ -38,12 +39,24 @@ set(SOURCES sources/Models/Vector3.hpp sources/Component/GridCentered/GridCenteredComponent.cpp sources/Component/GridCentered/GridCenteredComponent.hpp - sources/System/GridCentered/GridCenteredSystem.cpp sources/System/GridCentered/GridCenteredSystem.hpp) + sources/System/GridCentered/GridCenteredSystem.cpp + sources/System/GridCentered/GridCenteredSystem.hpp + sources/Models/Vector2.hpp + sources/Component/Renderer/Drawable3DComponent.hpp + sources/Component/Renderer/Drawable2DComponent.hpp + sources/System/Renderer/Renderer3DSystem.hpp + sources/System/Renderer/Renderer2DSystem.hpp + sources/System/Renderer/RenderScreenSystem.hpp + sources/System/Renderer/RenderScreenSystem.cpp + sources/Component/Renderer/CameraComponent.cpp + sources/Component/Renderer/CameraComponent.hpp + sources/System/Renderer/Render2DScreenSystem.cpp + sources/System/Renderer/Render2DScreenSystem.hpp +) add_executable(bomberman - sources/main.cpp - ${SOURCES} -) + sources/main.cpp + ${SOURCES}) target_include_directories(bomberman PUBLIC sources) target_link_libraries(bomberman PUBLIC wal ray) diff --git a/README.md b/README.md new file mode 100644 index 00000000..7f81836d --- /dev/null +++ b/README.md @@ -0,0 +1,68 @@ +# Bomberman + +A recreation of the classic Bomberman arcade game + +Repository link: https://github.com/AnonymusRaccoon/Bomberman/ + +## Demo + +Very soon :) + + +## Screenshots + +Very soon :) + + +## Run (compile from the sources) + +Clone the project + +```bash +git clone https://github.com/AnonymusRaccoon/Bomberman.git +``` + +Go to the project directory + +```bash +cd Bomberman +``` + +Create `build` dir and compile using CMake + +```bash +mkdir build && cd build && cmake .. && make +``` + +Enjoy ! + +```bash +./bomberman +``` + + +## Documentation + +[Doxygen Documentation](https://anonymusraccoon.github.io/Bomberman/) + + +## Tech Stack + +**Bomberman:** C++20, raylib, Catch2, CMake, Doxygen +## Contributing + +Contributions are always welcome! + +See `contributing.md` for ways to get started. + +Please adhere to this project's `code of conduct`. + + +## Authors + +- [Zoe Roux](https://github.com/AnonymusRaccoon "Anonymus Raccoon") +- [ClĂ©ment Le Bihan](https://github.com/Octopus773 "Octopus") +- [Arthur Jamet](https://github.com/Arthi-chaud "Arthi-Chaud") +- [Louis Auzuret](https://github.com/GitBluub "Bluub") +- [Benjamin Henry](https://github.com/EternalRat "EternalRat") +- [Tom Augier](https://github.com/TrueBabyChaise "TrueBabyChaise") \ No newline at end of file diff --git a/assets/bombs/bomb.mtl b/assets/bombs/bomb.mtl new file mode 100644 index 00000000..b9a2168c --- /dev/null +++ b/assets/bombs/bomb.mtl @@ -0,0 +1,12 @@ +# Blender MTL File: 'None' +# Material Count: 1 + +newmtl mat_ob001_bomb_002-material.001 +Ns 323.999994 +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.000000 +d 1.000000 +illum 2 diff --git a/assets/bombs/bomb.obj b/assets/bombs/bomb.obj new file mode 100644 index 00000000..85c5183c --- /dev/null +++ b/assets/bombs/bomb.obj @@ -0,0 +1,2924 @@ +# Blender v2.92.0 OBJ File: '' +# www.blender.org +mtllib bomb.mtl +o mesh_ob001_bomb.002 +v 0.101867 0.111998 -0.255820 +v 0.111869 0.227722 -0.335354 +v 0.193763 0.183054 -0.268270 +v 0.101867 0.111998 -0.255820 +v 0.058812 0.135482 -0.291088 +v 0.111869 0.227722 -0.335354 +v 0.058812 0.135482 -0.291088 +v 0.000000 0.244072 -0.359907 +v 0.111869 0.227722 -0.335354 +v 0.058812 0.135482 -0.291088 +v 0.000000 0.144077 -0.303997 +v 0.000000 0.244072 -0.359907 +v 0.000000 0.144077 -0.303997 +v -0.111869 0.227722 -0.335354 +v 0.000000 0.244072 -0.359907 +v 0.000000 0.144077 -0.303997 +v -0.058812 0.135482 -0.291088 +v -0.111869 0.227722 -0.335354 +v -0.058812 0.135482 -0.291088 +v -0.193763 0.183054 -0.268270 +v -0.111869 0.227722 -0.335354 +v -0.058812 0.135482 -0.291088 +v -0.101867 0.111998 -0.255820 +v -0.193763 0.183054 -0.268270 +v -0.101867 0.111998 -0.255820 +v -0.223737 0.122036 -0.176632 +v -0.193763 0.183054 -0.268270 +v -0.101867 0.111998 -0.255820 +v -0.117626 0.079920 -0.207644 +v -0.223737 0.122036 -0.176632 +v -0.117626 0.079920 -0.207644 +v -0.193763 0.061018 -0.084995 +v -0.223737 0.122036 -0.176632 +v -0.117626 0.079920 -0.207644 +v -0.101867 0.047840 -0.159467 +v -0.193763 0.061018 -0.084995 +v -0.101867 0.047840 -0.159467 +v -0.111869 0.016349 -0.017911 +v -0.193763 0.061018 -0.084995 +v -0.101867 0.047840 -0.159467 +v -0.058812 0.024357 -0.124199 +v -0.111869 0.016349 -0.017911 +v -0.058812 0.024357 -0.124199 +v 0.000000 -0.000000 0.006643 +v -0.111869 0.016349 -0.017911 +v -0.058812 0.024357 -0.124199 +v 0.000000 0.015761 -0.111290 +v 0.000000 -0.000000 0.006643 +v 0.111869 0.227722 -0.335354 +v 0.000000 0.244072 -0.359907 +v 0.000000 0.355602 -0.380587 +v 0.000000 0.244072 -0.359907 +v -0.153974 0.333098 -0.346792 +v 0.000000 0.355602 -0.380587 +v 0.000000 0.244072 -0.359907 +v -0.111869 0.227722 -0.335354 +v -0.153974 0.333098 -0.346792 +v -0.111869 0.227722 -0.335354 +v -0.266692 0.271618 -0.254459 +v -0.153974 0.333098 -0.346792 +v -0.111869 0.227722 -0.335354 +v -0.193763 0.183054 -0.268270 +v -0.266692 0.271618 -0.254459 +v -0.193763 0.183054 -0.268270 +v -0.307949 0.187634 -0.128331 +v -0.266692 0.271618 -0.254459 +v -0.193763 0.183054 -0.268270 +v -0.223737 0.122036 -0.176632 +v -0.307949 0.187634 -0.128331 +v -0.223737 0.122036 -0.176632 +v -0.266692 0.103650 -0.002202 +v -0.307949 0.187634 -0.128331 +v -0.223737 0.122036 -0.176632 +v -0.193763 0.061018 -0.084995 +v -0.266692 0.103650 -0.002202 +v -0.193763 0.061018 -0.084995 +v -0.153974 0.042169 0.090130 +v -0.266692 0.103650 -0.002202 +v -0.193763 0.061018 -0.084995 +v -0.111869 0.016349 -0.017911 +v -0.153974 0.042169 0.090130 +v -0.111869 0.016349 -0.017911 +v 0.000000 0.019665 0.123926 +v -0.153974 0.042169 0.090130 +v -0.111869 0.016349 -0.017911 +v 0.000000 -0.000000 0.006643 +v 0.000000 0.019665 0.123926 +v 0.000000 0.355602 -0.380587 +v -0.153974 0.333098 -0.346792 +v -0.181008 0.441296 -0.324284 +v 0.000000 0.355602 -0.380587 +v -0.181008 0.441296 -0.324284 +v 0.000000 0.467750 -0.364013 +v 0.193763 0.183054 -0.268270 +v 0.111869 0.227722 -0.335354 +v 0.153974 0.333098 -0.346792 +v 0.153974 0.333098 -0.346792 +v 0.000000 0.355602 -0.380587 +v 0.000000 0.467750 -0.364013 +v 0.111869 0.227722 -0.335354 +v 0.000000 0.355602 -0.380587 +v 0.153974 0.333098 -0.346792 +v 0.193763 0.183054 -0.268270 +v 0.153974 0.333098 -0.346792 +v 0.266692 0.271618 -0.254459 +v 0.223737 0.122036 -0.176632 +v 0.193763 0.183054 -0.268270 +v 0.266692 0.271618 -0.254459 +v 0.117626 0.079920 -0.207644 +v 0.101867 0.111998 -0.255820 +v 0.193763 0.183054 -0.268270 +v 0.117626 0.079920 -0.207644 +v 0.193763 0.183054 -0.268270 +v 0.223737 0.122036 -0.176632 +v 0.101867 0.047840 -0.159467 +v 0.117626 0.079920 -0.207644 +v 0.223737 0.122036 -0.176632 +v 0.101867 0.047840 -0.159467 +v 0.223737 0.122036 -0.176632 +v 0.193763 0.061018 -0.084995 +v 0.058812 0.024357 -0.124199 +v 0.101867 0.047840 -0.159467 +v 0.193763 0.061018 -0.084995 +v 0.058812 0.024357 -0.124199 +v 0.193763 0.061018 -0.084995 +v 0.111869 0.016349 -0.017911 +v 0.000000 0.015761 -0.111290 +v 0.058812 0.024357 -0.124199 +v 0.111869 0.016349 -0.017911 +v 0.000000 0.015761 -0.111290 +v 0.111869 0.016349 -0.017911 +v 0.000000 -0.000000 0.006643 +v 0.000000 -0.000000 0.006643 +v 0.111869 0.016349 -0.017911 +v 0.153974 0.042169 0.090130 +v 0.000000 -0.000000 0.006643 +v 0.153974 0.042169 0.090130 +v 0.000000 0.019665 0.123926 +v 0.111869 0.016349 -0.017911 +v 0.193763 0.061018 -0.084995 +v 0.266692 0.103650 -0.002202 +v 0.111869 0.016349 -0.017911 +v 0.266692 0.103650 -0.002202 +v 0.153974 0.042169 0.090130 +v 0.193763 0.061018 -0.084995 +v 0.223737 0.122036 -0.176632 +v 0.307949 0.187634 -0.128331 +v 0.223737 0.122036 -0.176632 +v 0.266692 0.271618 -0.254459 +v 0.307949 0.187634 -0.128331 +v 0.193763 0.061018 -0.084995 +v 0.307949 0.187634 -0.128331 +v 0.266692 0.103650 -0.002202 +v 0.000000 0.019665 0.123926 +v 0.153974 0.042169 0.090130 +v 0.181007 0.099288 0.189349 +v 0.000000 0.019665 0.123926 +v 0.181007 0.099288 0.189349 +v 0.000000 0.072834 0.229078 +v 0.153974 0.042169 0.090130 +v 0.266692 0.103650 -0.002202 +v 0.313515 0.171563 0.080805 +v 0.153974 0.042169 0.090130 +v 0.313515 0.171563 0.080805 +v 0.181007 0.099288 0.189349 +v 0.266692 0.103650 -0.002202 +v 0.307949 0.187634 -0.128331 +v 0.362015 0.270292 -0.067467 +v 0.266692 0.103650 -0.002202 +v 0.362015 0.270292 -0.067467 +v 0.313515 0.171563 0.080805 +v 0.307949 0.187634 -0.128331 +v 0.313515 0.369021 -0.215740 +v 0.362015 0.270292 -0.067467 +v 0.307949 0.187634 -0.128331 +v 0.266692 0.271618 -0.254459 +v 0.313515 0.369021 -0.215740 +v 0.266692 0.271618 -0.254459 +v 0.153974 0.333098 -0.346792 +v 0.181007 0.441296 -0.324284 +v 0.153974 0.333098 -0.346792 +v 0.000000 0.467750 -0.364013 +v 0.181007 0.441296 -0.324284 +v 0.266692 0.271618 -0.254459 +v 0.181007 0.441296 -0.324284 +v 0.313515 0.369021 -0.215740 +v 0.313515 0.369021 -0.215740 +v 0.181007 0.441296 -0.324284 +v 0.190323 0.541723 -0.270032 +v 0.313515 0.369021 -0.215740 +v 0.190323 0.541723 -0.270032 +v 0.329649 0.465730 -0.155903 +v 0.362015 0.270292 -0.067467 +v 0.313515 0.369021 -0.215740 +v 0.329649 0.465730 -0.155903 +v 0.181007 0.441296 -0.324284 +v 0.000000 0.569539 -0.311806 +v 0.190323 0.541723 -0.270032 +v 0.181007 0.441296 -0.324284 +v 0.000000 0.467750 -0.364013 +v 0.000000 0.569539 -0.311806 +v 0.000000 0.467750 -0.364013 +v -0.181008 0.441296 -0.324284 +v -0.190323 0.541723 -0.270032 +v 0.000000 0.467750 -0.364013 +v -0.190323 0.541723 -0.270032 +v 0.000000 0.569539 -0.311806 +v -0.181008 0.441296 -0.324284 +v -0.329649 0.465730 -0.155903 +v -0.190323 0.541723 -0.270032 +v -0.153974 0.333098 -0.346792 +v -0.313515 0.369021 -0.215740 +v -0.181008 0.441296 -0.324284 +v -0.153974 0.333098 -0.346792 +v -0.266692 0.271618 -0.254459 +v -0.313515 0.369021 -0.215740 +v -0.181008 0.441296 -0.324284 +v -0.313515 0.369021 -0.215740 +v -0.329649 0.465730 -0.155903 +v -0.266692 0.271618 -0.254459 +v -0.307949 0.187634 -0.128331 +v -0.362015 0.270292 -0.067467 +v -0.266692 0.271618 -0.254459 +v -0.362015 0.270292 -0.067467 +v -0.313515 0.369021 -0.215740 +v -0.307949 0.187634 -0.128331 +v -0.313515 0.171563 0.080805 +v -0.362015 0.270292 -0.067467 +v -0.307949 0.187634 -0.128331 +v -0.266692 0.103650 -0.002202 +v -0.313515 0.171563 0.080805 +v -0.266692 0.103650 -0.002202 +v -0.153974 0.042169 0.090130 +v -0.181008 0.099288 0.189349 +v -0.266692 0.103650 -0.002202 +v -0.181008 0.099288 0.189349 +v -0.313515 0.171563 0.080805 +v -0.153974 0.042169 0.090130 +v 0.000000 0.019665 0.123926 +v 0.000000 0.072834 0.229078 +v -0.153974 0.042169 0.090130 +v 0.000000 0.072834 0.229078 +v -0.181008 0.099288 0.189349 +v -0.313515 0.369021 -0.215740 +v -0.380646 0.361919 0.000000 +v -0.329649 0.465730 -0.155903 +v -0.313515 0.369021 -0.215740 +v -0.362015 0.270292 -0.067467 +v -0.380646 0.361919 0.000000 +v -0.362015 0.270292 -0.067467 +v -0.313515 0.171563 0.080805 +v -0.329649 0.258109 0.155903 +v -0.362015 0.270292 -0.067467 +v -0.329649 0.258109 0.155903 +v -0.380646 0.361919 0.000000 +v -0.313515 0.171563 0.080805 +v -0.181008 0.099288 0.189349 +v -0.190323 0.182115 0.270032 +v -0.313515 0.171563 0.080805 +v -0.190323 0.182115 0.270032 +v -0.329649 0.258109 0.155903 +v -0.181008 0.099288 0.189349 +v 0.000000 0.154299 0.311806 +v -0.190323 0.182115 0.270032 +v -0.181008 0.099288 0.189349 +v 0.000000 0.072834 0.229078 +v 0.000000 0.154299 0.311806 +v -0.329649 0.465730 -0.155903 +v -0.380646 0.361919 0.000000 +v -0.362015 0.453546 0.067467 +v -0.380646 0.361919 0.000000 +v -0.329649 0.258109 0.155903 +v -0.313515 0.354818 0.215740 +v -0.380646 0.361919 0.000000 +v -0.313515 0.354818 0.215740 +v -0.362015 0.453546 0.067467 +v -0.329649 0.258109 0.155903 +v -0.181008 0.282542 0.324284 +v -0.313515 0.354818 0.215740 +v -0.329649 0.258109 0.155903 +v -0.190323 0.182115 0.270032 +v -0.181008 0.282542 0.324284 +v -0.190323 0.182115 0.270032 +v 0.000000 0.154299 0.311806 +v 0.000000 0.256088 0.364013 +v -0.190323 0.182115 0.270032 +v 0.000000 0.256088 0.364013 +v -0.181008 0.282542 0.324284 +v -0.362015 0.453546 0.067467 +v -0.313515 0.354818 0.215740 +v -0.266692 0.452220 0.254459 +v -0.362015 0.453546 0.067467 +v -0.266692 0.452220 0.254459 +v -0.307949 0.536205 0.128331 +v -0.190323 0.541723 -0.270032 +v -0.329649 0.465730 -0.155903 +v -0.313515 0.552276 -0.080805 +v -0.313515 0.552276 -0.080805 +v -0.362015 0.453546 0.067467 +v -0.307949 0.536205 0.128331 +v -0.329649 0.465730 -0.155903 +v -0.362015 0.453546 0.067467 +v -0.313515 0.552276 -0.080805 +v -0.190323 0.541723 -0.270032 +v -0.313515 0.552276 -0.080805 +v -0.181008 0.624550 -0.189349 +v 0.000000 0.569539 -0.311806 +v -0.190323 0.541723 -0.270032 +v -0.181008 0.624550 -0.189349 +v 0.000000 0.569539 -0.311806 +v -0.181008 0.624550 -0.189349 +v 0.000000 0.651005 -0.229078 +v 0.190323 0.541723 -0.270032 +v 0.000000 0.569539 -0.311806 +v 0.000000 0.651005 -0.229078 +v 0.190323 0.541723 -0.270032 +v 0.000000 0.651005 -0.229078 +v 0.181007 0.624550 -0.189349 +v 0.329649 0.465730 -0.155903 +v 0.190323 0.541723 -0.270032 +v 0.181007 0.624550 -0.189349 +v 0.329649 0.465730 -0.155903 +v 0.181007 0.624550 -0.189349 +v 0.313515 0.552276 -0.080805 +v 0.313515 0.171563 0.080805 +v 0.362015 0.270292 -0.067467 +v 0.380646 0.361919 0.000000 +v 0.380646 0.361919 0.000000 +v 0.329649 0.465730 -0.155903 +v 0.313515 0.552276 -0.080805 +v 0.362015 0.270292 -0.067467 +v 0.329649 0.465730 -0.155903 +v 0.380646 0.361919 0.000000 +v 0.313515 0.171563 0.080805 +v 0.380646 0.361919 0.000000 +v 0.329649 0.258109 0.155903 +v 0.181007 0.099288 0.189349 +v 0.313515 0.171563 0.080805 +v 0.329649 0.258109 0.155903 +v 0.181007 0.099288 0.189349 +v 0.329649 0.258109 0.155903 +v 0.190323 0.182115 0.270032 +v 0.000000 0.072834 0.229078 +v 0.181007 0.099288 0.189349 +v 0.190323 0.182115 0.270032 +v 0.000000 0.072834 0.229078 +v 0.190323 0.182115 0.270032 +v 0.000000 0.154299 0.311806 +v 0.000000 0.154299 0.311806 +v 0.190323 0.182115 0.270032 +v 0.181007 0.282542 0.324284 +v 0.000000 0.154299 0.311806 +v 0.181007 0.282542 0.324284 +v 0.000000 0.256088 0.364013 +v 0.190323 0.182115 0.270032 +v 0.313515 0.354818 0.215740 +v 0.181007 0.282542 0.324284 +v 0.190323 0.182115 0.270032 +v 0.329649 0.258109 0.155903 +v 0.313515 0.354818 0.215740 +v 0.380646 0.361919 0.000000 +v 0.313515 0.552276 -0.080805 +v 0.362015 0.453546 0.067467 +v 0.329649 0.258109 0.155903 +v 0.362015 0.453546 0.067467 +v 0.313515 0.354818 0.215740 +v 0.329649 0.258109 0.155903 +v 0.380646 0.361919 0.000000 +v 0.362015 0.453546 0.067467 +v 0.313515 0.552276 -0.080805 +v 0.181007 0.624550 -0.189349 +v 0.153974 0.681669 -0.090130 +v 0.313515 0.552276 -0.080805 +v 0.153974 0.681669 -0.090130 +v 0.266692 0.620189 0.002202 +v 0.362015 0.453546 0.067467 +v 0.313515 0.552276 -0.080805 +v 0.266692 0.620189 0.002202 +v 0.000000 0.256088 0.364013 +v 0.181007 0.282542 0.324284 +v 0.153974 0.390740 0.346792 +v 0.000000 0.256088 0.364013 +v 0.153974 0.390740 0.346792 +v 0.000000 0.368236 0.380587 +v 0.181007 0.282542 0.324284 +v 0.266692 0.452220 0.254459 +v 0.153974 0.390740 0.346792 +v 0.181007 0.282542 0.324284 +v 0.313515 0.354818 0.215740 +v 0.266692 0.452220 0.254459 +v 0.313515 0.354818 0.215740 +v 0.307949 0.536205 0.128331 +v 0.266692 0.452220 0.254459 +v 0.313515 0.354818 0.215740 +v 0.362015 0.453546 0.067467 +v 0.307949 0.536205 0.128331 +v 0.362015 0.453546 0.067467 +v 0.266692 0.620189 0.002202 +v 0.307949 0.536205 0.128331 +v 0.266692 0.620189 0.002202 +v 0.153974 0.681669 -0.090130 +v 0.111869 0.707488 0.017911 +v 0.266692 0.620189 0.002202 +v 0.111869 0.707488 0.017911 +v 0.193763 0.662821 0.084995 +v 0.307949 0.536205 0.128331 +v 0.266692 0.620189 0.002202 +v 0.193763 0.662821 0.084995 +v 0.153974 0.681669 -0.090130 +v 0.000000 0.723839 -0.006642 +v 0.111869 0.707488 0.017911 +v 0.153974 0.681669 -0.090130 +v 0.000000 0.704172 -0.123926 +v 0.000000 0.723839 -0.006642 +v 0.181007 0.624550 -0.189349 +v 0.000000 0.704172 -0.123926 +v 0.153974 0.681669 -0.090130 +v 0.181007 0.624550 -0.189349 +v 0.000000 0.651005 -0.229078 +v 0.000000 0.704172 -0.123926 +v 0.000000 0.651005 -0.229078 +v -0.153974 0.681669 -0.090130 +v 0.000000 0.704172 -0.123926 +v 0.000000 0.651005 -0.229078 +v -0.181008 0.624550 -0.189349 +v -0.153974 0.681669 -0.090130 +v -0.181008 0.624550 -0.189349 +v -0.266692 0.620189 0.002202 +v -0.153974 0.681669 -0.090130 +v -0.181008 0.624550 -0.189349 +v -0.313515 0.552276 -0.080805 +v -0.266692 0.620189 0.002202 +v -0.313515 0.552276 -0.080805 +v -0.307949 0.536205 0.128331 +v -0.266692 0.620189 0.002202 +v 0.000000 0.704172 -0.123926 +v -0.111869 0.707488 0.017911 +v 0.000000 0.723839 -0.006642 +v 0.000000 0.704172 -0.123926 +v -0.153974 0.681669 -0.090130 +v -0.111869 0.707488 0.017911 +v -0.153974 0.681669 -0.090130 +v -0.193763 0.662821 0.084995 +v -0.111869 0.707488 0.017911 +v -0.153974 0.681669 -0.090130 +v -0.266692 0.620189 0.002202 +v -0.193763 0.662821 0.084995 +v -0.266692 0.620189 0.002202 +v -0.223737 0.601802 0.176632 +v -0.193763 0.662821 0.084995 +v -0.266692 0.620189 0.002202 +v -0.307949 0.536205 0.128331 +v -0.223737 0.601802 0.176632 +v -0.307949 0.536205 0.128331 +v -0.193763 0.540784 0.268270 +v -0.223737 0.601802 0.176632 +v -0.307949 0.536205 0.128331 +v -0.266692 0.452220 0.254459 +v -0.193763 0.540784 0.268270 +v -0.266692 0.452220 0.254459 +v -0.111869 0.496116 0.335354 +v -0.193763 0.540784 0.268270 +v -0.266692 0.452220 0.254459 +v -0.153974 0.390740 0.346792 +v -0.111869 0.496116 0.335354 +v -0.313515 0.354818 0.215740 +v -0.153974 0.390740 0.346792 +v -0.266692 0.452220 0.254459 +v -0.313515 0.354818 0.215740 +v -0.181008 0.282542 0.324284 +v -0.153974 0.390740 0.346792 +v -0.181008 0.282542 0.324284 +v 0.000000 0.368236 0.380587 +v -0.153974 0.390740 0.346792 +v -0.181008 0.282542 0.324284 +v 0.000000 0.256088 0.364013 +v 0.000000 0.368236 0.380587 +v -0.153974 0.390740 0.346792 +v 0.000000 0.479766 0.359907 +v -0.111869 0.496116 0.335354 +v -0.153974 0.390740 0.346792 +v 0.000000 0.368236 0.380587 +v 0.000000 0.479766 0.359907 +v -0.111869 0.707488 0.017911 +v -0.193763 0.662821 0.084995 +v -0.101867 0.675998 0.159467 +v 0.000000 0.723839 -0.006642 +v -0.111869 0.707488 0.017911 +v -0.058812 0.699481 0.124199 +v -0.111869 0.707488 0.017911 +v -0.101867 0.675998 0.159467 +v -0.058812 0.699481 0.124199 +v 0.000000 0.723839 -0.006642 +v -0.058812 0.699481 0.124199 +v 0.000000 0.708077 0.111290 +v 0.111869 0.707488 0.017911 +v 0.000000 0.723839 -0.006642 +v 0.000000 0.708077 0.111290 +v 0.193763 0.662821 0.084995 +v 0.111869 0.707488 0.017911 +v 0.058812 0.699481 0.124199 +v 0.111869 0.707488 0.017911 +v 0.000000 0.708077 0.111290 +v 0.058812 0.699481 0.124199 +v 0.193763 0.662821 0.084995 +v 0.058812 0.699481 0.124199 +v 0.101867 0.675998 0.159467 +v -0.111869 0.496116 0.335354 +v 0.000000 0.479766 0.359907 +v 0.000000 0.579760 0.303997 +v -0.193763 0.540784 0.268270 +v -0.111869 0.496116 0.335354 +v -0.058812 0.588356 0.291088 +v -0.111869 0.496116 0.335354 +v 0.000000 0.579760 0.303997 +v -0.058812 0.588356 0.291088 +v 0.307949 0.536205 0.128331 +v 0.193763 0.662821 0.084995 +v 0.223737 0.601802 0.176632 +v 0.266692 0.452220 0.254459 +v 0.307949 0.536205 0.128331 +v 0.223737 0.601802 0.176632 +v 0.223737 0.601802 0.176632 +v 0.193763 0.662821 0.084995 +v 0.101867 0.675998 0.159467 +v 0.153974 0.390740 0.346792 +v 0.266692 0.452220 0.254459 +v 0.193763 0.540784 0.268270 +v 0.266692 0.452220 0.254459 +v 0.223737 0.601802 0.176632 +v 0.193763 0.540784 0.268270 +v 0.153974 0.390740 0.346792 +v 0.193763 0.540784 0.268270 +v 0.111869 0.496116 0.335354 +v 0.000000 0.368236 0.380587 +v 0.153974 0.390740 0.346792 +v 0.111869 0.496116 0.335354 +v 0.000000 0.368236 0.380587 +v 0.111869 0.496116 0.335354 +v 0.000000 0.479766 0.359907 +v 0.000000 0.479766 0.359907 +v 0.111869 0.496116 0.335354 +v 0.058812 0.588356 0.291088 +v 0.000000 0.479766 0.359907 +v 0.058812 0.588356 0.291088 +v 0.000000 0.579760 0.303997 +v 0.111869 0.496116 0.335354 +v 0.193763 0.540784 0.268270 +v 0.101867 0.611840 0.255820 +v 0.111869 0.496116 0.335354 +v 0.101867 0.611840 0.255820 +v 0.058812 0.588356 0.291088 +v 0.223737 0.601802 0.176632 +v 0.101867 0.675998 0.159467 +v 0.117626 0.643919 0.207644 +v 0.193763 0.540784 0.268270 +v 0.117626 0.643919 0.207644 +v 0.101867 0.611840 0.255820 +v 0.193763 0.540784 0.268270 +v 0.223737 0.601802 0.176632 +v 0.117626 0.643919 0.207644 +v -0.193763 0.540784 0.268270 +v -0.058812 0.588356 0.291088 +v -0.101867 0.611840 0.255820 +v -0.223737 0.601802 0.176632 +v -0.193763 0.540784 0.268270 +v -0.101867 0.611840 0.255820 +v -0.193763 0.662821 0.084995 +v -0.117626 0.643919 0.207644 +v -0.101867 0.675998 0.159467 +v -0.193763 0.662821 0.084995 +v -0.223737 0.601802 0.176632 +v -0.117626 0.643919 0.207644 +v -0.223737 0.601802 0.176632 +v -0.101867 0.611840 0.255820 +v -0.117626 0.643919 0.207644 +v 0.058812 0.135482 -0.291088 +v 0.101867 0.111998 -0.255820 +v 0.000000 0.065407 -0.218330 +v 0.000000 0.144077 -0.303997 +v 0.058812 0.135482 -0.291088 +v 0.000000 0.065407 -0.218330 +v -0.058812 0.135482 -0.291088 +v 0.000000 0.144077 -0.303997 +v 0.000000 0.065407 -0.218330 +v -0.101867 0.111998 -0.255820 +v -0.058812 0.135482 -0.291088 +v 0.000000 0.065407 -0.218330 +v -0.117626 0.079920 -0.207644 +v -0.101867 0.111998 -0.255820 +v 0.000000 0.065407 -0.218330 +v -0.101867 0.047840 -0.159467 +v -0.117626 0.079920 -0.207644 +v 0.000000 0.065407 -0.218330 +v -0.058812 0.024357 -0.124199 +v -0.101867 0.047840 -0.159467 +v 0.000000 0.065407 -0.218330 +v 0.000000 0.015761 -0.111290 +v -0.058812 0.024357 -0.124199 +v 0.000000 0.065407 -0.218330 +v 0.058812 0.024357 -0.124199 +v 0.000000 0.015761 -0.111290 +v 0.000000 0.065407 -0.218330 +v 0.101867 0.047840 -0.159467 +v 0.058812 0.024357 -0.124199 +v 0.000000 0.065407 -0.218330 +v 0.101867 0.111998 -0.255820 +v 0.117626 0.079920 -0.207644 +v 0.000000 0.065407 -0.218330 +v 0.117626 0.079920 -0.207644 +v 0.101867 0.047840 -0.159467 +v 0.000000 0.065407 -0.218330 +v 0.101867 0.675998 0.159467 +v 0.058812 0.699481 0.124199 +v 0.000000 0.658431 0.218330 +v 0.058812 0.699481 0.124199 +v 0.000000 0.708077 0.111290 +v 0.000000 0.658431 0.218330 +v 0.000000 0.708077 0.111290 +v -0.058812 0.699481 0.124199 +v 0.000000 0.658431 0.218330 +v -0.058812 0.699481 0.124199 +v -0.101867 0.675998 0.159467 +v 0.000000 0.658431 0.218330 +v -0.101867 0.675998 0.159467 +v -0.117626 0.643919 0.207644 +v 0.000000 0.658431 0.218330 +v -0.117626 0.643919 0.207644 +v -0.101867 0.611840 0.255820 +v 0.000000 0.658431 0.218330 +v -0.101867 0.611840 0.255820 +v -0.058812 0.588356 0.291088 +v 0.000000 0.658431 0.218330 +v -0.058812 0.588356 0.291088 +v 0.000000 0.579760 0.303997 +v 0.000000 0.658431 0.218330 +v 0.000000 0.579760 0.303997 +v 0.058812 0.588356 0.291088 +v 0.000000 0.658431 0.218330 +v 0.058812 0.588356 0.291088 +v 0.101867 0.611840 0.255820 +v 0.000000 0.658431 0.218330 +v 0.117626 0.643919 0.207644 +v 0.101867 0.675998 0.159467 +v 0.000000 0.658431 0.218330 +v 0.101867 0.611840 0.255820 +v 0.117626 0.643919 0.207644 +v 0.000000 0.658431 0.218330 +v -0.138182 0.767049 0.079780 +v -0.079780 0.767049 0.138182 +v 0.000000 0.767049 0.000000 +v -0.079780 0.767049 0.138182 +v 0.000000 0.767049 0.159560 +v 0.000000 0.767049 0.000000 +v 0.000000 0.767049 0.159560 +v 0.079780 0.767049 0.138182 +v 0.000000 0.767049 0.000000 +v 0.079780 0.767049 0.138182 +v 0.138182 0.767049 0.079780 +v 0.000000 0.767049 0.000000 +v 0.138182 0.767049 0.079780 +v 0.159560 0.767049 0.000000 +v 0.000000 0.767049 0.000000 +v 0.159560 0.767049 0.000000 +v 0.138182 0.767049 -0.079780 +v 0.000000 0.767049 0.000000 +v 0.138182 0.767049 -0.079780 +v 0.079780 0.767049 -0.138182 +v 0.000000 0.767049 0.000000 +v 0.079780 0.767049 -0.138182 +v 0.000000 0.767049 -0.159560 +v 0.000000 0.767049 0.000000 +v 0.000000 0.767049 -0.159560 +v -0.079780 0.767049 -0.138182 +v 0.000000 0.767049 0.000000 +v -0.079780 0.767049 -0.138182 +v -0.138182 0.767049 -0.079780 +v 0.000000 0.767049 0.000000 +v -0.159560 0.767049 0.000000 +v -0.138182 0.767049 0.079780 +v 0.000000 0.767049 0.000000 +v -0.138182 0.767049 -0.079780 +v -0.159560 0.767049 0.000000 +v 0.000000 0.767049 0.000000 +v -0.055309 0.767049 -0.002913 +v -0.037558 0.799358 0.043995 +v -0.051697 0.801891 0.004112 +v -0.055309 0.767049 -0.002913 +v -0.041169 0.767049 0.037049 +v -0.037558 0.799358 0.043995 +v -0.041169 0.767049 0.037049 +v 0.000697 0.798200 0.062219 +v -0.037558 0.799358 0.043995 +v -0.041169 0.767049 0.037049 +v -0.002914 0.767049 0.055309 +v 0.000697 0.798200 0.062219 +v -0.037049 0.767049 -0.041169 +v -0.055309 0.767049 -0.002913 +v -0.051697 0.801891 0.004112 +v -0.037049 0.767049 -0.041169 +v -0.051697 0.801891 0.004112 +v -0.033436 0.804316 -0.034066 +v 0.002914 0.767049 -0.055309 +v -0.037049 0.767049 -0.041169 +v -0.033436 0.804316 -0.034066 +v 0.002914 0.767049 -0.055309 +v -0.033436 0.804316 -0.034066 +v 0.006525 0.805212 -0.048177 +v 0.006525 0.805212 -0.048177 +v 0.041169 0.767049 -0.037049 +v 0.002914 0.767049 -0.055309 +v 0.006525 0.805212 -0.048177 +v 0.044782 0.804053 -0.029954 +v 0.041169 0.767049 -0.037049 +v 0.055309 0.767049 0.002914 +v 0.041169 0.767049 -0.037049 +v 0.044782 0.804053 -0.029954 +v 0.055309 0.767049 0.002914 +v 0.044782 0.804053 -0.029954 +v 0.058921 0.801520 0.009929 +v 0.037049 0.767049 0.041170 +v 0.055309 0.767049 0.002914 +v 0.058921 0.801520 0.009929 +v 0.037049 0.767049 0.041170 +v 0.058921 0.801520 0.009929 +v 0.040661 0.799096 0.048108 +v -0.002914 0.767049 0.055309 +v 0.037049 0.767049 0.041170 +v 0.040661 0.799096 0.048108 +v -0.002914 0.767049 0.055309 +v 0.040661 0.799096 0.048108 +v 0.000697 0.798200 0.062219 +v 0.058921 0.801520 0.009929 +v 0.044782 0.804053 -0.029954 +v 0.034815 0.846039 -0.015447 +v 0.058921 0.801520 0.009929 +v 0.034815 0.846039 -0.015447 +v 0.048645 0.844379 0.024590 +v 0.040661 0.799096 0.048108 +v 0.058921 0.801520 0.009929 +v 0.048645 0.844379 0.024590 +v 0.040661 0.799096 0.048108 +v 0.048645 0.844379 0.024590 +v 0.030784 0.836209 0.062156 +v 0.000697 0.798200 0.062219 +v 0.040661 0.799096 0.048108 +v 0.030784 0.836209 0.062156 +v 0.000697 0.798200 0.062219 +v 0.030784 0.836209 0.062156 +v -0.008302 0.826324 0.075247 +v 0.006525 0.805212 -0.048177 +v -0.033436 0.804316 -0.034066 +v -0.041689 0.830340 -0.021410 +v -0.033436 0.804316 -0.034066 +v -0.051697 0.801891 0.004112 +v -0.059550 0.822170 0.016157 +v -0.033436 0.804316 -0.034066 +v -0.059550 0.822170 0.016157 +v -0.041689 0.830340 -0.021410 +v 0.006525 0.805212 -0.048177 +v -0.041689 0.830340 -0.021410 +v -0.002602 0.840224 -0.034500 +v -0.002602 0.840224 -0.034500 +v 0.044782 0.804053 -0.029954 +v 0.006525 0.805212 -0.048177 +v -0.002602 0.840224 -0.034500 +v 0.034815 0.846039 -0.015447 +v 0.044782 0.804053 -0.029954 +v -0.038002 0.863669 -0.011614 +v 0.034815 0.846039 -0.015447 +v -0.002602 0.840224 -0.034500 +v 0.048645 0.844379 0.024590 +v 0.034815 0.846039 -0.015447 +v -0.002168 0.873074 0.008639 +v -0.038002 0.863669 -0.011614 +v -0.002168 0.873074 0.008639 +v 0.034815 0.846039 -0.015447 +v 0.030784 0.836209 0.062156 +v 0.048645 0.844379 0.024590 +v 0.011153 0.870441 0.048771 +v 0.048645 0.844379 0.024590 +v -0.002168 0.873074 0.008639 +v 0.011153 0.870441 0.048771 +v -0.008302 0.826324 0.075247 +v 0.030784 0.836209 0.062156 +v -0.005838 0.857306 0.085273 +v 0.030784 0.836209 0.062156 +v 0.011153 0.870441 0.048771 +v -0.005838 0.857306 0.085273 +v -0.008302 0.826324 0.075247 +v -0.005838 0.857306 0.085273 +v -0.043191 0.841359 0.096762 +v -0.041689 0.830340 -0.021410 +v -0.059550 0.822170 0.016157 +v -0.092348 0.834579 0.036376 +v -0.059550 0.822170 0.016157 +v -0.079025 0.831946 0.076508 +v -0.092348 0.834579 0.036376 +v -0.051697 0.801891 0.004112 +v -0.037558 0.799358 0.043995 +v -0.045720 0.820509 0.056193 +v -0.059550 0.822170 0.016157 +v -0.045720 0.820509 0.056193 +v -0.079025 0.831946 0.076508 +v -0.051697 0.801891 0.004112 +v -0.045720 0.820509 0.056193 +v -0.059550 0.822170 0.016157 +v -0.037558 0.799358 0.043995 +v -0.008302 0.826324 0.075247 +v -0.045720 0.820509 0.056193 +v -0.037558 0.799358 0.043995 +v 0.000697 0.798200 0.062219 +v -0.008302 0.826324 0.075247 +v -0.045720 0.820509 0.056193 +v -0.043191 0.841359 0.096762 +v -0.079025 0.831946 0.076508 +v -0.045720 0.820509 0.056193 +v -0.008302 0.826324 0.075247 +v -0.043191 0.841359 0.096762 +v -0.041689 0.830340 -0.021410 +v -0.092348 0.834579 0.036376 +v -0.075356 0.847722 -0.000125 +v -0.002602 0.840224 -0.034500 +v -0.041689 0.830340 -0.021410 +v -0.075356 0.847722 -0.000125 +v -0.002602 0.840224 -0.034500 +v -0.075356 0.847722 -0.000125 +v -0.038002 0.863669 -0.011614 +v 0.011153 0.870441 0.048771 +v -0.002168 0.873074 0.008639 +v -0.015895 0.894619 0.020323 +v -0.053966 0.896874 0.001817 +v -0.002168 0.873074 0.008639 +v -0.038002 0.863669 -0.011614 +v -0.053966 0.896874 0.001817 +v -0.015895 0.894619 0.020323 +v -0.002168 0.873074 0.008639 +v -0.022009 0.926759 0.028667 +v -0.015895 0.894619 0.020323 +v -0.053966 0.896874 0.001817 +v -0.005838 0.857306 0.085273 +v 0.011153 0.870441 0.048771 +v -0.001990 0.885098 0.059219 +v -0.001990 0.885098 0.059219 +v -0.015895 0.894619 0.020323 +v -0.022009 0.926759 0.028667 +v 0.011153 0.870441 0.048771 +v -0.015895 0.894619 0.020323 +v -0.001990 0.885098 0.059219 +v -0.001990 0.885098 0.059219 +v -0.022009 0.926759 0.028667 +v -0.007870 0.914790 0.066797 +v -0.005838 0.857306 0.085273 +v -0.001990 0.885098 0.059219 +v -0.020396 0.873885 0.095720 +v -0.043191 0.841359 0.096762 +v -0.005838 0.857306 0.085273 +v -0.020396 0.873885 0.095720 +v -0.020396 0.873885 0.095720 +v -0.001990 0.885098 0.059219 +v -0.007870 0.914790 0.066797 +v -0.020396 0.873885 0.095720 +v -0.007870 0.914790 0.066797 +v -0.026130 0.903338 0.103298 +v -0.043191 0.841359 0.096762 +v -0.020396 0.873885 0.095720 +v -0.060332 0.867545 0.108446 +v -0.060332 0.867545 0.108446 +v -0.020396 0.873885 0.095720 +v -0.026130 0.903338 0.103298 +v -0.060332 0.867545 0.108446 +v -0.026130 0.903338 0.103298 +v -0.066093 0.899098 0.116788 +v -0.022009 0.926759 0.028667 +v -0.053966 0.896874 0.001817 +v -0.060265 0.932227 0.011245 +v -0.053966 0.896874 0.001817 +v -0.100228 0.927987 0.024735 +v -0.060265 0.932227 0.011245 +v -0.038002 0.863669 -0.011614 +v -0.075356 0.847722 -0.000125 +v -0.093902 0.890534 0.014542 +v -0.053966 0.896874 0.001817 +v -0.093902 0.890534 0.014542 +v -0.100228 0.927987 0.024735 +v -0.038002 0.863669 -0.011614 +v -0.093902 0.890534 0.014542 +v -0.053966 0.896874 0.001817 +v -0.093902 0.890534 0.014542 +v -0.118489 0.916535 0.061236 +v -0.100228 0.927987 0.024735 +v -0.093902 0.890534 0.014542 +v -0.112309 0.879322 0.051043 +v -0.118489 0.916535 0.061236 +v -0.075356 0.847722 -0.000125 +v -0.112309 0.879322 0.051043 +v -0.093902 0.890534 0.014542 +v -0.075356 0.847722 -0.000125 +v -0.092348 0.834579 0.036376 +v -0.112309 0.879322 0.051043 +v -0.112309 0.879322 0.051043 +v -0.104350 0.904566 0.099366 +v -0.118489 0.916535 0.061236 +v -0.112309 0.879322 0.051043 +v -0.098403 0.869800 0.089939 +v -0.104350 0.904566 0.099366 +v -0.092348 0.834579 0.036376 +v -0.098403 0.869800 0.089939 +v -0.112309 0.879322 0.051043 +v -0.092348 0.834579 0.036376 +v -0.079025 0.831946 0.076508 +v -0.098403 0.869800 0.089939 +v -0.098403 0.869800 0.089939 +v -0.066093 0.899098 0.116788 +v -0.104350 0.904566 0.099366 +v -0.079025 0.831946 0.076508 +v -0.043191 0.841359 0.096762 +v -0.060332 0.867545 0.108446 +v -0.079025 0.831946 0.076508 +v -0.060332 0.867545 0.108446 +v -0.098403 0.869800 0.089939 +v -0.098403 0.869800 0.089939 +v -0.060332 0.867545 0.108446 +v -0.066093 0.899098 0.116788 +v -0.007870 0.914790 0.066797 +v -0.022009 0.926759 0.028667 +v -0.000494 0.968004 0.007655 +v -0.000494 0.968004 0.007655 +v -0.022009 0.926759 0.028667 +v -0.060265 0.932227 0.011245 +v -0.000494 0.968004 0.007655 +v -0.060265 0.932227 0.011245 +v -0.060294 0.947324 0.010311 +v -0.066093 0.899098 0.116788 +v -0.026130 0.903338 0.103298 +v -0.012935 0.973085 0.152366 +v -0.026130 0.903338 0.103298 +v -0.007870 0.914790 0.066797 +v -0.005075 0.937486 0.073421 +v -0.026130 0.903338 0.103298 +v -0.005075 0.937486 0.073421 +v -0.012935 0.973085 0.152366 +v -0.007870 0.914790 0.066797 +v -0.000494 0.968004 0.007655 +v -0.005075 0.937486 0.073421 +v -0.104350 0.904566 0.099366 +v -0.066093 0.899098 0.116788 +v -0.062674 0.924018 0.116336 +v -0.104350 0.904566 0.099366 +v -0.062674 0.924018 0.116336 +v -0.127824 0.946065 0.122640 +v -0.118489 0.916535 0.061236 +v -0.104350 0.904566 0.099366 +v -0.127824 0.946065 0.122640 +v -0.100228 0.927987 0.024735 +v -0.118489 0.916535 0.061236 +v -0.113938 0.949594 0.064658 +v -0.118489 0.916535 0.061236 +v -0.127824 0.946065 0.122640 +v -0.113938 0.949594 0.064658 +v -0.060265 0.932227 0.011245 +v -0.126405 0.989170 0.004325 +v -0.060294 0.947324 0.010311 +v -0.100228 0.927987 0.024735 +v -0.113938 0.949594 0.064658 +v -0.126405 0.989170 0.004325 +v -0.060265 0.932227 0.011245 +v -0.100228 0.927987 0.024735 +v -0.126405 0.989170 0.004325 +v -0.066093 0.899098 0.116788 +v -0.012935 0.973085 0.152366 +v -0.062674 0.924018 0.116336 +v -0.113938 0.949594 0.064658 +v -0.127824 0.946065 0.122640 +v -0.058805 0.937038 0.066872 +v -0.127824 0.946065 0.122640 +v -0.062674 0.924018 0.116336 +v -0.058805 0.937038 0.066872 +v -0.062674 0.924018 0.116336 +v -0.012935 0.973085 0.152366 +v -0.058805 0.937038 0.066872 +v -0.012935 0.973085 0.152366 +v -0.005075 0.937486 0.073421 +v -0.058805 0.937038 0.066872 +v -0.005075 0.937486 0.073421 +v -0.000494 0.968004 0.007655 +v -0.058805 0.937038 0.066872 +v -0.000494 0.968004 0.007655 +v -0.060294 0.947324 0.010311 +v -0.058805 0.937038 0.066872 +v -0.126405 0.989170 0.004325 +v -0.113938 0.949594 0.064658 +v -0.058805 0.937038 0.066872 +v -0.060294 0.947324 0.010311 +v -0.126405 0.989170 0.004325 +v -0.058805 0.937038 0.066872 +v -0.138182 0.767049 -0.079780 +v -0.087894 0.755505 -0.152237 +v -0.152237 0.755505 -0.087894 +v -0.138182 0.767049 -0.079780 +v -0.079780 0.767049 -0.138182 +v -0.087894 0.755505 -0.152237 +v -0.159560 0.767049 0.000000 +v -0.138182 0.767049 -0.079780 +v -0.152237 0.755505 -0.087894 +v -0.159560 0.767049 0.000000 +v -0.152237 0.755505 -0.087894 +v -0.175787 0.755505 0.000000 +v -0.138182 0.767049 0.079780 +v -0.159560 0.767049 0.000000 +v -0.175787 0.755505 0.000000 +v -0.138182 0.767049 0.079780 +v -0.175787 0.755505 0.000000 +v -0.152237 0.755505 0.087894 +v -0.079780 0.767049 0.138182 +v -0.138182 0.767049 0.079780 +v -0.152237 0.755505 0.087894 +v -0.079780 0.767049 0.138182 +v -0.152237 0.755505 0.087894 +v -0.087894 0.755505 0.152237 +v 0.000000 0.767049 0.159560 +v -0.079780 0.767049 0.138182 +v -0.087894 0.755505 0.152237 +v 0.000000 0.767049 0.159560 +v -0.087894 0.755505 0.152237 +v 0.000000 0.755505 0.175787 +v -0.079780 0.767049 -0.138182 +v 0.000000 0.755505 -0.175787 +v -0.087894 0.755505 -0.152237 +v -0.079780 0.767049 -0.138182 +v 0.000000 0.767049 -0.159560 +v 0.000000 0.755505 -0.175787 +v 0.000000 0.767049 -0.159560 +v 0.087894 0.755505 -0.152237 +v 0.000000 0.755505 -0.175787 +v 0.000000 0.767049 -0.159560 +v 0.079780 0.767049 -0.138182 +v 0.087894 0.755505 -0.152237 +v 0.079780 0.767049 -0.138182 +v 0.152237 0.755505 -0.087894 +v 0.087894 0.755505 -0.152237 +v 0.079780 0.767049 -0.138182 +v 0.138182 0.767049 -0.079780 +v 0.152237 0.755505 -0.087894 +v 0.138182 0.767049 -0.079780 +v 0.175787 0.755505 0.000000 +v 0.152237 0.755505 -0.087894 +v 0.138182 0.767049 -0.079780 +v 0.159560 0.767049 0.000000 +v 0.175787 0.755505 0.000000 +v 0.159560 0.767049 0.000000 +v 0.152237 0.755505 0.087894 +v 0.175787 0.755505 0.000000 +v 0.159560 0.767049 0.000000 +v 0.138182 0.767049 0.079780 +v 0.152237 0.755505 0.087894 +v 0.138182 0.767049 0.079780 +v 0.087894 0.755505 0.152237 +v 0.152237 0.755505 0.087894 +v 0.138182 0.767049 0.079780 +v 0.079780 0.767049 0.138182 +v 0.087894 0.755505 0.152237 +v 0.079780 0.767049 0.138182 +v 0.000000 0.755505 0.175787 +v 0.087894 0.755505 0.152237 +v 0.079780 0.767049 0.138182 +v 0.000000 0.767049 0.159560 +v 0.000000 0.755505 0.175787 +v -0.087894 0.755505 -0.152237 +v 0.000000 0.666605 -0.210552 +v -0.105276 0.666605 -0.182343 +v -0.087894 0.755505 -0.152237 +v 0.000000 0.755505 -0.175787 +v 0.000000 0.666605 -0.210552 +v -0.152237 0.755505 -0.087894 +v -0.087894 0.755505 -0.152237 +v -0.105276 0.666605 -0.182343 +v -0.152237 0.755505 -0.087894 +v -0.105276 0.666605 -0.182343 +v -0.182343 0.666605 -0.105275 +v -0.175787 0.755505 0.000000 +v -0.152237 0.755505 -0.087894 +v -0.182343 0.666605 -0.105275 +v -0.175787 0.755505 0.000000 +v -0.182343 0.666605 -0.105275 +v -0.210552 0.666605 0.000000 +v -0.152237 0.755505 0.087894 +v -0.175787 0.755505 0.000000 +v -0.210552 0.666605 0.000000 +v -0.152237 0.755505 0.087894 +v -0.210552 0.666605 0.000000 +v -0.182343 0.666605 0.105276 +v -0.087894 0.755505 0.152237 +v -0.152237 0.755505 0.087894 +v -0.182343 0.666605 0.105276 +v -0.087894 0.755505 0.152237 +v -0.182343 0.666605 0.105276 +v -0.105276 0.666605 0.182343 +v 0.000000 0.755505 0.175787 +v -0.087894 0.755505 0.152237 +v -0.105276 0.666605 0.182343 +v 0.000000 0.755505 0.175787 +v -0.105276 0.666605 0.182343 +v 0.000000 0.666605 0.210552 +v 0.000000 0.755505 -0.175787 +v 0.105276 0.666605 -0.182343 +v 0.000000 0.666605 -0.210552 +v 0.000000 0.755505 -0.175787 +v 0.087894 0.755505 -0.152237 +v 0.105276 0.666605 -0.182343 +v 0.087894 0.755505 -0.152237 +v 0.182343 0.666605 -0.105275 +v 0.105276 0.666605 -0.182343 +v 0.087894 0.755505 -0.152237 +v 0.152237 0.755505 -0.087894 +v 0.182343 0.666605 -0.105275 +v 0.152237 0.755505 -0.087894 +v 0.210552 0.666605 0.000000 +v 0.182343 0.666605 -0.105275 +v 0.152237 0.755505 -0.087894 +v 0.175787 0.755505 0.000000 +v 0.210552 0.666605 0.000000 +v 0.175787 0.755505 0.000000 +v 0.182343 0.666605 0.105276 +v 0.210552 0.666605 0.000000 +v 0.175787 0.755505 0.000000 +v 0.152237 0.755505 0.087894 +v 0.182343 0.666605 0.105276 +v 0.152237 0.755505 0.087894 +v 0.105276 0.666605 0.182343 +v 0.182343 0.666605 0.105276 +v 0.152237 0.755505 0.087894 +v 0.087894 0.755505 0.152237 +v 0.105276 0.666605 0.182343 +v 0.087894 0.755505 0.152237 +v 0.000000 0.666605 0.210552 +v 0.105276 0.666605 0.182343 +v 0.087894 0.755505 0.152237 +v 0.000000 0.755505 0.175787 +v 0.000000 0.666605 0.210552 +vt 0.479994 0.655363 +vt 0.421559 0.655363 +vt 0.479994 0.577147 +vt 0.479994 0.577147 +vt 0.421559 0.655363 +vt 0.421559 0.577147 +vt 0.479994 0.577147 +vt 0.421559 0.577147 +vt 0.479994 0.498931 +vt 0.479994 0.498931 +vt 0.421559 0.577147 +vt 0.421559 0.498931 +vt 0.479994 0.498931 +vt 0.421559 0.498931 +vt 0.479994 0.420715 +vt 0.479994 0.420715 +vt 0.421559 0.498931 +vt 0.421559 0.420715 +vt 0.479994 0.420715 +vt 0.421559 0.420715 +vt 0.479994 0.342499 +vt 0.479994 0.342499 +vt 0.421559 0.420715 +vt 0.421559 0.342499 +vt 0.479994 0.342499 +vt 0.421559 0.342499 +vt 0.479994 0.264283 +vt 0.479994 0.264283 +vt 0.421559 0.342499 +vt 0.421559 0.264283 +vt 0.479994 0.264283 +vt 0.421559 0.264283 +vt 0.479994 0.186067 +vt 0.479994 0.186067 +vt 0.421559 0.264283 +vt 0.421559 0.186067 +vt 0.479994 0.186067 +vt 0.421559 0.186067 +vt 0.479994 0.107851 +vt 0.479994 0.107851 +vt 0.421559 0.186067 +vt 0.421559 0.107851 +vt 0.479994 0.107851 +vt 0.421559 0.107851 +vt 0.479994 0.029635 +vt 0.479994 0.029635 +vt 0.421559 0.107851 +vt 0.421559 0.029635 +vt 0.538429 0.498931 +vt 0.479994 0.577147 +vt 0.479994 0.498931 +vt 0.538429 0.498931 +vt 0.479994 0.498931 +vt 0.538429 0.420715 +vt 0.538429 0.420715 +vt 0.479994 0.498931 +vt 0.479994 0.420715 +vt 0.538429 0.420715 +vt 0.479994 0.420715 +vt 0.538429 0.342499 +vt 0.538429 0.342499 +vt 0.479994 0.420715 +vt 0.479994 0.342499 +vt 0.538429 0.342499 +vt 0.479994 0.342499 +vt 0.538429 0.264283 +vt 0.538429 0.264283 +vt 0.479994 0.342499 +vt 0.479994 0.264283 +vt 0.538429 0.264283 +vt 0.479994 0.264283 +vt 0.538429 0.186067 +vt 0.538429 0.186067 +vt 0.479994 0.264283 +vt 0.479994 0.186067 +vt 0.538429 0.186067 +vt 0.479994 0.186067 +vt 0.538429 0.107851 +vt 0.538429 0.107851 +vt 0.479994 0.186067 +vt 0.479994 0.107851 +vt 0.538429 0.107851 +vt 0.479994 0.107851 +vt 0.538429 0.029635 +vt 0.538429 0.029635 +vt 0.479994 0.107851 +vt 0.479994 0.029635 +vt 0.596864 0.420715 +vt 0.538429 0.498931 +vt 0.538429 0.420715 +vt 0.596864 0.498931 +vt 0.538429 0.498931 +vt 0.596864 0.420715 +vt 0.538429 0.577147 +vt 0.479994 0.655363 +vt 0.479994 0.577147 +vt 0.596864 0.498931 +vt 0.538429 0.577147 +vt 0.538429 0.498931 +vt 0.538429 0.577147 +vt 0.479994 0.577147 +vt 0.538429 0.498931 +vt 0.538429 0.655363 +vt 0.479994 0.655363 +vt 0.538429 0.577147 +vt 0.538429 0.655363 +vt 0.479994 0.733578 +vt 0.479994 0.655363 +vt 0.479994 0.655363 +vt 0.421559 0.733578 +vt 0.421559 0.655363 +vt 0.479994 0.733578 +vt 0.421559 0.733578 +vt 0.479994 0.655363 +vt 0.479994 0.733578 +vt 0.421559 0.811795 +vt 0.421559 0.733578 +vt 0.479994 0.811795 +vt 0.421559 0.811795 +vt 0.479994 0.733578 +vt 0.479994 0.811795 +vt 0.421559 0.890010 +vt 0.421559 0.811795 +vt 0.479994 0.890010 +vt 0.421559 0.890010 +vt 0.479994 0.811795 +vt 0.479994 0.890010 +vt 0.421559 0.968226 +vt 0.421559 0.890010 +vt 0.479994 0.968226 +vt 0.421559 0.968226 +vt 0.479994 0.890010 +vt 0.538429 0.890010 +vt 0.479994 0.968226 +vt 0.479994 0.890010 +vt 0.538429 0.968226 +vt 0.479994 0.968226 +vt 0.538429 0.890010 +vt 0.538429 0.811795 +vt 0.479994 0.890010 +vt 0.479994 0.811795 +vt 0.538429 0.890010 +vt 0.479994 0.890010 +vt 0.538429 0.811795 +vt 0.538429 0.733578 +vt 0.479994 0.811795 +vt 0.479994 0.733578 +vt 0.538429 0.733578 +vt 0.479994 0.733578 +vt 0.538429 0.655363 +vt 0.538429 0.811795 +vt 0.479994 0.811795 +vt 0.538429 0.733578 +vt 0.596864 0.890010 +vt 0.538429 0.968226 +vt 0.538429 0.890010 +vt 0.596864 0.968226 +vt 0.538429 0.968226 +vt 0.596864 0.890010 +vt 0.596864 0.811795 +vt 0.538429 0.890010 +vt 0.538429 0.811795 +vt 0.596864 0.890010 +vt 0.538429 0.890010 +vt 0.596864 0.811795 +vt 0.596864 0.733578 +vt 0.538429 0.811795 +vt 0.538429 0.733578 +vt 0.596864 0.811795 +vt 0.538429 0.811795 +vt 0.596864 0.733578 +vt 0.596864 0.733578 +vt 0.538429 0.733578 +vt 0.596864 0.655363 +vt 0.596864 0.655363 +vt 0.538429 0.733578 +vt 0.538429 0.655363 +vt 0.596864 0.577147 +vt 0.538429 0.655363 +vt 0.538429 0.577147 +vt 0.596864 0.577147 +vt 0.538429 0.577147 +vt 0.596864 0.498931 +vt 0.596864 0.655363 +vt 0.538429 0.655363 +vt 0.596864 0.577147 +vt 0.655299 0.577147 +vt 0.596864 0.655363 +vt 0.596864 0.577147 +vt 0.655299 0.655363 +vt 0.596864 0.655363 +vt 0.655299 0.577147 +vt 0.655299 0.655363 +vt 0.596864 0.733578 +vt 0.596864 0.655363 +vt 0.655299 0.577147 +vt 0.596864 0.577147 +vt 0.655299 0.498931 +vt 0.655299 0.498931 +vt 0.596864 0.577147 +vt 0.596864 0.498931 +vt 0.655299 0.420715 +vt 0.596864 0.498931 +vt 0.596864 0.420715 +vt 0.655299 0.498931 +vt 0.596864 0.498931 +vt 0.655299 0.420715 +vt 0.655299 0.420715 +vt 0.596864 0.420715 +vt 0.655299 0.342499 +vt 0.596864 0.420715 +vt 0.538429 0.420715 +vt 0.596864 0.342499 +vt 0.596864 0.342499 +vt 0.538429 0.420715 +vt 0.538429 0.342499 +vt 0.655299 0.342499 +vt 0.596864 0.420715 +vt 0.596864 0.342499 +vt 0.596864 0.264283 +vt 0.538429 0.342499 +vt 0.538429 0.264283 +vt 0.596864 0.342499 +vt 0.538429 0.342499 +vt 0.596864 0.264283 +vt 0.596864 0.264283 +vt 0.538429 0.264283 +vt 0.596864 0.186067 +vt 0.596864 0.186067 +vt 0.538429 0.264283 +vt 0.538429 0.186067 +vt 0.596864 0.107851 +vt 0.538429 0.186067 +vt 0.538429 0.107851 +vt 0.596864 0.186067 +vt 0.538429 0.186067 +vt 0.596864 0.107851 +vt 0.596864 0.029635 +vt 0.538429 0.107851 +vt 0.538429 0.029635 +vt 0.596864 0.107851 +vt 0.538429 0.107851 +vt 0.596864 0.029635 +vt 0.655299 0.342499 +vt 0.596864 0.342499 +vt 0.655299 0.264283 +vt 0.655299 0.264283 +vt 0.596864 0.342499 +vt 0.596864 0.264283 +vt 0.655299 0.186067 +vt 0.596864 0.264283 +vt 0.596864 0.186067 +vt 0.655299 0.264283 +vt 0.596864 0.264283 +vt 0.655299 0.186067 +vt 0.655299 0.107851 +vt 0.596864 0.186067 +vt 0.596864 0.107851 +vt 0.655299 0.186067 +vt 0.596864 0.186067 +vt 0.655299 0.107851 +vt 0.655299 0.107851 +vt 0.596864 0.107851 +vt 0.655299 0.029635 +vt 0.655299 0.029635 +vt 0.596864 0.107851 +vt 0.596864 0.029635 +vt 0.713735 0.264283 +vt 0.655299 0.342499 +vt 0.655299 0.264283 +vt 0.713735 0.186067 +vt 0.655299 0.264283 +vt 0.655299 0.186067 +vt 0.713735 0.264283 +vt 0.655299 0.264283 +vt 0.713735 0.186067 +vt 0.713735 0.186067 +vt 0.655299 0.186067 +vt 0.713735 0.107851 +vt 0.713735 0.107851 +vt 0.655299 0.186067 +vt 0.655299 0.107851 +vt 0.713735 0.029635 +vt 0.655299 0.107851 +vt 0.655299 0.029635 +vt 0.713735 0.107851 +vt 0.655299 0.107851 +vt 0.713735 0.029635 +vt 0.772170 0.186067 +vt 0.713735 0.264283 +vt 0.713735 0.186067 +vt 0.772170 0.264283 +vt 0.713735 0.264283 +vt 0.772170 0.186067 +vt 0.713735 0.342499 +vt 0.655299 0.420715 +vt 0.655299 0.342499 +vt 0.772170 0.264283 +vt 0.713735 0.342499 +vt 0.713735 0.264283 +vt 0.713735 0.342499 +vt 0.655299 0.342499 +vt 0.713735 0.264283 +vt 0.713735 0.420715 +vt 0.655299 0.420715 +vt 0.713735 0.342499 +vt 0.713735 0.420715 +vt 0.655299 0.498931 +vt 0.655299 0.420715 +vt 0.713735 0.498931 +vt 0.655299 0.498931 +vt 0.713735 0.420715 +vt 0.713735 0.498931 +vt 0.655299 0.577147 +vt 0.655299 0.498931 +vt 0.713735 0.577147 +vt 0.655299 0.577147 +vt 0.713735 0.498931 +vt 0.713735 0.577147 +vt 0.655299 0.655363 +vt 0.655299 0.577147 +vt 0.713735 0.655363 +vt 0.655299 0.655363 +vt 0.713735 0.577147 +vt 0.655299 0.733578 +vt 0.596864 0.811795 +vt 0.596864 0.733578 +vt 0.713735 0.655363 +vt 0.655299 0.733578 +vt 0.655299 0.655363 +vt 0.655299 0.733578 +vt 0.596864 0.733578 +vt 0.655299 0.655363 +vt 0.655299 0.811795 +vt 0.596864 0.811795 +vt 0.655299 0.733578 +vt 0.655299 0.811795 +vt 0.596864 0.890010 +vt 0.596864 0.811795 +vt 0.655299 0.890010 +vt 0.596864 0.890010 +vt 0.655299 0.811795 +vt 0.655299 0.890010 +vt 0.596864 0.968226 +vt 0.596864 0.890010 +vt 0.655299 0.968226 +vt 0.596864 0.968226 +vt 0.655299 0.890010 +vt 0.713735 0.890010 +vt 0.655299 0.968226 +vt 0.655299 0.890010 +vt 0.713735 0.968226 +vt 0.655299 0.968226 +vt 0.713735 0.890010 +vt 0.713735 0.890010 +vt 0.655299 0.890010 +vt 0.713735 0.811795 +vt 0.713735 0.811795 +vt 0.655299 0.890010 +vt 0.655299 0.811795 +vt 0.713735 0.733578 +vt 0.655299 0.733578 +vt 0.713735 0.655363 +vt 0.713735 0.811795 +vt 0.655299 0.811795 +vt 0.713735 0.733578 +vt 0.713735 0.733578 +vt 0.655299 0.811795 +vt 0.655299 0.733578 +vt 0.772170 0.577147 +vt 0.713735 0.655363 +vt 0.713735 0.577147 +vt 0.772170 0.655363 +vt 0.713735 0.655363 +vt 0.772170 0.577147 +vt 0.772170 0.655363 +vt 0.713735 0.733578 +vt 0.713735 0.655363 +vt 0.772170 0.890010 +vt 0.713735 0.968226 +vt 0.713735 0.890010 +vt 0.772170 0.968226 +vt 0.713735 0.968226 +vt 0.772170 0.890010 +vt 0.772170 0.890010 +vt 0.713735 0.890010 +vt 0.772170 0.811795 +vt 0.772170 0.811795 +vt 0.713735 0.890010 +vt 0.713735 0.811795 +vt 0.772170 0.811795 +vt 0.713735 0.811795 +vt 0.772170 0.733578 +vt 0.772170 0.733578 +vt 0.713735 0.811795 +vt 0.713735 0.733578 +vt 0.772170 0.733578 +vt 0.713735 0.733578 +vt 0.772170 0.655363 +vt 0.830605 0.577147 +vt 0.772170 0.655363 +vt 0.772170 0.577147 +vt 0.830605 0.655363 +vt 0.772170 0.655363 +vt 0.830605 0.577147 +vt 0.830605 0.655363 +vt 0.772170 0.733578 +vt 0.772170 0.655363 +vt 0.830605 0.577147 +vt 0.772170 0.577147 +vt 0.830605 0.498931 +vt 0.830605 0.498931 +vt 0.772170 0.577147 +vt 0.772170 0.498931 +vt 0.772170 0.577147 +vt 0.713735 0.577147 +vt 0.772170 0.498931 +vt 0.772170 0.498931 +vt 0.713735 0.577147 +vt 0.713735 0.498931 +vt 0.772170 0.498931 +vt 0.713735 0.498931 +vt 0.772170 0.420715 +vt 0.772170 0.420715 +vt 0.713735 0.498931 +vt 0.713735 0.420715 +vt 0.772170 0.420715 +vt 0.713735 0.420715 +vt 0.772170 0.342499 +vt 0.772170 0.342499 +vt 0.713735 0.420715 +vt 0.713735 0.342499 +vt 0.772170 0.342499 +vt 0.713735 0.342499 +vt 0.772170 0.264283 +vt 0.830605 0.498931 +vt 0.772170 0.498931 +vt 0.830605 0.420715 +vt 0.830605 0.420715 +vt 0.772170 0.498931 +vt 0.772170 0.420715 +vt 0.830605 0.420715 +vt 0.772170 0.420715 +vt 0.830605 0.342499 +vt 0.830605 0.342499 +vt 0.772170 0.420715 +vt 0.772170 0.342499 +vt 0.830605 0.342499 +vt 0.772170 0.342499 +vt 0.830605 0.264283 +vt 0.830605 0.264283 +vt 0.772170 0.342499 +vt 0.772170 0.264283 +vt 0.830605 0.264283 +vt 0.772170 0.264283 +vt 0.830605 0.186067 +vt 0.830605 0.186067 +vt 0.772170 0.264283 +vt 0.772170 0.186067 +vt 0.830605 0.186067 +vt 0.772170 0.186067 +vt 0.830605 0.107851 +vt 0.830605 0.107851 +vt 0.772170 0.186067 +vt 0.772170 0.107851 +vt 0.772170 0.186067 +vt 0.713735 0.186067 +vt 0.772170 0.107851 +vt 0.772170 0.107851 +vt 0.713735 0.186067 +vt 0.713735 0.107851 +vt 0.772170 0.107851 +vt 0.713735 0.107851 +vt 0.772170 0.029635 +vt 0.772170 0.029635 +vt 0.713735 0.107851 +vt 0.713735 0.029635 +vt 0.830605 0.107851 +vt 0.772170 0.107851 +vt 0.830605 0.029635 +vt 0.830605 0.029635 +vt 0.772170 0.107851 +vt 0.772170 0.029635 +vt 0.889040 0.342499 +vt 0.830605 0.420715 +vt 0.830605 0.342499 +vt 0.889040 0.420715 +vt 0.830605 0.498931 +vt 0.830605 0.420715 +vt 0.889040 0.420715 +vt 0.830605 0.420715 +vt 0.889040 0.342499 +vt 0.889040 0.498931 +vt 0.830605 0.498931 +vt 0.889040 0.420715 +vt 0.889040 0.498931 +vt 0.830605 0.577147 +vt 0.830605 0.498931 +vt 0.889040 0.577147 +vt 0.830605 0.655363 +vt 0.830605 0.577147 +vt 0.889040 0.577147 +vt 0.830605 0.577147 +vt 0.889040 0.498931 +vt 0.889040 0.655363 +vt 0.830605 0.655363 +vt 0.889040 0.577147 +vt 0.889040 0.029635 +vt 0.830605 0.107851 +vt 0.830605 0.029635 +vt 0.889040 0.107851 +vt 0.830605 0.186067 +vt 0.830605 0.107851 +vt 0.889040 0.107851 +vt 0.830605 0.107851 +vt 0.889040 0.029635 +vt 0.830605 0.733578 +vt 0.772170 0.733578 +vt 0.830605 0.655363 +vt 0.830605 0.733578 +vt 0.772170 0.811795 +vt 0.772170 0.733578 +vt 0.889040 0.655363 +vt 0.830605 0.733578 +vt 0.830605 0.655363 +vt 0.830605 0.811795 +vt 0.772170 0.890010 +vt 0.772170 0.811795 +vt 0.830605 0.811795 +vt 0.772170 0.811795 +vt 0.830605 0.733578 +vt 0.830605 0.890010 +vt 0.772170 0.890010 +vt 0.830605 0.811795 +vt 0.830605 0.890010 +vt 0.772170 0.968226 +vt 0.772170 0.890010 +vt 0.830605 0.968226 +vt 0.772170 0.968226 +vt 0.830605 0.890010 +vt 0.889040 0.890010 +vt 0.830605 0.968226 +vt 0.830605 0.890010 +vt 0.889040 0.968226 +vt 0.830605 0.968226 +vt 0.889040 0.890010 +vt 0.889040 0.811795 +vt 0.830605 0.890010 +vt 0.830605 0.811795 +vt 0.889040 0.890010 +vt 0.830605 0.890010 +vt 0.889040 0.811795 +vt 0.889040 0.733578 +vt 0.830605 0.733578 +vt 0.889040 0.655363 +vt 0.889040 0.811795 +vt 0.830605 0.811795 +vt 0.889040 0.733578 +vt 0.889040 0.733578 +vt 0.830605 0.811795 +vt 0.830605 0.733578 +vt 0.889040 0.186067 +vt 0.830605 0.186067 +vt 0.889040 0.107851 +vt 0.889040 0.186067 +vt 0.830605 0.264283 +vt 0.830605 0.186067 +vt 0.889040 0.342499 +vt 0.830605 0.342499 +vt 0.889040 0.264283 +vt 0.889040 0.264283 +vt 0.830605 0.342499 +vt 0.830605 0.264283 +vt 0.889040 0.264283 +vt 0.830605 0.264283 +vt 0.889040 0.186067 +vt 0.258027 0.925049 +vt 0.210357 0.897526 +vt 0.230505 0.877379 +vt 0.258027 0.925049 +vt 0.202982 0.925049 +vt 0.210357 0.897526 +vt 0.258027 0.925049 +vt 0.210357 0.952571 +vt 0.202982 0.925049 +vt 0.258027 0.925049 +vt 0.230505 0.972719 +vt 0.210357 0.952571 +vt 0.258027 0.925049 +vt 0.258027 0.980094 +vt 0.230505 0.972719 +vt 0.258027 0.925049 +vt 0.285550 0.972719 +vt 0.258027 0.980094 +vt 0.258027 0.925049 +vt 0.305698 0.952571 +vt 0.285550 0.972719 +vt 0.258027 0.925049 +vt 0.313072 0.925049 +vt 0.305698 0.952571 +vt 0.258027 0.925049 +vt 0.305698 0.897527 +vt 0.313072 0.925049 +vt 0.258027 0.925049 +vt 0.285550 0.877379 +vt 0.305698 0.897527 +vt 0.258027 0.925049 +vt 0.230505 0.877379 +vt 0.258027 0.870004 +vt 0.258027 0.925049 +vt 0.258027 0.870004 +vt 0.285550 0.877379 +vt 0.136796 0.925049 +vt 0.109274 0.972719 +vt 0.089125 0.952571 +vt 0.136796 0.925049 +vt 0.089125 0.952571 +vt 0.081751 0.925049 +vt 0.136796 0.925049 +vt 0.081751 0.925049 +vt 0.089125 0.897527 +vt 0.136796 0.925049 +vt 0.089125 0.897527 +vt 0.109274 0.877379 +vt 0.136796 0.925049 +vt 0.109274 0.877379 +vt 0.136796 0.870004 +vt 0.136796 0.925049 +vt 0.136796 0.870004 +vt 0.164319 0.877379 +vt 0.136796 0.925049 +vt 0.164319 0.877379 +vt 0.184467 0.897527 +vt 0.136796 0.925049 +vt 0.184467 0.897527 +vt 0.191841 0.925049 +vt 0.136796 0.925049 +vt 0.191841 0.925049 +vt 0.184466 0.952572 +vt 0.136796 0.925049 +vt 0.184466 0.952572 +vt 0.164319 0.972719 +vt 0.136796 0.925049 +vt 0.136796 0.980094 +vt 0.109274 0.972719 +vt 0.136796 0.925049 +vt 0.164319 0.972719 +vt 0.136796 0.980094 +vt 0.196812 0.695273 +vt 0.315813 0.763978 +vt 0.265518 0.814274 +vt 0.196812 0.695273 +vt 0.265518 0.814274 +vt 0.196812 0.832683 +vt 0.196812 0.695273 +vt 0.196812 0.832683 +vt 0.128107 0.814274 +vt 0.196812 0.695273 +vt 0.128107 0.814274 +vt 0.077811 0.763978 +vt 0.196812 0.695273 +vt 0.077811 0.763978 +vt 0.059401 0.695273 +vt 0.196812 0.695273 +vt 0.059401 0.695273 +vt 0.077811 0.626567 +vt 0.196812 0.695273 +vt 0.077811 0.626567 +vt 0.128107 0.576272 +vt 0.196812 0.695273 +vt 0.128107 0.576272 +vt 0.196812 0.557862 +vt 0.196812 0.695273 +vt 0.196812 0.557862 +vt 0.265518 0.576272 +vt 0.196812 0.695273 +vt 0.265518 0.576272 +vt 0.315813 0.626567 +vt 0.196812 0.695273 +vt 0.334223 0.695273 +vt 0.315813 0.763978 +vt 0.196812 0.695273 +vt 0.315813 0.626567 +vt 0.334223 0.695273 +vt 0.300213 0.300882 +vt 0.300213 0.256934 +vt 0.347968 0.300882 +vt 0.347968 0.300882 +vt 0.300213 0.256934 +vt 0.347968 0.256934 +vt 0.347968 0.300882 +vt 0.347968 0.256934 +vt 0.395561 0.300882 +vt 0.395561 0.300882 +vt 0.347968 0.256934 +vt 0.395561 0.256934 +vt 0.300213 0.300882 +vt 0.252475 0.256934 +vt 0.300213 0.256934 +vt 0.252475 0.300882 +vt 0.252475 0.256934 +vt 0.300213 0.300882 +vt 0.252475 0.300882 +vt 0.204900 0.256934 +vt 0.252475 0.256934 +vt 0.204900 0.300882 +vt 0.204900 0.256934 +vt 0.252475 0.300882 +vt 0.204900 0.256934 +vt 0.204900 0.300882 +vt 0.157307 0.256934 +vt 0.157307 0.256934 +vt 0.204900 0.300882 +vt 0.157307 0.300882 +vt 0.157307 0.300882 +vt 0.109552 0.256934 +vt 0.157307 0.256934 +vt 0.109552 0.300882 +vt 0.109552 0.256934 +vt 0.157307 0.300882 +vt 0.109552 0.300882 +vt 0.061814 0.256934 +vt 0.109552 0.256934 +vt 0.061814 0.300882 +vt 0.061814 0.256934 +vt 0.109552 0.300882 +vt 0.061814 0.300882 +vt 0.014238 0.256934 +vt 0.061814 0.256934 +vt 0.014238 0.300882 +vt 0.014238 0.256934 +vt 0.061814 0.300882 +vt 0.157307 0.344484 +vt 0.109552 0.300882 +vt 0.157307 0.300882 +vt 0.109552 0.344484 +vt 0.109552 0.300882 +vt 0.157307 0.344484 +vt 0.109552 0.344484 +vt 0.061814 0.300882 +vt 0.109552 0.300882 +vt 0.061814 0.344484 +vt 0.061814 0.300882 +vt 0.109552 0.344484 +vt 0.061814 0.344484 +vt 0.014238 0.300882 +vt 0.061814 0.300882 +vt 0.014238 0.344484 +vt 0.014238 0.300882 +vt 0.061814 0.344484 +vt 0.252475 0.344484 +vt 0.204900 0.300882 +vt 0.252475 0.300882 +vt 0.300213 0.344484 +vt 0.252475 0.300882 +vt 0.300213 0.300882 +vt 0.252475 0.344484 +vt 0.252475 0.300882 +vt 0.300213 0.344484 +vt 0.204900 0.344484 +vt 0.204900 0.300882 +vt 0.252475 0.344484 +vt 0.204900 0.300882 +vt 0.204900 0.344484 +vt 0.157307 0.300882 +vt 0.157307 0.300882 +vt 0.204900 0.344484 +vt 0.157307 0.344484 +vt 0.204900 0.344484 +vt 0.204900 0.398850 +vt 0.157307 0.344484 +vt 0.157307 0.398850 +vt 0.109552 0.344484 +vt 0.157307 0.344484 +vt 0.157307 0.344484 +vt 0.204900 0.398850 +vt 0.157307 0.398850 +vt 0.109552 0.398850 +vt 0.061814 0.344484 +vt 0.109552 0.344484 +vt 0.109552 0.398850 +vt 0.109552 0.344484 +vt 0.157307 0.398850 +vt 0.061814 0.398850 +vt 0.014238 0.344484 +vt 0.061814 0.344484 +vt 0.061814 0.398850 +vt 0.061814 0.344484 +vt 0.109552 0.398850 +vt 0.014238 0.398850 +vt 0.014238 0.344484 +vt 0.061814 0.398850 +vt 0.300213 0.398850 +vt 0.252475 0.344484 +vt 0.300213 0.344484 +vt 0.300213 0.398850 +vt 0.300213 0.344484 +vt 0.347968 0.398850 +vt 0.347968 0.344484 +vt 0.300213 0.300882 +vt 0.347968 0.300882 +vt 0.347968 0.398850 +vt 0.300213 0.344484 +vt 0.347968 0.344484 +vt 0.300213 0.344484 +vt 0.300213 0.300882 +vt 0.347968 0.344484 +vt 0.347968 0.344484 +vt 0.347968 0.300882 +vt 0.395561 0.344484 +vt 0.395561 0.344484 +vt 0.347968 0.300882 +vt 0.395561 0.300882 +vt 0.347968 0.398850 +vt 0.347968 0.344484 +vt 0.395561 0.398850 +vt 0.395561 0.398850 +vt 0.347968 0.344484 +vt 0.395561 0.344484 +vt 0.252475 0.398850 +vt 0.252475 0.344484 +vt 0.300213 0.398850 +vt 0.252475 0.398850 +vt 0.204900 0.344484 +vt 0.252475 0.344484 +vt 0.204900 0.398850 +vt 0.204900 0.344484 +vt 0.252475 0.398850 +vt 0.157307 0.443055 +vt 0.109552 0.398850 +vt 0.157307 0.398850 +vt 0.204900 0.398850 +vt 0.204900 0.443055 +vt 0.157307 0.398850 +vt 0.157307 0.398850 +vt 0.204900 0.443055 +vt 0.157307 0.443055 +vt 0.204900 0.443055 +vt 0.157307 0.484898 +vt 0.157307 0.443055 +vt 0.109552 0.443055 +vt 0.061814 0.398850 +vt 0.109552 0.398850 +vt 0.157307 0.484898 +vt 0.109552 0.443055 +vt 0.157307 0.443055 +vt 0.109552 0.443055 +vt 0.109552 0.398850 +vt 0.157307 0.443055 +vt 0.109552 0.484898 +vt 0.109552 0.443055 +vt 0.157307 0.484898 +vt 0.061814 0.443055 +vt 0.061814 0.398850 +vt 0.109552 0.443055 +vt 0.061814 0.443055 +vt 0.014238 0.398850 +vt 0.061814 0.398850 +vt 0.109552 0.484898 +vt 0.061814 0.443055 +vt 0.109552 0.443055 +vt 0.061814 0.484898 +vt 0.061814 0.443055 +vt 0.109552 0.484898 +vt 0.014238 0.443055 +vt 0.014238 0.398850 +vt 0.061814 0.443055 +vt 0.061814 0.484898 +vt 0.014238 0.443055 +vt 0.061814 0.443055 +vt 0.014238 0.484898 +vt 0.014238 0.443055 +vt 0.061814 0.484898 +vt 0.204900 0.484898 +vt 0.157307 0.484898 +vt 0.204900 0.443055 +vt 0.204900 0.484898 +vt 0.204900 0.443055 +vt 0.252475 0.484898 +vt 0.252475 0.443055 +vt 0.204900 0.398850 +vt 0.252475 0.398850 +vt 0.252475 0.484898 +vt 0.204900 0.443055 +vt 0.252475 0.443055 +vt 0.204900 0.443055 +vt 0.204900 0.398850 +vt 0.252475 0.443055 +vt 0.252475 0.484898 +vt 0.252475 0.443055 +vt 0.300213 0.484898 +vt 0.300213 0.484898 +vt 0.252475 0.443055 +vt 0.300213 0.443055 +vt 0.252475 0.443055 +vt 0.252475 0.398850 +vt 0.300213 0.443055 +vt 0.300213 0.443055 +vt 0.252475 0.398850 +vt 0.300213 0.398850 +vt 0.300213 0.484898 +vt 0.300213 0.443055 +vt 0.347968 0.484898 +vt 0.347968 0.484898 +vt 0.300213 0.443055 +vt 0.347968 0.443055 +vt 0.300213 0.443055 +vt 0.300213 0.398850 +vt 0.347968 0.443055 +vt 0.347968 0.443055 +vt 0.300213 0.398850 +vt 0.347968 0.398850 +vt 0.347968 0.484898 +vt 0.347968 0.443055 +vt 0.395561 0.484898 +vt 0.395561 0.443055 +vt 0.347968 0.398850 +vt 0.395561 0.398850 +vt 0.347968 0.443055 +vt 0.347968 0.398850 +vt 0.395561 0.443055 +vt 0.395561 0.484898 +vt 0.347968 0.443055 +vt 0.395561 0.443055 +vt 0.157307 0.501952 +vt 0.109552 0.484898 +vt 0.157307 0.484898 +vt 0.204900 0.484898 +vt 0.157307 0.501952 +vt 0.157307 0.484898 +vt 0.204900 0.501952 +vt 0.157307 0.501952 +vt 0.204900 0.484898 +vt 0.061814 0.501952 +vt 0.014238 0.484898 +vt 0.061814 0.484898 +vt 0.109552 0.501952 +vt 0.061814 0.484898 +vt 0.109552 0.484898 +vt 0.061814 0.501952 +vt 0.061814 0.484898 +vt 0.109552 0.501952 +vt 0.109552 0.501952 +vt 0.109552 0.484898 +vt 0.157307 0.501952 +vt 0.395561 0.501952 +vt 0.347968 0.484898 +vt 0.395561 0.484898 +vt 0.347968 0.501952 +vt 0.347968 0.484898 +vt 0.395561 0.501952 +vt 0.347968 0.501952 +vt 0.300213 0.484898 +vt 0.347968 0.484898 +vt 0.300213 0.501952 +vt 0.252475 0.484898 +vt 0.300213 0.484898 +vt 0.300213 0.501952 +vt 0.300213 0.484898 +vt 0.347968 0.501952 +vt 0.204900 0.501952 +vt 0.204900 0.484898 +vt 0.252475 0.501952 +vt 0.252475 0.501952 +vt 0.252475 0.484898 +vt 0.300213 0.501952 +vt 0.252475 0.501952 +vt 0.204900 0.484898 +vt 0.252475 0.484898 +vt 0.014238 0.501952 +vt 0.014238 0.484898 +vt 0.061814 0.501952 +vt 0.111337 0.094110 +vt 0.174261 0.088596 +vt 0.193837 0.148369 +vt 0.111337 0.094110 +vt 0.193837 0.148369 +vt 0.121073 0.149669 +vt 0.111337 0.094110 +vt 0.121073 0.149669 +vt 0.047073 0.187736 +vt 0.111337 0.094110 +vt 0.047073 0.187736 +vt 0.051917 0.095998 +vt 0.111337 0.094110 +vt 0.051917 0.095998 +vt 0.047394 0.019933 +vt 0.111337 0.094110 +vt 0.047394 0.019933 +vt 0.113033 0.030134 +vt 0.111337 0.094110 +vt 0.197619 0.011919 +vt 0.174261 0.088596 +vt 0.111337 0.094110 +vt 0.113033 0.030134 +vt 0.197619 0.011919 +vt 0.972908 0.332746 +vt 0.981332 0.332746 +vt 0.972908 0.414355 +vt 0.972908 0.414355 +vt 0.981332 0.332746 +vt 0.981332 0.414355 +vt 0.972908 0.332746 +vt 0.981332 0.251136 +vt 0.981332 0.332746 +vt 0.972908 0.251136 +vt 0.981332 0.251136 +vt 0.972908 0.332746 +vt 0.972908 0.251136 +vt 0.981332 0.169527 +vt 0.981332 0.251136 +vt 0.972908 0.169527 +vt 0.981332 0.169527 +vt 0.972908 0.251136 +vt 0.972908 0.169527 +vt 0.981332 0.087916 +vt 0.981332 0.169527 +vt 0.972908 0.087916 +vt 0.981332 0.087916 +vt 0.972908 0.169527 +vt 0.972908 0.087916 +vt 0.981332 0.006307 +vt 0.981332 0.087916 +vt 0.972908 0.006307 +vt 0.981332 0.006307 +vt 0.972908 0.087916 +vt 0.972908 0.414355 +vt 0.981332 0.414355 +vt 0.972908 0.495965 +vt 0.972908 0.495965 +vt 0.981332 0.414355 +vt 0.981332 0.495965 +vt 0.972908 0.495965 +vt 0.981332 0.495965 +vt 0.972908 0.577575 +vt 0.972908 0.577575 +vt 0.981332 0.495965 +vt 0.981332 0.577575 +vt 0.972908 0.577575 +vt 0.981332 0.577575 +vt 0.972908 0.659185 +vt 0.972908 0.659185 +vt 0.981332 0.577575 +vt 0.981332 0.659185 +vt 0.972908 0.659185 +vt 0.981332 0.659185 +vt 0.972908 0.740794 +vt 0.972908 0.740794 +vt 0.981332 0.659185 +vt 0.981332 0.740794 +vt 0.972908 0.740794 +vt 0.981332 0.740794 +vt 0.972908 0.822404 +vt 0.972908 0.822404 +vt 0.981332 0.740794 +vt 0.981332 0.822404 +vt 0.972908 0.822404 +vt 0.981332 0.822404 +vt 0.972908 0.904014 +vt 0.972908 0.904014 +vt 0.981332 0.822404 +vt 0.981332 0.904014 +vt 0.972908 0.904014 +vt 0.981332 0.904014 +vt 0.972908 0.985623 +vt 0.972908 0.985623 +vt 0.981332 0.904014 +vt 0.981332 0.985623 +vt 0.908041 0.414355 +vt 0.972908 0.414355 +vt 0.908041 0.495965 +vt 0.908041 0.495965 +vt 0.972908 0.414355 +vt 0.972908 0.495965 +vt 0.908041 0.414355 +vt 0.972908 0.332746 +vt 0.972908 0.414355 +vt 0.908041 0.332746 +vt 0.972908 0.332746 +vt 0.908041 0.414355 +vt 0.908041 0.332746 +vt 0.972908 0.251136 +vt 0.972908 0.332746 +vt 0.908041 0.251136 +vt 0.972908 0.251136 +vt 0.908041 0.332746 +vt 0.908041 0.251136 +vt 0.972908 0.169527 +vt 0.972908 0.251136 +vt 0.908041 0.169526 +vt 0.972908 0.169527 +vt 0.908041 0.251136 +vt 0.908041 0.169526 +vt 0.972908 0.087916 +vt 0.972908 0.169527 +vt 0.908041 0.087916 +vt 0.972908 0.087916 +vt 0.908041 0.169526 +vt 0.908041 0.087916 +vt 0.972908 0.006307 +vt 0.972908 0.087916 +vt 0.908041 0.006307 +vt 0.972908 0.006307 +vt 0.908041 0.087916 +vt 0.908041 0.495965 +vt 0.972908 0.495965 +vt 0.908041 0.577575 +vt 0.908041 0.577575 +vt 0.972908 0.495965 +vt 0.972908 0.577575 +vt 0.908041 0.577575 +vt 0.972908 0.577575 +vt 0.908041 0.659185 +vt 0.908041 0.659185 +vt 0.972908 0.577575 +vt 0.972908 0.659185 +vt 0.908041 0.659185 +vt 0.972908 0.659185 +vt 0.908041 0.740794 +vt 0.908041 0.740794 +vt 0.972908 0.659185 +vt 0.972908 0.740794 +vt 0.908041 0.740794 +vt 0.972908 0.740794 +vt 0.908041 0.822404 +vt 0.908041 0.822404 +vt 0.972908 0.740794 +vt 0.972908 0.822404 +vt 0.908041 0.822404 +vt 0.972908 0.822404 +vt 0.908041 0.904014 +vt 0.908041 0.904014 +vt 0.972908 0.822404 +vt 0.972908 0.904014 +vt 0.908041 0.904014 +vt 0.972908 0.904014 +vt 0.908041 0.985623 +vt 0.908041 0.985623 +vt 0.972908 0.904014 +vt 0.972908 0.985623 +vn 0.3250 -0.5546 -0.7660 +vn 0.1194 -0.4845 -0.8666 +vn -0.1194 -0.4845 -0.8666 +vn -0.3250 -0.5546 -0.7660 +vn -0.4408 -0.6739 -0.5929 +vn -0.4364 -0.8082 -0.3954 +vn -0.3162 -0.9211 -0.2272 +vn -0.1150 -0.9846 -0.1316 +vn 0.1859 -0.1791 -0.9661 +vn -0.1859 -0.1791 -0.9661 +vn -0.5065 -0.2905 -0.8118 +vn -0.6870 -0.4808 -0.5449 +vn -0.6785 -0.6942 -0.2403 +vn -0.4898 -0.8717 0.0175 +vn -0.4897 -0.8717 0.0174 +vn -0.1776 -0.9706 0.1627 +vn -0.2320 0.1422 -0.9623 +vn 0.5065 -0.2905 -0.8118 +vn 0.2320 0.1422 -0.9623 +vn 0.6870 -0.4808 -0.5448 +vn 0.4408 -0.6739 -0.5929 +vn 0.4364 -0.8082 -0.3954 +vn 0.3162 -0.9211 -0.2272 +vn 0.1150 -0.9846 -0.1316 +vn 0.1776 -0.9706 0.1627 +vn 0.4898 -0.8717 0.0175 +vn 0.4898 -0.8717 0.0174 +vn 0.6785 -0.6942 -0.2403 +vn 0.6870 -0.4808 -0.5449 +vn 0.2237 -0.8698 0.4398 +vn 0.6175 -0.7426 0.2593 +vn 0.8556 -0.5138 -0.0623 +vn 0.8643 -0.2396 -0.4423 +vn 0.8643 -0.2397 -0.4423 +vn 0.6344 0.0023 -0.7730 +vn 0.6962 0.2902 -0.6566 +vn 0.9548 0.0240 -0.2963 +vn 0.2534 0.4415 -0.8607 +vn -0.2534 0.4415 -0.8607 +vn -0.6962 0.2902 -0.6566 +vn -0.6344 0.0023 -0.7730 +vn -0.8643 -0.2396 -0.4423 +vn -0.8643 -0.2397 -0.4423 +vn -0.8556 -0.5138 -0.0623 +vn -0.6175 -0.7426 0.2593 +vn -0.2237 -0.8698 0.4398 +vn -0.9548 0.0240 -0.2963 +vn -0.9511 -0.2835 0.1224 +vn -0.6890 -0.5440 0.4789 +vn -0.2499 -0.6899 0.6794 +vn -0.9511 0.2835 -0.1224 +vn -0.9548 -0.0240 0.2963 +vn -0.6962 -0.2901 0.6566 +vn -0.6962 -0.2902 0.6566 +vn -0.2534 -0.4415 0.8607 +vn -0.8643 0.2397 0.4423 +vn -0.8643 0.2396 0.4423 +vn -0.6890 0.5440 -0.4789 +vn -0.8556 0.5138 0.0623 +vn -0.2499 0.6899 -0.6794 +vn 0.2499 0.6899 -0.6794 +vn 0.6890 0.5440 -0.4789 +vn 0.9511 -0.2835 0.1224 +vn 0.9511 0.2835 -0.1224 +vn 0.6890 -0.5440 0.4789 +vn 0.2499 -0.6899 0.6794 +vn 0.2534 -0.4415 0.8607 +vn 0.6962 -0.2902 0.6566 +vn 0.9548 -0.0240 0.2963 +vn 0.6175 0.7426 -0.2593 +vn 0.8556 0.5138 0.0623 +vn 0.2320 -0.1422 0.9623 +vn 0.6344 -0.0023 0.7730 +vn 0.8643 0.2397 0.4423 +vn 0.8643 0.2396 0.4423 +vn 0.4897 0.8717 -0.0175 +vn 0.6785 0.6942 0.2403 +vn 0.1776 0.9706 -0.1627 +vn 0.2237 0.8698 -0.4398 +vn -0.2237 0.8698 -0.4398 +vn -0.6175 0.7426 -0.2593 +vn -0.1776 0.9706 -0.1627 +vn -0.4897 0.8717 -0.0175 +vn -0.6785 0.6942 0.2403 +vn -0.6870 0.4808 0.5449 +vn -0.5065 0.2905 0.8118 +vn -0.6344 -0.0023 0.7730 +vn -0.2320 -0.1422 0.9623 +vn -0.1859 0.1791 0.9661 +vn -0.3162 0.9211 0.2272 +vn -0.1150 0.9846 0.1316 +vn 0.1150 0.9846 0.1316 +vn 0.3162 0.9211 0.2272 +vn -0.1194 0.4845 0.8666 +vn -0.3250 0.5546 0.7660 +vn 0.6870 0.4808 0.5449 +vn 0.4364 0.8082 0.3954 +vn 0.5065 0.2905 0.8118 +vn 0.6870 0.4808 0.5448 +vn 0.1859 0.1791 0.9661 +vn 0.1194 0.4845 0.8666 +vn 0.3250 0.5546 0.7660 +vn 0.4408 0.6739 0.5929 +vn -0.4408 0.6739 0.5929 +vn -0.4364 0.8082 0.3954 +vn 0.1112 -0.7592 -0.6413 +vn 0.0408 -0.7359 -0.6758 +vn -0.0408 -0.7359 -0.6758 +vn -0.1112 -0.7592 -0.6413 +vn -0.1514 -0.7992 -0.5817 +vn -0.1509 -0.8449 -0.5132 +vn -0.1100 -0.8840 -0.4543 +vn -0.0402 -0.9064 -0.4204 +vn 0.0402 -0.9064 -0.4204 +vn 0.1100 -0.8840 -0.4543 +vn 0.1514 -0.7992 -0.5817 +vn 0.1509 -0.8449 -0.5132 +vn 0.1101 0.8840 0.4543 +vn 0.0402 0.9064 0.4204 +vn -0.0402 0.9064 0.4204 +vn -0.1101 0.8840 0.4543 +vn -0.1509 0.8449 0.5132 +vn -0.1514 0.7992 0.5817 +vn -0.1112 0.7592 0.6413 +vn -0.0408 0.7359 0.6758 +vn 0.0408 0.7359 0.6758 +vn 0.1112 0.7592 0.6413 +vn 0.1509 0.8449 0.5132 +vn 0.1514 0.7992 0.5817 +vn 0.0000 1.0000 0.0000 +vn -0.9415 0.0299 0.3357 +vn -0.9422 0.0337 0.3334 +vn -0.4291 -0.1437 0.8917 +vn -0.4260 -0.1486 0.8925 +vn -0.8881 0.1775 -0.4239 +vn -0.8937 0.1661 -0.4169 +vn -0.3263 0.2074 -0.9222 +vn -0.3300 0.2035 -0.9218 +vn 0.4273 0.1268 -0.8952 +vn 0.4296 0.1294 -0.8937 +vn 0.9424 -0.0281 -0.3334 +vn 0.9415 -0.0303 -0.3357 +vn 0.8878 -0.1793 0.4238 +vn 0.8903 -0.1899 0.4138 +vn 0.3242 -0.2349 0.9163 +vn 0.3280 -0.2407 0.9135 +vn 0.9001 0.3170 -0.2990 +vn 0.9002 0.3177 -0.2978 +vn 0.8984 0.0670 0.4340 +vn 0.8947 0.0712 0.4409 +vn 0.3269 -0.2572 0.9094 +vn 0.3692 -0.2908 0.8827 +vn -0.3209 0.3300 -0.8878 +vn -0.8963 -0.0891 -0.4344 +vn -0.8950 -0.0695 -0.4406 +vn -0.3644 0.2549 -0.8957 +vn 0.4003 0.4221 -0.8134 +vn 0.3719 0.3808 -0.8466 +vn 0.1650 0.8052 -0.5697 +vn 0.5207 0.8414 -0.1450 +vn 0.1524 0.7655 -0.6252 +vn 0.6870 0.5701 0.4506 +vn 0.5157 0.8490 -0.1155 +vn 0.3718 -0.3125 0.8741 +vn 0.6476 0.5694 0.5064 +vn 0.3982 -0.3110 0.8630 +vn -0.5342 -0.7369 -0.4142 +vn -0.3280 -0.9435 0.0470 +vn -0.8375 -0.4770 0.2666 +vn -0.2908 -0.9549 0.0608 +vn -0.8340 -0.4822 0.2681 +vn -0.3046 -0.5613 0.7695 +vn -0.3877 -0.4867 0.7828 +vn -0.0256 -0.8885 0.4582 +vn -0.0969 -0.8828 0.4597 +vn -0.6261 -0.5939 -0.5053 +vn -0.3742 0.3343 -0.8650 +vn -0.3876 0.2739 -0.8802 +vn 0.7667 0.6050 -0.2148 +vn 0.3299 0.4860 -0.8093 +vn 0.3739 0.6148 -0.6944 +vn 0.4311 0.3027 -0.8500 +vn 0.7917 0.3559 0.4966 +vn 0.9300 0.2475 -0.2719 +vn 0.7115 0.6976 -0.0836 +vn 0.9305 0.2521 -0.2659 +vn 0.7806 0.3665 0.5062 +vn 0.3759 -0.2347 0.8964 +vn 0.8843 0.0569 0.4634 +vn 0.8861 0.0541 0.4603 +vn 0.3261 -0.1989 0.9242 +vn 0.3241 -0.1760 0.9295 +vn 0.3318 -0.1840 0.9252 +vn 0.4305 0.3034 -0.8501 +vn -0.3320 0.1874 -0.9245 +vn -0.3529 0.1628 -0.9214 +vn -0.3259 0.1966 -0.9247 +vn -0.3273 0.2148 -0.9202 +vn -0.8906 -0.0269 -0.4540 +vn -0.8898 -0.0229 -0.4558 +vn -0.8488 -0.2000 -0.4895 +vn -0.8505 -0.2233 -0.4763 +vn -0.9338 -0.2301 0.2740 +vn -0.9322 -0.2343 0.2759 +vn -0.8688 -0.4531 0.1997 +vn -0.8266 -0.5086 0.2410 +vn -0.4305 -0.3041 0.8498 +vn -0.2993 -0.5453 0.7830 +vn -0.4058 -0.4830 0.7759 +vn -0.4311 -0.3034 0.8498 +vn 0.6867 -0.5809 -0.4370 +vn 0.2806 -0.5479 -0.7881 +vn -0.0229 -0.0618 -0.9978 +vn 0.3144 -0.5853 0.7474 +vn 0.8982 -0.2215 0.3798 +vn 0.9063 -0.3441 0.2454 +vn 0.9921 -0.1254 0.0109 +vn -0.4048 0.0721 0.9116 +vn -0.0971 -0.5281 0.8436 +vn -0.8277 -0.5445 0.1360 +vn -0.9018 0.1655 -0.3992 +vn -0.9628 0.1554 -0.2211 +vn 0.0513 -0.0616 -0.9968 +vn -0.9053 -0.4160 -0.0858 +vn -0.2542 -0.4022 -0.8796 +vn -0.6479 0.1026 0.7548 +vn 0.2165 0.9700 0.1109 +vn 0.3320 0.9055 0.2643 +vn -0.7391 0.6634 0.1168 +vn 0.0420 0.9124 -0.4072 +vn -0.0584 0.9071 0.4169 +vn -0.3146 0.9324 0.1778 +vn 0.1705 0.8397 0.5156 +vn 0.5206 0.8424 0.1395 +vn -0.4193 0.8052 -0.4193 +vn -0.5728 0.8052 -0.1535 +vn -0.5728 0.8052 0.1535 +vn -0.4193 0.8052 0.4193 +vn -0.1535 0.8052 0.5728 +vn -0.1535 0.8052 -0.5728 +vn 0.1535 0.8052 -0.5728 +vn 0.4193 0.8052 -0.4193 +vn 0.5728 0.8052 -0.1535 +vn 0.5728 0.8052 0.1535 +vn 0.4193 0.8052 0.4193 +vn 0.1535 0.8052 0.5728 +vn -0.2421 0.3534 -0.9036 +vn -0.6615 0.3534 -0.6615 +vn -0.9036 0.3534 -0.2421 +vn -0.9036 0.3534 0.2421 +vn -0.6615 0.3534 0.6615 +vn -0.2421 0.3534 0.9036 +vn 0.2421 0.3534 -0.9036 +vn 0.6615 0.3534 -0.6615 +vn 0.9036 0.3534 -0.2421 +vn 0.9036 0.3534 0.2421 +vn 0.6615 0.3534 0.6615 +vn 0.2421 0.3534 0.9036 +usemtl mat_ob001_bomb_002-material.001 +s off +f 3/1/1 1/2/1 2/3/1 +f 6/4/1 4/5/1 5/6/1 +f 9/7/2 7/8/2 8/9/2 +f 12/10/2 10/11/2 11/12/2 +f 15/13/3 13/14/3 14/15/3 +f 18/16/3 16/17/3 17/18/3 +f 21/19/4 19/20/4 20/21/4 +f 24/22/4 22/23/4 23/24/4 +f 27/25/5 25/26/5 26/27/5 +f 30/28/5 28/29/5 29/30/5 +f 33/31/6 31/32/6 32/33/6 +f 36/34/6 34/35/6 35/36/6 +f 39/37/7 37/38/7 38/39/7 +f 42/40/7 40/41/7 41/42/7 +f 45/43/8 43/44/8 44/45/8 +f 48/46/8 46/47/8 47/48/8 +f 51/49/9 49/50/9 50/51/9 +f 54/52/10 52/53/10 53/54/10 +f 57/55/10 55/56/10 56/57/10 +f 60/58/11 58/59/11 59/60/11 +f 63/61/11 61/62/11 62/63/11 +f 66/64/12 64/65/12 65/66/12 +f 69/67/12 67/68/12 68/69/12 +f 72/70/13 70/71/13 71/72/13 +f 75/73/13 73/74/13 74/75/13 +f 78/76/14 76/77/14 77/78/14 +f 81/79/15 79/80/15 80/81/15 +f 84/82/16 82/83/16 83/84/16 +f 87/85/16 85/86/16 86/87/16 +f 90/88/17 88/89/17 89/90/17 +f 93/91/17 91/92/17 92/93/17 +f 96/94/18 94/95/18 95/96/18 +f 99/97/19 97/98/19 98/99/19 +f 102/100/9 100/101/9 101/102/9 +f 105/103/18 103/104/18 104/105/18 +f 108/106/20 106/107/20 107/108/20 +f 111/109/21 109/110/21 110/111/21 +f 114/112/21 112/113/21 113/114/21 +f 117/115/22 115/116/22 116/117/22 +f 120/118/22 118/119/22 119/120/22 +f 123/121/23 121/122/23 122/123/23 +f 126/124/23 124/125/23 125/126/23 +f 129/127/24 127/128/24 128/129/24 +f 132/130/24 130/131/24 131/132/24 +f 135/133/25 133/134/25 134/135/25 +f 138/136/25 136/137/25 137/138/25 +f 141/139/26 139/140/26 140/141/26 +f 144/142/27 142/143/27 143/144/27 +f 147/145/28 145/146/28 146/147/28 +f 150/148/29 148/149/29 149/150/29 +f 153/151/28 151/152/28 152/153/28 +f 156/154/30 154/155/30 155/156/30 +f 159/157/30 157/158/30 158/159/30 +f 162/160/31 160/161/31 161/162/31 +f 165/163/31 163/164/31 164/165/31 +f 168/166/32 166/167/32 167/168/32 +f 171/169/32 169/170/32 170/171/32 +f 174/172/33 172/173/33 173/174/33 +f 177/175/34 175/176/34 176/177/34 +f 180/178/35 178/179/35 179/180/35 +f 183/181/19 181/182/19 182/183/19 +f 186/184/35 184/185/35 185/186/35 +f 189/187/36 187/188/36 188/189/36 +f 192/190/36 190/191/36 191/192/36 +f 195/193/37 193/194/37 194/195/37 +f 198/196/38 196/197/38 197/198/38 +f 201/199/38 199/200/38 200/201/38 +f 204/202/39 202/203/39 203/204/39 +f 207/205/39 205/206/39 206/207/39 +f 210/208/40 208/209/40 209/210/40 +f 213/211/41 211/212/41 212/213/41 +f 216/214/41 214/215/41 215/216/41 +f 219/217/40 217/218/40 218/219/40 +f 222/220/42 220/221/42 221/222/42 +f 225/223/43 223/224/43 224/225/43 +f 228/226/44 226/227/44 227/228/44 +f 231/229/44 229/230/44 230/231/44 +f 234/232/45 232/233/45 233/234/45 +f 237/235/45 235/236/45 236/237/45 +f 240/238/46 238/239/46 239/240/46 +f 243/241/46 241/242/46 242/243/46 +f 246/244/47 244/245/47 245/246/47 +f 249/247/47 247/248/47 248/249/47 +f 252/250/48 250/251/48 251/252/48 +f 255/253/48 253/254/48 254/255/48 +f 258/256/49 256/257/49 257/258/49 +f 261/259/49 259/260/49 260/261/49 +f 264/262/50 262/263/50 263/264/50 +f 267/265/50 265/266/50 266/267/50 +f 270/268/51 268/269/51 269/270/51 +f 273/271/52 271/272/52 272/273/52 +f 276/274/52 274/275/52 275/276/52 +f 279/277/53 277/278/53 278/279/53 +f 282/280/54 280/281/54 281/282/54 +f 285/283/55 283/284/55 284/285/55 +f 288/286/55 286/287/55 287/288/55 +f 291/289/56 289/290/56 290/291/56 +f 294/292/57 292/293/57 293/294/57 +f 297/295/58 295/296/58 296/297/58 +f 300/298/59 298/299/59 299/300/59 +f 303/301/51 301/302/51 302/303/51 +f 306/304/58 304/305/58 305/306/58 +f 309/307/60 307/308/60 308/309/60 +f 312/310/60 310/311/60 311/312/60 +f 315/313/61 313/314/61 314/315/61 +f 318/316/61 316/317/61 317/318/61 +f 321/319/62 319/320/62 320/321/62 +f 324/322/62 322/323/62 323/324/62 +f 327/325/63 325/326/63 326/327/63 +f 330/328/64 328/329/64 329/330/64 +f 333/331/37 331/332/37 332/333/37 +f 336/334/63 334/335/63 335/336/63 +f 339/337/65 337/338/65 338/339/65 +f 342/340/65 340/341/65 341/342/65 +f 345/343/66 343/344/66 344/345/66 +f 348/346/66 346/347/66 347/348/66 +f 351/349/67 349/350/67 350/351/67 +f 354/352/67 352/353/67 353/354/67 +f 357/355/68 355/356/68 356/357/68 +f 360/358/68 358/359/68 359/360/68 +f 363/361/64 361/362/64 362/363/64 +f 366/364/69 364/365/69 365/366/69 +f 369/367/69 367/368/69 368/369/69 +f 372/370/70 370/371/70 371/372/70 +f 375/373/70 373/374/70 374/375/70 +f 378/376/71 376/377/71 377/378/71 +f 381/379/72 379/380/72 380/381/72 +f 384/382/72 382/383/72 383/384/72 +f 387/385/73 385/386/73 386/387/73 +f 390/388/73 388/389/73 389/390/73 +f 393/391/74 391/392/74 392/393/74 +f 396/394/75 394/395/75 395/396/75 +f 399/397/71 397/398/71 398/399/71 +f 402/400/76 400/401/76 401/402/76 +f 405/403/76 403/404/76 404/405/76 +f 408/406/77 406/407/77 407/408/77 +f 411/409/78 409/410/78 410/411/78 +f 414/412/78 412/413/78 413/414/78 +f 417/415/79 415/416/79 416/417/79 +f 420/418/79 418/419/79 419/420/79 +f 423/421/80 421/422/80 422/423/80 +f 426/424/80 424/425/80 425/426/80 +f 429/427/81 427/428/81 428/429/81 +f 432/430/81 430/431/81 431/432/81 +f 435/433/59 433/434/59 434/435/59 +f 438/436/82 436/437/82 437/438/82 +f 441/439/82 439/440/82 440/441/82 +f 444/442/83 442/443/83 443/444/83 +f 447/445/83 445/446/83 446/447/83 +f 450/448/84 448/449/84 449/450/84 +f 453/451/84 451/452/84 452/453/84 +f 456/454/85 454/455/85 455/456/85 +f 459/457/85 457/458/85 458/459/85 +f 462/460/86 460/461/86 461/462/86 +f 465/463/86 463/464/86 464/465/86 +f 468/466/87 466/467/87 467/468/87 +f 471/469/87 469/470/87 470/471/87 +f 474/472/88 472/473/88 473/474/88 +f 477/475/88 475/476/88 476/477/88 +f 480/478/89 478/479/89 479/480/89 +f 483/481/89 481/482/89 482/483/89 +f 486/484/90 484/485/90 485/486/90 +f 489/487/91 487/488/91 488/489/91 +f 492/490/90 490/491/90 491/492/90 +f 495/493/91 493/494/91 494/495/91 +f 498/496/92 496/497/92 497/498/92 +f 501/499/93 499/500/93 500/501/93 +f 504/502/92 502/503/92 503/504/92 +f 507/505/93 505/506/93 506/507/93 +f 510/508/94 508/509/94 509/510/94 +f 513/511/95 511/512/95 512/513/95 +f 516/514/94 514/515/94 515/516/94 +f 519/517/77 517/518/77 518/519/77 +f 522/520/96 520/521/96 521/522/96 +f 525/523/97 523/524/97 524/525/97 +f 528/526/98 526/527/98 527/528/98 +f 531/529/99 529/530/99 530/531/99 +f 534/532/98 532/533/98 533/534/98 +f 537/535/100 535/536/100 536/537/100 +f 540/538/100 538/539/100 539/540/100 +f 543/541/101 541/542/101 542/543/101 +f 546/544/101 544/545/101 545/546/101 +f 549/547/102 547/548/102 548/549/102 +f 552/550/102 550/551/102 551/552/102 +f 555/553/97 553/554/97 554/555/97 +f 558/556/103 556/557/103 557/558/103 +f 561/559/103 559/560/103 560/561/103 +f 564/562/95 562/563/95 563/564/95 +f 567/565/104 565/566/104 566/567/104 +f 570/568/105 568/569/105 569/570/105 +f 573/571/105 571/572/105 572/573/105 +f 576/574/104 574/575/104 575/576/104 +f 579/577/106 577/578/106 578/579/106 +f 582/580/107 580/581/107 581/582/107 +f 585/583/108 583/584/108 584/585/108 +f 588/586/109 586/587/109 587/588/109 +f 591/589/110 589/590/110 590/591/110 +f 594/592/111 592/593/111 593/594/111 +f 597/595/112 595/596/112 596/597/112 +f 600/598/113 598/599/113 599/600/113 +f 603/601/114 601/602/114 602/603/114 +f 606/604/115 604/605/115 605/606/115 +f 609/607/116 607/608/116 608/609/116 +f 612/610/117 610/611/117 611/612/117 +f 615/613/118 613/614/118 614/615/118 +f 618/616/119 616/617/119 617/618/119 +f 621/619/120 619/620/120 620/621/120 +f 624/622/121 622/623/121 623/624/121 +f 627/625/122 625/626/122 626/627/122 +f 630/628/123 628/629/123 629/630/123 +f 633/631/124 631/632/124 632/633/124 +f 636/634/125 634/635/125 635/636/125 +f 639/637/126 637/638/126 638/639/126 +f 642/640/127 640/641/127 641/642/127 +f 645/643/128 643/644/128 644/645/128 +f 648/646/129 646/647/129 647/648/129 +f 651/649/130 649/650/130 650/651/130 +f 654/652/130 652/653/130 653/654/130 +f 657/655/130 655/656/130 656/657/130 +f 660/658/130 658/659/130 659/660/130 +f 663/661/130 661/662/130 662/663/130 +f 666/664/130 664/665/130 665/666/130 +f 669/667/130 667/668/130 668/669/130 +f 672/670/130 670/671/130 671/672/130 +f 675/673/130 673/674/130 674/675/130 +f 678/676/130 676/677/130 677/678/130 +f 681/679/130 679/680/130 680/681/130 +f 684/682/130 682/683/130 683/684/130 +f 687/685/131 685/686/131 686/687/131 +f 690/688/132 688/689/132 689/690/132 +f 693/691/133 691/692/133 692/693/133 +f 696/694/134 694/695/134 695/696/134 +f 699/697/135 697/698/135 698/699/135 +f 702/700/136 700/701/136 701/702/136 +f 705/703/137 703/704/137 704/705/137 +f 708/706/138 706/707/138 707/708/138 +f 711/709/139 709/710/139 710/711/139 +f 714/712/140 712/713/140 713/714/140 +f 717/715/141 715/716/141 716/717/141 +f 720/718/142 718/719/142 719/720/142 +f 723/721/143 721/722/143 722/723/143 +f 726/724/144 724/725/144 725/726/144 +f 729/727/145 727/728/145 728/729/145 +f 732/730/146 730/731/146 731/732/146 +f 735/733/147 733/734/147 734/735/147 +f 738/736/148 736/737/148 737/738/148 +f 741/739/149 739/740/149 740/741/149 +f 744/742/150 742/743/150 743/744/150 +f 747/745/151 745/746/151 746/747/151 +f 750/748/152 748/749/152 749/750/152 +f 753/751/153 751/752/153 752/753/153 +f 756/754/154 754/755/154 755/756/154 +f 759/757/155 757/758/155 758/759/155 +f 762/760/156 760/761/156 761/762/156 +f 765/763/157 763/764/157 764/765/157 +f 768/766/158 766/767/158 767/768/158 +f 771/769/159 769/770/159 770/771/159 +f 774/772/160 772/773/160 773/774/160 +f 777/775/161 775/776/161 776/777/161 +f 780/778/162 778/779/162 779/780/162 +f 783/781/163 781/782/163 782/783/163 +f 786/784/164 784/785/164 785/786/164 +f 789/787/165 787/788/165 788/789/165 +f 792/790/166 790/791/166 791/792/166 +f 795/793/167 793/794/167 794/795/167 +f 798/796/168 796/797/168 797/798/168 +f 801/799/169 799/800/169 800/801/169 +f 804/802/170 802/803/170 803/804/170 +f 807/805/171 805/806/171 806/807/171 +f 810/808/172 808/809/172 809/810/172 +f 813/811/173 811/812/173 812/813/173 +f 816/814/174 814/815/174 815/816/174 +f 819/817/175 817/818/175 818/819/175 +f 822/820/176 820/821/176 821/822/176 +f 825/823/177 823/824/177 824/825/177 +f 828/826/178 826/827/178 827/828/178 +f 831/829/179 829/830/179 830/831/179 +f 834/832/180 832/833/180 833/834/180 +f 837/835/181 835/836/181 836/837/181 +f 840/838/182 838/839/182 839/840/182 +f 843/841/183 841/842/183 842/843/183 +f 846/844/184 844/845/184 845/846/184 +f 849/847/185 847/848/185 848/849/185 +f 852/850/186 850/851/186 851/852/186 +f 855/853/187 853/854/187 854/855/187 +f 858/856/188 856/857/188 857/858/188 +f 861/859/189 859/860/189 860/861/189 +f 864/862/190 862/863/190 863/864/190 +f 867/865/191 865/866/191 866/867/191 +f 870/868/192 868/869/192 869/870/192 +f 873/871/193 871/872/193 872/873/193 +f 876/874/194 874/875/194 875/876/194 +f 879/877/195 877/878/195 878/879/195 +f 882/880/196 880/881/196 881/882/196 +f 885/883/197 883/884/197 884/885/197 +f 888/886/198 886/887/198 887/888/198 +f 891/889/199 889/890/199 890/891/199 +f 894/892/200 892/893/200 893/894/200 +f 897/895/201 895/896/201 896/897/201 +f 900/898/202 898/899/202 899/900/202 +f 903/901/203 901/902/203 902/903/203 +f 906/904/204 904/905/204 905/906/204 +f 909/907/205 907/908/205 908/909/205 +f 912/910/206 910/911/206 911/912/206 +f 915/913/207 913/914/207 914/915/207 +f 918/916/208 916/917/208 917/918/208 +f 921/919/209 919/920/209 920/921/209 +f 924/922/210 922/923/210 923/924/210 +f 927/925/211 925/926/211 926/927/211 +f 930/928/212 928/929/212 929/930/212 +f 933/931/213 931/932/213 932/933/213 +f 936/934/214 934/935/214 935/936/214 +f 939/937/215 937/938/215 938/939/215 +f 942/940/216 940/941/216 941/942/216 +f 945/943/217 943/944/217 944/945/217 +f 948/946/218 946/947/218 947/948/218 +f 951/949/219 949/950/219 950/951/219 +f 954/952/220 952/953/220 953/954/220 +f 957/955/221 955/956/221 956/957/221 +f 960/958/222 958/959/222 959/960/222 +f 963/961/223 961/962/223 962/963/223 +f 966/964/224 964/965/224 965/966/224 +f 969/967/225 967/968/225 968/969/225 +f 972/970/226 970/971/226 971/972/226 +f 975/973/227 973/974/227 974/975/227 +f 978/976/228 976/977/228 977/978/228 +f 981/979/229 979/980/229 980/981/229 +f 984/982/230 982/983/230 983/984/230 +f 987/985/231 985/986/231 986/987/231 +f 990/988/232 988/989/232 989/990/232 +f 993/991/233 991/992/233 992/993/233 +f 996/994/234 994/995/234 995/996/234 +f 999/997/235 997/998/235 998/999/235 +f 1002/1000/235 1000/1001/235 1001/1002/235 +f 1005/1003/236 1003/1004/236 1004/1005/236 +f 1008/1006/236 1006/1007/236 1007/1008/236 +f 1011/1009/237 1009/1010/237 1010/1011/237 +f 1014/1012/237 1012/1013/237 1013/1014/237 +f 1017/1015/238 1015/1016/238 1016/1017/238 +f 1020/1018/238 1018/1019/238 1019/1020/238 +f 1023/1021/239 1021/1022/239 1022/1023/239 +f 1026/1024/239 1024/1025/239 1025/1026/239 +f 1029/1027/240 1027/1028/240 1028/1029/240 +f 1032/1030/240 1030/1031/240 1031/1032/240 +f 1035/1033/241 1033/1034/241 1034/1035/241 +f 1038/1036/241 1036/1037/241 1037/1038/241 +f 1041/1039/242 1039/1040/242 1040/1041/242 +f 1044/1042/242 1042/1043/242 1043/1044/242 +f 1047/1045/243 1045/1046/243 1046/1047/243 +f 1050/1048/243 1048/1049/243 1049/1050/243 +f 1053/1051/244 1051/1052/244 1052/1053/244 +f 1056/1054/244 1054/1055/244 1055/1056/244 +f 1059/1057/245 1057/1058/245 1058/1059/245 +f 1062/1060/245 1060/1061/245 1061/1062/245 +f 1065/1063/246 1063/1064/246 1064/1065/246 +f 1068/1066/246 1066/1067/246 1067/1068/246 +f 1071/1069/247 1069/1070/247 1070/1071/247 +f 1074/1072/247 1072/1073/247 1073/1074/247 +f 1077/1075/248 1075/1076/248 1076/1077/248 +f 1080/1078/248 1078/1079/248 1079/1080/248 +f 1083/1081/249 1081/1082/249 1082/1083/249 +f 1086/1084/249 1084/1085/249 1085/1086/249 +f 1089/1087/250 1087/1088/250 1088/1089/250 +f 1092/1090/250 1090/1091/250 1091/1092/250 +f 1095/1093/251 1093/1094/251 1094/1095/251 +f 1098/1096/251 1096/1097/251 1097/1098/251 +f 1101/1099/252 1099/1100/252 1100/1101/252 +f 1104/1102/252 1102/1103/252 1103/1104/252 +f 1107/1105/253 1105/1106/253 1106/1107/253 +f 1110/1108/253 1108/1109/253 1109/1110/253 +f 1113/1111/254 1111/1112/254 1112/1113/254 +f 1116/1114/254 1114/1115/254 1115/1116/254 +f 1119/1117/255 1117/1118/255 1118/1119/255 +f 1122/1120/255 1120/1121/255 1121/1122/255 +f 1125/1123/256 1123/1124/256 1124/1125/256 +f 1128/1126/256 1126/1127/256 1127/1128/256 +f 1131/1129/257 1129/1130/257 1130/1131/257 +f 1134/1132/257 1132/1133/257 1133/1134/257 +f 1137/1135/258 1135/1136/258 1136/1137/258 +f 1140/1138/258 1138/1139/258 1139/1140/258 diff --git a/assets/bombs/bomb_fire.png b/assets/bombs/bomb_fire.png new file mode 100644 index 00000000..728b0c22 Binary files /dev/null and b/assets/bombs/bomb_fire.png differ diff --git a/assets/bombs/bomb_fire_particle.png b/assets/bombs/bomb_fire_particle.png new file mode 100644 index 00000000..a6cab2af Binary files /dev/null and b/assets/bombs/bomb_fire_particle.png differ diff --git a/assets/bombs/bomb_normal.png b/assets/bombs/bomb_normal.png new file mode 100644 index 00000000..5ef34b69 Binary files /dev/null and b/assets/bombs/bomb_normal.png differ diff --git a/assets/bombs/bomb_normal_particle.png b/assets/bombs/bomb_normal_particle.png new file mode 100644 index 00000000..b8b97f8e Binary files /dev/null and b/assets/bombs/bomb_normal_particle.png differ diff --git a/assets/bombs/bomb_pike.png b/assets/bombs/bomb_pike.png new file mode 100644 index 00000000..69b92359 Binary files /dev/null and b/assets/bombs/bomb_pike.png differ diff --git a/assets/bombs/bomb_plasma.png b/assets/bombs/bomb_plasma.png new file mode 100644 index 00000000..9f0c478d Binary files /dev/null and b/assets/bombs/bomb_plasma.png differ diff --git a/assets/bombs/bomb_plasma_particle.png b/assets/bombs/bomb_plasma_particle.png new file mode 100644 index 00000000..c0164b27 Binary files /dev/null and b/assets/bombs/bomb_plasma_particle.png differ diff --git a/assets/bombs/bomb_sexy.png b/assets/bombs/bomb_sexy.png new file mode 100644 index 00000000..d921a28e Binary files /dev/null and b/assets/bombs/bomb_sexy.png differ diff --git a/assets/bombs/bomb_sexy_particle.png b/assets/bombs/bomb_sexy_particle.png new file mode 100644 index 00000000..6edc4bd9 Binary files /dev/null and b/assets/bombs/bomb_sexy_particle.png differ diff --git a/assets/bombs/bomb_water.png b/assets/bombs/bomb_water.png new file mode 100644 index 00000000..8f8fdfbc Binary files /dev/null and b/assets/bombs/bomb_water.png differ diff --git a/assets/bombs/bomb_water_particle.png b/assets/bombs/bomb_water_particle.png new file mode 100644 index 00000000..38b65267 Binary files /dev/null and b/assets/bombs/bomb_water_particle.png differ diff --git a/assets/bombs/sounds/bomb_fire.ogg b/assets/bombs/sounds/bomb_fire.ogg new file mode 100644 index 00000000..0722566f Binary files /dev/null and b/assets/bombs/sounds/bomb_fire.ogg differ diff --git a/assets/bombs/sounds/bomb_normal.ogg b/assets/bombs/sounds/bomb_normal.ogg new file mode 100644 index 00000000..fcb6054d Binary files /dev/null and b/assets/bombs/sounds/bomb_normal.ogg differ diff --git a/assets/bombs/sounds/bomb_placed.ogg b/assets/bombs/sounds/bomb_placed.ogg new file mode 100644 index 00000000..7a3a45e0 Binary files /dev/null and b/assets/bombs/sounds/bomb_placed.ogg differ diff --git a/assets/bombs/sounds/bomb_plasma.ogg b/assets/bombs/sounds/bomb_plasma.ogg new file mode 100644 index 00000000..1842d381 Binary files /dev/null and b/assets/bombs/sounds/bomb_plasma.ogg differ diff --git a/assets/bombs/sounds/bomb_sexy.ogg b/assets/bombs/sounds/bomb_sexy.ogg new file mode 100644 index 00000000..7aed46e1 Binary files /dev/null and b/assets/bombs/sounds/bomb_sexy.ogg differ diff --git a/assets/bombs/sounds/bomb_water.ogg b/assets/bombs/sounds/bomb_water.ogg new file mode 100644 index 00000000..3ef77dec Binary files /dev/null and b/assets/bombs/sounds/bomb_water.ogg differ diff --git a/assets/guy.iqm b/assets/guy.iqm deleted file mode 100644 index 36bed5e0..00000000 Binary files a/assets/guy.iqm and /dev/null differ diff --git a/assets/guytex.png b/assets/guytex.png deleted file mode 100644 index 05a58eea..00000000 Binary files a/assets/guytex.png and /dev/null differ diff --git a/assets/icon.png b/assets/icon.png new file mode 100644 index 00000000..21bfd6f2 Binary files /dev/null and b/assets/icon.png differ diff --git a/assets/items/bombup.mtl b/assets/items/bombup.mtl new file mode 100644 index 00000000..d2a7d74f --- /dev/null +++ b/assets/items/bombup.mtl @@ -0,0 +1,12 @@ +# Blender MTL File: 'None' +# Material Count: 1 + +newmtl mat_map_ob000_item_007 +Ns 323.999994 +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.000000 +d 1.000000 +illum 2 diff --git a/assets/items/bombup.obj b/assets/items/bombup.obj new file mode 100644 index 00000000..ab9d47d4 --- /dev/null +++ b/assets/items/bombup.obj @@ -0,0 +1,72 @@ +# Blender v2.92.0 OBJ File: '' +# www.blender.org +mtllib bombup.mtl +o map_ob000_item_02_bombup +v 0.400000 -0.335876 0.229810 +v -0.400000 0.229810 -0.335876 +v 0.400000 0.229810 -0.335876 +v -0.400000 -0.335876 0.229810 +v 0.400000 0.229810 -0.335876 +v -0.400000 0.335876 -0.229810 +v 0.400000 0.335876 -0.229810 +v -0.400000 0.229810 -0.335876 +v 0.400000 0.335876 -0.229810 +v -0.400000 -0.229810 0.335876 +v 0.400000 -0.229810 0.335876 +v -0.400000 0.335876 -0.229810 +v 0.400000 -0.229810 0.335876 +v -0.400000 -0.335876 0.229810 +v 0.400000 -0.335876 0.229810 +v -0.400000 -0.229810 0.335876 +v -0.400000 -0.229810 0.335876 +v -0.400000 0.229810 -0.335876 +v -0.400000 -0.335876 0.229810 +v -0.400000 0.335876 -0.229810 +v 0.400000 0.335876 -0.229810 +v 0.400000 -0.335876 0.229810 +v 0.400000 0.229810 -0.335876 +v 0.400000 -0.229810 0.335876 +vt 0.001000 0.498000 +vt 0.001000 0.252000 +vt 0.124000 0.498000 +vt 0.124000 0.252000 +vt 0.632244 0.754140 +vt 0.648280 0.754140 +vt 0.632244 0.996259 +vt 0.648280 0.996259 +vt 0.124000 0.252000 +vt 0.124000 0.498000 +vt 0.001000 0.252000 +vt 0.001000 0.498000 +vt 0.648280 0.996259 +vt 0.632244 0.996259 +vt 0.648280 0.754140 +vt 0.632244 0.754140 +vt 0.648280 0.996259 +vt 0.632244 0.996259 +vt 0.648280 0.754140 +vt 0.632244 0.754140 +vt 0.648280 0.996259 +vt 0.632244 0.996259 +vt 0.648280 0.754140 +vt 0.632244 0.754140 +vn 0.0000 -0.7071 -0.7071 +vn 0.0000 0.7071 -0.7071 +vn 0.0000 0.7071 0.7071 +vn 0.0000 -0.7071 0.7071 +vn -1.0000 0.0000 0.0000 +vn 1.0000 0.0000 0.0000 +usemtl mat_map_ob000_item_007 +s off +f 3/1/1 1/2/1 2/3/1 +f 2/3/1 1/2/1 4/4/1 +f 7/5/2 5/6/2 6/7/2 +f 6/7/2 5/6/2 8/8/2 +f 11/9/3 9/10/3 10/11/3 +f 10/11/3 9/10/3 12/12/3 +f 15/13/4 13/14/4 14/15/4 +f 14/15/4 13/14/4 16/16/4 +f 19/17/5 17/18/5 18/19/5 +f 18/19/5 17/18/5 20/20/5 +f 23/21/6 21/22/6 22/23/6 +f 22/23/6 21/22/6 24/24/6 diff --git a/assets/items/fireup.mtl b/assets/items/fireup.mtl new file mode 100644 index 00000000..2445bb45 --- /dev/null +++ b/assets/items/fireup.mtl @@ -0,0 +1,12 @@ +# Blender MTL File: 'None' +# Material Count: 1 + +newmtl mat_map_ob000_item_007.001 +Ns 323.999994 +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.000000 +d 1.000000 +illum 2 diff --git a/assets/items/fireup.obj b/assets/items/fireup.obj new file mode 100644 index 00000000..664c62c4 --- /dev/null +++ b/assets/items/fireup.obj @@ -0,0 +1,72 @@ +# Blender v2.92.0 OBJ File: '' +# www.blender.org +mtllib fireup.mtl +o map_ob000_item_01_fireup +v 0.400000 -0.335876 0.229810 +v -0.400000 0.229810 -0.335876 +v 0.400000 0.229810 -0.335876 +v -0.400000 -0.335876 0.229810 +v 0.400000 0.229810 -0.335876 +v -0.400000 0.335876 -0.229810 +v 0.400000 0.335876 -0.229810 +v -0.400000 0.229810 -0.335876 +v 0.400000 0.335876 -0.229810 +v -0.400000 -0.229810 0.335876 +v 0.400000 -0.229810 0.335876 +v -0.400000 0.335876 -0.229810 +v 0.400000 -0.229810 0.335876 +v -0.400000 -0.335876 0.229810 +v 0.400000 -0.335876 0.229810 +v -0.400000 -0.229810 0.335876 +v -0.400000 -0.229810 0.335876 +v -0.400000 0.229810 -0.335876 +v -0.400000 -0.335876 0.229810 +v -0.400000 0.335876 -0.229810 +v 0.400000 0.335876 -0.229810 +v 0.400000 -0.335876 0.229810 +v 0.400000 0.229810 -0.335876 +v 0.400000 -0.229810 0.335876 +vt 0.000000 0.250000 +vt 0.000000 0.000000 +vt 0.125000 0.250000 +vt 0.125000 0.000000 +vt 0.125000 0.237500 +vt 0.125000 0.250000 +vt 0.000000 0.237500 +vt 0.000000 0.250000 +vt 0.125000 0.000000 +vt 0.125000 0.250000 +vt 0.000000 0.000000 +vt 0.000000 0.250000 +vt 0.000000 0.250000 +vt 0.000000 0.237500 +vt 0.125000 0.250000 +vt 0.125000 0.237500 +vt 0.000000 0.250000 +vt 0.000000 0.237500 +vt 0.125000 0.250000 +vt 0.125000 0.237500 +vt 0.000000 0.250000 +vt 0.000000 0.237500 +vt 0.125000 0.250000 +vt 0.125000 0.237500 +vn 0.0000 -0.7071 -0.7071 +vn 0.0000 0.7071 -0.7071 +vn 0.0000 0.7071 0.7071 +vn 0.0000 -0.7071 0.7071 +vn -1.0000 0.0000 0.0000 +vn 1.0000 0.0000 0.0000 +usemtl mat_map_ob000_item_007.001 +s off +f 3/1/1 1/2/1 2/3/1 +f 2/3/1 1/2/1 4/4/1 +f 7/5/2 5/6/2 6/7/2 +f 6/7/2 5/6/2 8/8/2 +f 11/9/3 9/10/3 10/11/3 +f 10/11/3 9/10/3 12/12/3 +f 15/13/4 13/14/4 14/15/4 +f 14/15/4 13/14/4 16/16/4 +f 19/17/5 17/18/5 18/19/5 +f 18/19/5 17/18/5 20/20/5 +f 23/21/6 21/22/6 22/23/6 +f 22/23/6 21/22/6 24/24/6 diff --git a/assets/items/items.png b/assets/items/items.png new file mode 100644 index 00000000..a9abc255 Binary files /dev/null and b/assets/items/items.png differ diff --git a/assets/items/sound/bombup.ogg b/assets/items/sound/bombup.ogg new file mode 100644 index 00000000..72e76d4c Binary files /dev/null and b/assets/items/sound/bombup.ogg differ diff --git a/assets/items/sound/fireup.ogg b/assets/items/sound/fireup.ogg new file mode 100644 index 00000000..a8be41ac Binary files /dev/null and b/assets/items/sound/fireup.ogg differ diff --git a/assets/items/sound/speedup.ogg b/assets/items/sound/speedup.ogg new file mode 100644 index 00000000..625f87e5 Binary files /dev/null and b/assets/items/sound/speedup.ogg differ diff --git a/assets/items/sound/wallpass.ogg b/assets/items/sound/wallpass.ogg new file mode 100644 index 00000000..fa427f64 Binary files /dev/null and b/assets/items/sound/wallpass.ogg differ diff --git a/assets/items/speedup.mtl b/assets/items/speedup.mtl new file mode 100644 index 00000000..e2209d22 --- /dev/null +++ b/assets/items/speedup.mtl @@ -0,0 +1,12 @@ +# Blender MTL File: 'None' +# Material Count: 1 + +newmtl mat_map_ob000_item_007.002 +Ns 323.999994 +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.000000 +d 1.000000 +illum 2 diff --git a/assets/items/speedup.obj b/assets/items/speedup.obj new file mode 100644 index 00000000..9b8292cc --- /dev/null +++ b/assets/items/speedup.obj @@ -0,0 +1,72 @@ +# Blender v2.92.0 OBJ File: '' +# www.blender.org +mtllib speedup.mtl +o map_ob000_item_03_speedup +v 0.400000 -0.335876 0.229810 +v -0.400000 0.229810 -0.335876 +v 0.400000 0.229810 -0.335876 +v -0.400000 -0.335876 0.229810 +v 0.400000 0.229810 -0.335876 +v -0.400000 0.335876 -0.229810 +v 0.400000 0.335876 -0.229810 +v -0.400000 0.229810 -0.335876 +v 0.400000 0.335876 -0.229810 +v -0.400000 -0.229810 0.335876 +v 0.400000 -0.229810 0.335876 +v -0.400000 0.335876 -0.229810 +v 0.400000 -0.229810 0.335876 +v -0.400000 -0.335876 0.229810 +v 0.400000 -0.335876 0.229810 +v -0.400000 -0.229810 0.335876 +v -0.400000 -0.229810 0.335876 +v -0.400000 0.229810 -0.335876 +v -0.400000 -0.335876 0.229810 +v -0.400000 0.335876 -0.229810 +v 0.400000 0.335876 -0.229810 +v 0.400000 -0.335876 0.229810 +v 0.400000 0.229810 -0.335876 +v 0.400000 -0.229810 0.335876 +vt 0.001000 0.748000 +vt 0.001000 0.502000 +vt 0.124000 0.748000 +vt 0.124000 0.502000 +vt 0.632244 0.754140 +vt 0.648280 0.754140 +vt 0.632244 0.996259 +vt 0.648280 0.996259 +vt 0.124000 0.502000 +vt 0.124000 0.748000 +vt 0.001000 0.502000 +vt 0.001000 0.748000 +vt 0.648280 0.996259 +vt 0.632244 0.996259 +vt 0.648280 0.754140 +vt 0.632244 0.754140 +vt 0.648280 0.996259 +vt 0.632244 0.996259 +vt 0.648280 0.754140 +vt 0.632244 0.754140 +vt 0.648280 0.996259 +vt 0.632244 0.996259 +vt 0.648280 0.754140 +vt 0.632244 0.754140 +vn 0.0000 -0.7071 -0.7071 +vn 0.0000 0.7071 -0.7071 +vn 0.0000 0.7071 0.7071 +vn 0.0000 -0.7071 0.7071 +vn -1.0000 0.0000 0.0000 +vn 1.0000 0.0000 0.0000 +usemtl mat_map_ob000_item_007.002 +s off +f 3/1/1 1/2/1 2/3/1 +f 2/3/1 1/2/1 4/4/1 +f 7/5/2 5/6/2 6/7/2 +f 6/7/2 5/6/2 8/8/2 +f 11/9/3 9/10/3 10/11/3 +f 10/11/3 9/10/3 12/12/3 +f 15/13/4 13/14/4 14/15/4 +f 14/15/4 13/14/4 16/16/4 +f 19/17/5 17/18/5 18/19/5 +f 18/19/5 17/18/5 20/20/5 +f 23/21/6 21/22/6 22/23/6 +f 22/23/6 21/22/6 24/24/6 diff --git a/assets/items/wallpass.mtl b/assets/items/wallpass.mtl new file mode 100644 index 00000000..26ba44df --- /dev/null +++ b/assets/items/wallpass.mtl @@ -0,0 +1,12 @@ +# Blender MTL File: 'None' +# Material Count: 1 + +newmtl mat_map_ob000_item_007.003 +Ns 323.999994 +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.000000 +d 1.000000 +illum 2 diff --git a/assets/items/wallpass.obj b/assets/items/wallpass.obj new file mode 100644 index 00000000..44360fc0 --- /dev/null +++ b/assets/items/wallpass.obj @@ -0,0 +1,72 @@ +# Blender v2.92.0 OBJ File: '' +# www.blender.org +mtllib wallpass.mtl +o map_ob000_item_14_wallthrough +v 0.400000 -0.335876 0.229810 +v -0.400000 0.229810 -0.335876 +v 0.400000 0.229810 -0.335876 +v -0.400000 -0.335876 0.229810 +v 0.400000 0.229810 -0.335876 +v -0.400000 0.335876 -0.229810 +v 0.400000 0.335876 -0.229810 +v -0.400000 0.229810 -0.335876 +v 0.400000 0.335876 -0.229810 +v -0.400000 -0.229810 0.335876 +v 0.400000 -0.229810 0.335876 +v -0.400000 0.335876 -0.229810 +v 0.400000 -0.229810 0.335876 +v -0.400000 -0.335876 0.229810 +v 0.400000 -0.335876 0.229810 +v -0.400000 -0.229810 0.335876 +v -0.400000 -0.229810 0.335876 +v -0.400000 0.229810 -0.335876 +v -0.400000 -0.335876 0.229810 +v -0.400000 0.335876 -0.229810 +v 0.400000 0.335876 -0.229810 +v 0.400000 -0.335876 0.229810 +v 0.400000 0.229810 -0.335876 +v 0.400000 -0.229810 0.335876 +vt 0.501000 0.998000 +vt 0.501000 0.752000 +vt 0.624000 0.998000 +vt 0.624000 0.752000 +vt 0.632244 0.754140 +vt 0.648280 0.754140 +vt 0.632244 0.996259 +vt 0.648280 0.996259 +vt 0.624000 0.752000 +vt 0.624000 0.998000 +vt 0.501000 0.752000 +vt 0.501000 0.998000 +vt 0.648280 0.996259 +vt 0.632244 0.996259 +vt 0.648280 0.754140 +vt 0.632244 0.754140 +vt 0.648280 0.996259 +vt 0.632244 0.996259 +vt 0.648280 0.754140 +vt 0.632244 0.754140 +vt 0.648280 0.996259 +vt 0.632244 0.996259 +vt 0.648280 0.754140 +vt 0.632244 0.754140 +vn 0.0000 -0.7071 -0.7071 +vn 0.0000 0.7071 -0.7071 +vn 0.0000 0.7071 0.7071 +vn 0.0000 -0.7071 0.7071 +vn -1.0000 0.0000 0.0000 +vn 1.0000 0.0000 0.0000 +usemtl mat_map_ob000_item_007.003 +s off +f 3/1/1 1/2/1 2/3/1 +f 2/3/1 1/2/1 4/4/1 +f 7/5/2 5/6/2 6/7/2 +f 6/7/2 5/6/2 8/8/2 +f 11/9/3 9/10/3 10/11/3 +f 10/11/3 9/10/3 12/12/3 +f 15/13/4 13/14/4 14/15/4 +f 14/15/4 13/14/4 16/16/4 +f 19/17/5 17/18/5 18/19/5 +f 18/19/5 17/18/5 20/20/5 +f 23/21/6 21/22/6 22/23/6 +f 22/23/6 21/22/6 24/24/6 diff --git a/assets/musics/music_battle.ogg b/assets/musics/music_battle.ogg new file mode 100644 index 00000000..ddc30218 Binary files /dev/null and b/assets/musics/music_battle.ogg differ diff --git a/assets/musics/music_player_select.ogg b/assets/musics/music_player_select.ogg new file mode 100644 index 00000000..8889fd0b Binary files /dev/null and b/assets/musics/music_player_select.ogg differ diff --git a/assets/musics/music_result.ogg b/assets/musics/music_result.ogg new file mode 100644 index 00000000..1f82ad23 Binary files /dev/null and b/assets/musics/music_result.ogg differ diff --git a/assets/musics/music_title.ogg b/assets/musics/music_title.ogg new file mode 100644 index 00000000..86d6e7ee Binary files /dev/null and b/assets/musics/music_title.ogg differ diff --git a/assets/musics/music_win.ogg b/assets/musics/music_win.ogg new file mode 100644 index 00000000..eadd8eff Binary files /dev/null and b/assets/musics/music_win.ogg differ diff --git a/assets/player/blue.png b/assets/player/blue.png new file mode 100644 index 00000000..d8cf2be5 Binary files /dev/null and b/assets/player/blue.png differ diff --git a/assets/player/cyan.png b/assets/player/cyan.png new file mode 100644 index 00000000..9b31195c Binary files /dev/null and b/assets/player/cyan.png differ diff --git a/assets/player/green.png b/assets/player/green.png new file mode 100644 index 00000000..365186a4 Binary files /dev/null and b/assets/player/green.png differ diff --git a/assets/player/player.iqm b/assets/player/player.iqm new file mode 100644 index 00000000..98fdf3dd Binary files /dev/null and b/assets/player/player.iqm differ diff --git a/assets/player/purple.png b/assets/player/purple.png new file mode 100644 index 00000000..31438301 Binary files /dev/null and b/assets/player/purple.png differ diff --git a/assets/player/red.png b/assets/player/red.png new file mode 100644 index 00000000..0a5c0e7b Binary files /dev/null and b/assets/player/red.png differ diff --git a/assets/player/sounds/player_die.ogg b/assets/player/sounds/player_die.ogg new file mode 100644 index 00000000..b5822604 Binary files /dev/null and b/assets/player/sounds/player_die.ogg differ diff --git a/assets/player/yellow.png b/assets/player/yellow.png new file mode 100644 index 00000000..15abcb54 Binary files /dev/null and b/assets/player/yellow.png differ diff --git a/assets/sounds/crate_break.ogg b/assets/sounds/crate_break.ogg new file mode 100644 index 00000000..50c0bd13 Binary files /dev/null and b/assets/sounds/crate_break.ogg differ diff --git a/assets/wall/breakable_wall.mtl b/assets/wall/breakable_wall.mtl new file mode 100644 index 00000000..7925a729 --- /dev/null +++ b/assets/wall/breakable_wall.mtl @@ -0,0 +1,12 @@ +# Blender MTL File: 'None' +# Material Count: 1 + +newmtl Cube.001 +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 diff --git a/assets/wall/breakable_wall.obj b/assets/wall/breakable_wall.obj new file mode 100644 index 00000000..320cb55e --- /dev/null +++ b/assets/wall/breakable_wall.obj @@ -0,0 +1,338 @@ +# Blender v2.92.0 OBJ File: '' +# www.blender.org +mtllib breakable_wall.mtl +o Cube.002 +v 0.404250 -0.428000 -0.404250 +v 0.404250 -0.428000 0.404250 +v -0.404250 -0.428000 0.404250 +v -0.404250 -0.428000 -0.404250 +v -0.404250 0.436000 0.404250 +v 0.404250 0.436000 0.404250 +v 0.404250 0.436000 -0.404250 +v -0.404250 0.436000 -0.404250 +v 0.432000 0.408250 -0.404250 +v 0.432000 0.408250 0.404250 +v 0.432000 -0.400250 0.404250 +v 0.432000 -0.400250 -0.404250 +v 0.404250 -0.500000 -0.404250 +v -0.404250 -0.500000 -0.404250 +v -0.404250 -0.500000 -0.504000 +v 0.404250 -0.500000 -0.504000 +v -0.404250 -0.500000 0.404250 +v 0.404250 -0.500000 0.404250 +v 0.404250 -0.500000 0.504000 +v -0.404250 -0.500000 0.504000 +v -0.404250 0.508000 -0.404250 +v 0.404250 0.508000 -0.404250 +v 0.404250 0.508000 -0.504000 +v -0.404250 0.508000 -0.504000 +v 0.404250 0.508000 0.404250 +v -0.404250 0.508000 0.404250 +v -0.404250 0.508000 0.504000 +v 0.404250 0.508000 0.504000 +v 0.504000 0.408250 -0.404250 +v 0.504000 -0.400250 -0.404250 +v 0.504000 -0.400250 -0.504000 +v 0.504000 0.408250 -0.504000 +v 0.504000 -0.400250 0.404250 +v 0.504000 0.408250 0.404250 +v 0.504000 0.408250 0.504000 +v 0.504000 -0.400250 0.504000 +v -0.504000 0.408250 0.404250 +v -0.504000 -0.400250 0.404250 +v -0.504000 -0.400250 0.504000 +v -0.504000 0.408250 0.504000 +v -0.504000 -0.400250 -0.404250 +v -0.504000 0.408250 -0.404250 +v -0.504000 0.408250 -0.504000 +v -0.504000 -0.400250 -0.504000 +v 0.404250 0.408250 0.504000 +v -0.404250 0.408250 0.504000 +v -0.404250 -0.400250 0.504000 +v 0.404250 -0.400250 0.504000 +v 0.504000 0.508000 -0.404250 +v 0.504000 0.508000 0.404250 +v 0.504000 -0.500000 0.404250 +v 0.504000 -0.500000 -0.404250 +v 0.404250 0.408250 -0.504000 +v -0.404250 0.408250 -0.504000 +v -0.404250 -0.400250 -0.504000 +v 0.404250 -0.400250 -0.504000 +v -0.504000 0.508000 -0.404250 +v -0.504000 0.508000 0.404250 +v -0.504000 -0.500000 0.404250 +v -0.504000 -0.500000 -0.404250 +v 0.504000 0.508000 -0.504000 +v 0.504000 -0.500000 -0.504000 +v 0.504000 -0.500000 0.504000 +v 0.504000 0.508000 0.504000 +v -0.504000 0.508000 0.504000 +v -0.504000 -0.500000 0.504000 +v -0.504000 -0.500000 -0.504000 +v -0.504000 0.508000 -0.504000 +v -0.404250 0.408250 0.432000 +v 0.404250 0.408250 0.432000 +v -0.404250 -0.400250 0.432000 +v 0.404250 -0.400250 0.432000 +v 0.404250 0.408250 -0.432000 +v -0.404250 0.408250 -0.432000 +v 0.404250 -0.400250 -0.432000 +v -0.404250 -0.400250 -0.432000 +v -0.432000 0.408250 0.404250 +v -0.432000 -0.400250 0.404250 +v -0.432000 0.408250 -0.404250 +v -0.432000 -0.400250 -0.404250 +vt 0.287300 0.056300 +vt 0.287300 0.282400 +vt 0.061200 0.282400 +vt 0.061200 0.056300 +vt 0.621800 0.620900 +vt 0.395400 0.620900 +vt 0.395400 0.394400 +vt 0.621800 0.394400 +vt 0.299200 0.394400 +vt 0.299200 0.620900 +vt 0.072700 0.620900 +vt 0.072700 0.394400 +vt 0.287300 0.036100 +vt 0.061200 0.036100 +vt 0.061200 0.008200 +vt 0.287300 0.008200 +vt 0.061200 0.302500 +vt 0.287300 0.302500 +vt 0.287300 0.330400 +vt 0.061200 0.330400 +vt 0.621800 0.374200 +vt 0.395400 0.374200 +vt 0.395400 0.346300 +vt 0.621800 0.346300 +vt 0.395400 0.641000 +vt 0.621800 0.641000 +vt 0.621800 0.669000 +vt 0.395400 0.669000 +vt 0.299200 0.374200 +vt 0.072700 0.374200 +vt 0.072700 0.346300 +vt 0.299200 0.346300 +vt 0.072700 0.641000 +vt 0.299200 0.641000 +vt 0.299200 0.669000 +vt 0.072700 0.669000 +vt 0.718100 0.641000 +vt 0.944500 0.641000 +vt 0.944500 0.669000 +vt 0.718100 0.669000 +vt 0.944500 0.374200 +vt 0.718100 0.374200 +vt 0.718100 0.346300 +vt 0.944500 0.346300 +vt 0.395400 0.696900 +vt 0.621800 0.696900 +vt 0.621800 0.963700 +vt 0.621800 0.991700 +vt 0.395400 0.991700 +vt 0.395400 0.963700 +vt 0.347300 0.394400 +vt 0.347300 0.620900 +vt 0.319300 0.620900 +vt 0.319300 0.394400 +vt 0.052500 0.394400 +vt 0.052500 0.620900 +vt 0.024600 0.620600 +vt 0.024600 0.394300 +vt 0.395400 0.318300 +vt 0.621800 0.318300 +vt 0.621800 0.051500 +vt 0.395400 0.051500 +vt 0.395400 0.023600 +vt 0.621800 0.023600 +vt 0.670000 0.394400 +vt 0.697900 0.394400 +vt 0.697900 0.620900 +vt 0.670000 0.620900 +vt 0.992600 0.620900 +vt 0.964700 0.620900 +vt 0.964700 0.394400 +vt 0.992600 0.394400 +vt 0.319300 0.366500 +vt 0.347300 0.366500 +vt 0.052500 0.366500 +vt 0.024600 0.366500 +vt 0.052500 0.648800 +vt 0.024600 0.648800 +vt 0.319300 0.648800 +vt 0.347300 0.648800 +vt 0.697900 0.648800 +vt 0.670000 0.648800 +vt 0.964700 0.648800 +vt 0.992600 0.648800 +vt 0.964700 0.366500 +vt 0.992600 0.366500 +vt 0.697900 0.366500 +vt 0.670000 0.366500 +vt 0.335400 0.282600 +vt 0.307500 0.282400 +vt 0.307500 0.056300 +vt 0.335400 0.056300 +vt 0.013200 0.282400 +vt 0.013200 0.056300 +vt 0.041100 0.056300 +vt 0.041100 0.282400 +vt 0.642000 0.620900 +vt 0.642000 0.394400 +vt 0.375200 0.394400 +vt 0.375200 0.620900 +vt 0.670000 0.717100 +vt 0.670000 0.943500 +vt 0.642000 0.943500 +vt 0.642000 0.717100 +vt 0.347300 0.717100 +vt 0.375200 0.717100 +vt 0.375200 0.943500 +vt 0.347300 0.943500 +vt 0.347300 0.298200 +vt 0.347300 0.071700 +vt 0.375200 0.071700 +vt 0.375200 0.298200 +vt 0.670000 0.071700 +vt 0.670000 0.298200 +vt 0.642000 0.298200 +vt 0.642000 0.071700 +vt 0.315200 0.008200 +vt 0.315200 0.036100 +vt 0.033300 0.008200 +vt 0.033300 0.036100 +vt 0.033300 0.302500 +vt 0.033300 0.330400 +vt 0.315200 0.302500 +vt 0.315200 0.330400 +vt 0.649800 0.374200 +vt 0.649800 0.346300 +vt 0.367400 0.374200 +vt 0.367400 0.346300 +vt 0.367400 0.669000 +vt 0.367400 0.641000 +vt 0.649800 0.669000 +vt 0.649800 0.641000 +vt 0.649800 0.696900 +vt 0.367400 0.696900 +vt 0.367400 0.991700 +vt 0.367400 0.963700 +vt 0.649800 0.963700 +vt 0.649800 0.991700 +vt 0.367400 0.318300 +vt 0.649800 0.318300 +vt 0.649800 0.023600 +vt 0.649800 0.051500 +vt 0.367400 0.051500 +vt 0.367400 0.023600 +vt 0.621800 0.717100 +vt 0.395400 0.717100 +vt 0.621800 0.943500 +vt 0.395400 0.943500 +vt 0.395400 0.298200 +vt 0.621800 0.298200 +vt 0.395400 0.071700 +vt 0.621800 0.071700 +vt 0.718100 0.620900 +vt 0.944500 0.620900 +vt 0.718100 0.394400 +vt 0.944500 0.394400 +vn 0.0000 -1.0000 -0.0000 +vn 0.0000 1.0000 0.0000 +vn 1.0000 0.0000 0.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn 0.0000 0.0000 -1.0000 +vn -0.7071 0.0000 0.7071 +vn 0.7071 0.0000 0.7071 +vn -0.7071 0.0000 -0.7071 +vn 0.7071 0.0000 -0.7071 +vn 0.7071 -0.7071 0.0000 +vn -0.7071 -0.7071 0.0000 +vn 0.7071 0.7071 0.0000 +vn -0.7071 0.7071 0.0000 +vn 0.0000 -0.7071 0.7071 +vn 0.0000 0.7071 0.7071 +vn 0.0000 -0.7071 -0.7071 +vn 0.0000 0.7071 -0.7071 +usemtl Cube.001 +s 1 +f 1/1/1 2/2/1 3/3/1 4/4/1 +f 5/5/2 6/6/2 7/7/2 8/8/2 +f 9/9/3 10/10/3 11/11/3 12/12/3 +f 13/13/1 14/14/1 15/15/1 16/16/1 +f 17/17/1 18/18/1 19/19/1 20/20/1 +f 21/21/2 22/22/2 23/23/2 24/24/2 +f 25/25/2 26/26/2 27/27/2 28/28/2 +f 29/29/3 30/30/3 31/31/3 32/32/3 +f 33/33/3 34/34/3 35/35/3 36/36/3 +f 37/37/4 38/38/4 39/39/4 40/40/4 +f 41/41/4 42/42/4 43/43/4 44/44/4 +f 45/45/5 28/28/5 27/27/5 46/46/5 +f 47/47/5 20/48/5 19/49/5 48/50/5 +f 49/51/3 50/52/3 34/53/3 29/54/3 +f 30/55/3 33/56/3 51/57/3 52/58/3 +f 53/59/6 54/60/6 24/24/6 23/23/6 +f 55/61/6 56/62/6 16/63/6 15/64/6 +f 57/65/4 42/66/4 37/67/4 58/68/4 +f 59/69/4 38/70/4 41/71/4 60/72/4 +f 29/54/3 32/73/3 61/74/3 49/51/3 +f 31/75/3 30/55/3 52/58/3 62/76/3 +f 33/56/3 36/77/3 63/78/3 51/57/3 +f 35/79/3 34/53/3 50/52/3 64/80/3 +f 37/67/4 40/81/4 65/82/4 58/68/4 +f 39/83/4 38/70/4 59/69/4 66/84/4 +f 41/71/4 44/85/4 67/86/4 60/72/4 +f 43/87/4 42/66/4 57/65/4 68/88/4 +f 51/89/1 18/90/1 13/91/1 52/92/1 +f 59/93/1 60/94/1 14/95/1 17/96/1 +f 57/65/2 58/68/2 26/97/2 21/98/2 +f 50/52/2 49/51/2 22/99/2 25/100/2 +f 40/101/5 39/102/5 47/103/5 46/104/5 +f 35/105/5 45/106/5 48/107/5 36/108/5 +f 32/109/6 31/110/6 56/111/6 53/112/6 +f 44/113/6 43/114/6 54/115/6 55/116/6 +f 16/16/1 62/117/1 52/118/1 13/13/1 +f 67/119/1 15/15/1 14/14/1 60/120/1 +f 59/121/1 17/17/1 20/20/1 66/122/1 +f 18/18/1 51/123/1 63/124/1 19/19/1 +f 57/125/2 21/21/2 24/24/2 68/126/2 +f 22/22/2 49/127/2 61/128/2 23/23/2 +f 28/28/2 64/129/2 50/130/2 25/25/2 +f 65/131/2 27/27/2 26/26/2 58/132/2 +f 65/131/5 40/133/5 46/46/5 27/27/5 +f 45/45/5 35/134/5 64/129/5 28/28/5 +f 19/49/5 63/135/5 36/136/5 48/50/5 +f 39/137/5 66/138/5 20/48/5 47/47/5 +f 53/59/6 23/23/6 61/128/6 32/139/6 +f 43/140/6 68/126/6 24/24/6 54/60/6 +f 67/141/6 44/142/6 55/61/6 15/64/6 +f 16/63/6 56/62/6 31/143/6 62/144/6 +f 13/13/7 1/1/7 4/4/8 14/14/8 +f 18/90/9 2/2/9 1/1/7 13/91/7 +f 17/17/10 3/3/10 2/2/9 18/18/9 +f 14/95/8 4/4/8 3/3/10 17/96/10 +f 21/21/8 8/8/8 7/7/7 22/22/7 +f 26/97/10 5/5/10 8/8/8 21/98/8 +f 25/25/9 6/6/9 5/5/10 26/26/10 +f 22/99/7 7/7/7 6/6/9 25/100/9 +f 46/46/11 69/145/11 70/146/12 45/45/12 +f 47/103/13 71/147/13 69/145/11 46/104/11 +f 48/50/14 72/148/14 71/147/13 47/47/13 +f 45/106/12 70/146/12 72/148/14 48/107/14 +f 29/29/15 9/9/15 12/12/16 30/30/16 +f 34/53/17 10/10/17 9/9/15 29/54/15 +f 33/33/18 11/11/18 10/10/17 34/34/17 +f 30/55/16 12/12/16 11/11/18 33/56/18 +f 53/59/12 73/149/12 74/150/11 54/60/11 +f 56/111/14 75/151/14 73/149/12 53/112/12 +f 55/61/13 76/152/13 75/151/14 56/62/14 +f 54/115/11 74/150/11 76/152/13 55/116/13 +f 37/37/17 77/153/17 78/154/18 38/38/18 +f 42/66/15 79/155/15 77/153/17 37/67/17 +f 41/41/16 80/156/16 79/155/15 42/42/15 +f 38/70/18 78/154/18 80/156/16 41/71/16 +f 76/152/6 74/150/6 73/149/6 75/151/6 +f 78/154/4 77/153/4 79/155/4 80/156/4 +f 72/148/5 70/146/5 69/145/5 71/147/5 diff --git a/assets/wall/breakable_wall.png b/assets/wall/breakable_wall.png new file mode 100644 index 00000000..bdbc5fda Binary files /dev/null and b/assets/wall/breakable_wall.png differ diff --git a/assets/wall/unbreakable_wall.mtl b/assets/wall/unbreakable_wall.mtl new file mode 100644 index 00000000..678256c4 --- /dev/null +++ b/assets/wall/unbreakable_wall.mtl @@ -0,0 +1,12 @@ +# Blender MTL File: 'None' +# Material Count: 1 + +newmtl cube +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 diff --git a/assets/wall/unbreakable_wall.obj b/assets/wall/unbreakable_wall.obj new file mode 100644 index 00000000..5152d0f2 --- /dev/null +++ b/assets/wall/unbreakable_wall.obj @@ -0,0 +1,54 @@ +# Blender v2.92.0 OBJ File: '' +# www.blender.org +mtllib unbreakable_wall.mtl +o cube +v -0.500000 -0.500000 0.500000 +v 0.500000 -0.500000 0.500000 +v -0.500000 0.500000 0.500000 +v 0.500000 0.500000 0.500000 +v -0.500000 0.500000 -0.500000 +v 0.500000 0.500000 -0.500000 +v -0.500000 -0.500000 -0.500000 +v 0.500000 -0.500000 -0.500000 +vt 0.000000 0.000000 +vt 0.333333 0.000000 +vt 0.000000 0.500000 +vt 0.333333 0.500000 +vt 0.666666 1.000000 +vt 1.000000 1.000000 +vt 0.666666 0.500000 +vt 1.000000 0.500000 +vt 0.000000 1.000000 +vt 0.333333 1.000000 +vt 0.000000 0.500000 +vt 0.333333 0.500000 +vt 0.666666 0.000000 +vt 1.000000 0.000000 +vt 0.666666 0.500000 +vt 1.000000 0.500000 +vt 0.666666 0.500000 +vt 0.666666 1.000000 +vt 0.333333 0.000000 +vt 0.666666 0.000000 +vt 0.333333 0.500000 +vt 0.666666 0.500000 +vn 0.0000 -0.0000 1.0000 +vn 0.0000 1.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 -1.0000 -0.0000 +vn 1.0000 0.0000 0.0000 +vn -1.0000 0.0000 0.0000 +usemtl cube +s 1 +f 1/1/1 2/2/1 3/3/1 +f 3/3/1 2/2/1 4/4/1 +f 3/5/2 4/6/2 5/7/2 +f 5/7/2 4/6/2 6/8/2 +f 5/9/3 6/10/3 7/11/3 +f 7/11/3 6/10/3 8/12/3 +f 7/13/4 8/14/4 1/15/4 +f 1/15/4 8/14/4 2/16/4 +f 2/17/5 8/12/5 4/18/5 +f 4/18/5 8/12/5 6/10/5 +f 7/19/6 1/20/6 5/21/6 +f 5/21/6 1/20/6 3/22/6 diff --git a/assets/wall/unbreakable_wall.png b/assets/wall/unbreakable_wall.png new file mode 100644 index 00000000..4a03f3fa Binary files /dev/null and b/assets/wall/unbreakable_wall.png differ diff --git a/eCPPLINT.cfg b/eCPPLINT.cfg new file mode 100644 index 00000000..bfbf40cd --- /dev/null +++ b/eCPPLINT.cfg @@ -0,0 +1,24 @@ + +# Don't search for additional CPPLINT.cfg in parent directories. +set noparent +# Use 'ART_' as the cpp header guard prefix (e.g. #ifndef ART_PATH_TO_FILE_H_). +root=. +# Limit line length. +linelength=120 +# Ignore the following categories of errors, as specified by the filter: +# (the filter settings are concatenated together) +filter=-build/c++11 +filter=-whitespace/tab +filter=-whitespace/braces +filter=-legal/copyright +filter=-runtime/indentation_namespace +filter=-whitespace/ending_newline +filter=-build/header_guard +filter=-readability/todo +filter=-whitespace/comments +filter=-whitespace/indent # due to public class rule + + +exclude_files=cmake-build-debug/* +exclude_files=build/* +exclude_files=tests/* \ No newline at end of file diff --git a/lib/Ray/CMakeLists.txt b/lib/Ray/CMakeLists.txt index 48984f64..17d97db0 100644 --- a/lib/Ray/CMakeLists.txt +++ b/lib/Ray/CMakeLists.txt @@ -12,12 +12,11 @@ if (CMAKE_COMPILER_IS_GNUCXX) endif () set(HEADERS - sources/Canvas.hpp sources/Color.hpp sources/Font.hpp - sources/IRessource.hpp sources/Matrix.hpp sources/Mesh.hpp + sources/TraceLog.hpp sources/Window.hpp sources/Audio/IAudio.hpp sources/Audio/Music.hpp @@ -62,6 +61,7 @@ set(HEADERS set(SRC sources/Color.cpp sources/Font.cpp + sources/TraceLog.cpp sources/Window.cpp sources/Audio/Music.cpp sources/Audio/Sound.cpp diff --git a/lib/Ray/sources/Audio/IAudio.hpp b/lib/Ray/sources/Audio/IAudio.hpp index 65753870..a6120f5e 100644 --- a/lib/Ray/sources/Audio/IAudio.hpp +++ b/lib/Ray/sources/Audio/IAudio.hpp @@ -7,23 +7,15 @@ #ifndef AUDIO_HPP_ #define AUDIO_HPP_ - -#include "IRessource.hpp" #include namespace RAY::Audio { //! @brief Interface for Audio ressources - class IAudio: public IRessource { + class IAudio { public: virtual ~IAudio() = default; - //! @brief Load Audio stream from file - virtual bool load(const std::string &path) = 0; - - //! @brief Unload audio stream - virtual bool unload(void) = 0; - //! @brief Check if audio is playing virtual bool isPlaying(void) = 0; diff --git a/lib/Ray/sources/Audio/Music.cpp b/lib/Ray/sources/Audio/Music.cpp index 09e7b540..b397c04e 100644 --- a/lib/Ray/sources/Audio/Music.cpp +++ b/lib/Ray/sources/Audio/Music.cpp @@ -18,20 +18,8 @@ RAY::Audio::Music::Music() } RAY::Audio::Music::~Music() -{ - this->unload(); -} - -bool RAY::Audio::Music::load(const std::string &path) -{ - _music = LoadMusicStream(path.c_str()); - return true; -} - -bool RAY::Audio::Music::unload(void) { UnloadMusicStream(_music); - return true; } bool RAY::Audio::Music::isPlaying(void) diff --git a/lib/Ray/sources/Audio/Music.hpp b/lib/Ray/sources/Audio/Music.hpp index 46942597..85f31c52 100644 --- a/lib/Ray/sources/Audio/Music.hpp +++ b/lib/Ray/sources/Audio/Music.hpp @@ -34,12 +34,6 @@ namespace RAY::Audio //! @brief A Music is assignable Music &operator=(const Music &Music) = default; - //! @brief Load Music stream from file - bool load(const std::string &path) override; - - //! @brief Unload Music stream - bool unload(void) override; - //! @brief Check if Music is playing bool isPlaying(void) override; diff --git a/lib/Ray/sources/Audio/Sound.cpp b/lib/Ray/sources/Audio/Sound.cpp index f647672f..4bfcb95a 100644 --- a/lib/Ray/sources/Audio/Sound.cpp +++ b/lib/Ray/sources/Audio/Sound.cpp @@ -18,20 +18,8 @@ RAY::Audio::Sound::Sound() } RAY::Audio::Sound::~Sound() -{ - this->unload(); -} - -bool RAY::Audio::Sound::load(const std::string &path) -{ - _sound = LoadSound(path.c_str()); - return true; -} - -bool RAY::Audio::Sound::unload(void) { UnloadSound(_sound); - return true; } bool RAY::Audio::Sound::isPlaying(void) diff --git a/lib/Ray/sources/Audio/Sound.hpp b/lib/Ray/sources/Audio/Sound.hpp index 4ceb29d0..32dd8cb0 100644 --- a/lib/Ray/sources/Audio/Sound.hpp +++ b/lib/Ray/sources/Audio/Sound.hpp @@ -34,12 +34,6 @@ namespace RAY::Audio //! @brief A Sound is assignable Sound &operator=(const Sound &sound) = default; - //! @brief Load Sound stream from file - bool load(const std::string &path) override; - - //! @brief Unload Sound stream - bool unload(void) override; - //! @brief Check if Sound is playing bool isPlaying(void) override; diff --git a/lib/Ray/sources/Camera/Camera2D.hpp b/lib/Ray/sources/Camera/Camera2D.hpp index 6248ecae..aa4a20de 100644 --- a/lib/Ray/sources/Camera/Camera2D.hpp +++ b/lib/Ray/sources/Camera/Camera2D.hpp @@ -19,7 +19,7 @@ namespace RAY::Camera { public: //! @brief 2D Camera constructor //! @param offset Camera offset (displacement from target) - //! @param target Camera target (rotation and zoom origin + //! @param target Camera target (rotation and zoom origin) //! @param rotation Camera rotation in degrees //! @param zoom Camera zoom (scaling), should be 1.0f by default Camera2D(const Vector2 &offset, const Vector2 &target, float rotation, float zoom = 1); diff --git a/lib/Ray/sources/Camera/Camera3D.cpp b/lib/Ray/sources/Camera/Camera3D.cpp index 2482df6e..aa2b2a9b 100644 --- a/lib/Ray/sources/Camera/Camera3D.cpp +++ b/lib/Ray/sources/Camera/Camera3D.cpp @@ -80,4 +80,4 @@ void RAY::Camera::Camera3D::update(void) RAY::Camera::Camera3D::operator ::Camera3D() const { return this->_camera; -} +} \ No newline at end of file diff --git a/lib/Ray/sources/Canvas.hpp b/lib/Ray/sources/Canvas.hpp deleted file mode 100644 index 549a5707..00000000 --- a/lib/Ray/sources/Canvas.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/* -** EPITECH PROJECT, 2021 -** Bomberman -** File description: -** Canvas -*/ - -#ifndef CANVAS_HPP_ -#define CANVAS_HPP_ - -namespace RAY { - namespace Drawables { - class IDrawable; - } - //! @brief Interface for any drawable surface - class Canvas { - public: - //! @brief A default destructor - virtual ~Canvas() = default; - - //! @brief draw drawable - virtual void draw(Drawables::IDrawable &) = 0; - - protected: - private: - }; -} - -#endif /* !Canvas_HPP_ */ diff --git a/lib/Ray/sources/Drawables/2D/Circle.cpp b/lib/Ray/sources/Drawables/2D/Circle.cpp index 9ce10ad1..c1b5b3cc 100644 --- a/lib/Ray/sources/Drawables/2D/Circle.cpp +++ b/lib/Ray/sources/Drawables/2D/Circle.cpp @@ -7,35 +7,36 @@ #include "Drawables/2D/Circle.hpp" -RAY::Drawables::Drawables2D::Circle::Circle(const Vector2 ¢erPos, int radius, const Color &color): - ADrawable2D(centerPos, color), _radius(radius) +namespace RAY::Drawables::Drawables2D { + Circle::Circle(const Vector2 ¢erPos, int radius, const Color &color) : + ADrawable2D(centerPos, color), _radius(radius) + { + } -} + Circle::Circle(int centerPosX, int centerPosY, int radius, const Color &color) : + ADrawable2D(centerPosX, centerPosY, color), _radius(radius) + { + } -RAY::Drawables::Drawables2D::Circle::Circle(int centerPosX, int centerPosY, int radius, const Color &color): - ADrawable2D(centerPosX, centerPosY, color), _radius(radius) -{ + int Circle::getRadius(void) const + { + return this->_radius; + } -} + Circle &Circle::setRadius(int radius) + { + this->_radius = radius; + return *this; + } -int RAY::Drawables::Drawables2D::Circle::getRadius(void) const -{ - return this->_radius; -} + void Circle::drawOn(RAY::Window &) + { + DrawCircleV(this->_position, this->_radius, this->_color); + } -RAY::Drawables::Drawables2D::Circle &RAY::Drawables::Drawables2D::Circle::setRadius(int radius) -{ - this->_radius = radius; - return *this; -} - -void RAY::Drawables::Drawables2D::Circle::drawOn(RAY::Window &) -{ - DrawCircleV(this->_position, this->_radius, this->_color); -} - -void RAY::Drawables::Drawables2D::Circle::drawOn(RAY::Image &image) -{ - ImageDrawCircleV(image, this->_position, this->_radius, this->_color); + void Circle::drawOn(RAY::Image &image) + { + ImageDrawCircleV(image, this->_position, this->_radius, this->_color); + } } \ No newline at end of file diff --git a/lib/Ray/sources/Drawables/2D/Circle.hpp b/lib/Ray/sources/Drawables/2D/Circle.hpp index 80824f7e..7d98a2cd 100644 --- a/lib/Ray/sources/Drawables/2D/Circle.hpp +++ b/lib/Ray/sources/Drawables/2D/Circle.hpp @@ -36,7 +36,7 @@ namespace RAY::Drawables::Drawables2D { Circle &operator=(const Circle &) = default; //! @brief A default destructor - ~Circle() = default; + ~Circle() override = default; //! @return the radius of the circle int getRadius(void) const; diff --git a/lib/Ray/sources/Drawables/2D/Line.cpp b/lib/Ray/sources/Drawables/2D/Line.cpp index 3580aba0..2425ac47 100644 --- a/lib/Ray/sources/Drawables/2D/Line.cpp +++ b/lib/Ray/sources/Drawables/2D/Line.cpp @@ -8,36 +8,36 @@ #include "Drawables/2D/Line.hpp" #include - -RAY::Drawables::Drawables2D::Line::Line(const Vector2 &startPosition, const Vector2 &endPosition, const Color &color): - ADrawable2D(startPosition, color), _end(endPosition) +namespace RAY::Drawables::Drawables2D { + Line::Line(const Vector2 &startPosition, const Vector2 &endPosition, const Color &color) : + ADrawable2D(startPosition, color), _end(endPosition) + { + } -} + Line::Line(int xStart, int yStart, int xEnd, int yEnd, const Color &color) : + ADrawable2D(xStart, yStart, color), _end(xEnd, yEnd) + { + } -RAY::Drawables::Drawables2D::Line::Line(int xStart, int yStart, int xEnd, int yEnd, const Color &color): - ADrawable2D(xStart, yStart, color), _end(xEnd, yEnd) -{ + const RAY::Vector2 &Line::getEndPosition(void) const + { + return this->_end; + } -} + Line &Line::setEndPosition(const Vector2 &end) + { + this->_end = end; + return *this; + } -const RAY::Vector2 &RAY::Drawables::Drawables2D::Line::getEndPosition(void) const -{ - return this->_end; -} + void Line::drawOn(RAY::Window &) + { + DrawLineV(this->_position, this->_end, this->_color); + } -RAY::Drawables::Drawables2D::Line &RAY::Drawables::Drawables2D::Line::setEndPosition(const Vector2 &end) -{ - this->_end = end; - return *this; -} - -void RAY::Drawables::Drawables2D::Line::drawOn(RAY::Window &) -{ - DrawLineV(this->_position, this->_end, this->_color); -} - -void RAY::Drawables::Drawables2D::Line::drawOn(RAY::Image &image) -{ - ImageDrawLineV(image, this->_position, this->_end, this->_color); -} + void Line::drawOn(RAY::Image &image) + { + ImageDrawLineV(image, this->_position, this->_end, this->_color); + } +} \ No newline at end of file diff --git a/lib/Ray/sources/Drawables/2D/Line.hpp b/lib/Ray/sources/Drawables/2D/Line.hpp index 31afbc53..1aee4de8 100644 --- a/lib/Ray/sources/Drawables/2D/Line.hpp +++ b/lib/Ray/sources/Drawables/2D/Line.hpp @@ -39,7 +39,7 @@ namespace RAY::Drawables::Drawables2D { Line &operator=(const Line &) = default; //! @brief A default destructor - ~Line() = default; + ~Line() override = default; //! @return the end position of the line const Vector2 &getEndPosition(void) const; diff --git a/lib/Ray/sources/Drawables/2D/Point.cpp b/lib/Ray/sources/Drawables/2D/Point.cpp index be937c78..34f9f5f7 100644 --- a/lib/Ray/sources/Drawables/2D/Point.cpp +++ b/lib/Ray/sources/Drawables/2D/Point.cpp @@ -7,25 +7,26 @@ #include "Drawables/2D/Point.hpp" -RAY::Drawables::Drawables2D::Point::Point(const Vector2 &position, const Color &color): - ADrawable2D(position, color) +namespace RAY::Drawables::Drawables2D { + Point::Point(const Vector2 &position, const Color &color) : + ADrawable2D(position, color) + { + } + + Point::Point(int x, int y, const Color &color) : + ADrawable2D(x, y, color) + { + } + + void Point::drawOn(RAY::Window &) + { + DrawPixel(this->_position.x, this->_position.y, this->_color); + } + + void Point::drawOn(RAY::Image &image) + { + ImageDrawPixel(image, this->_position.x, this->_position.y, this->_color); + } } - -RAY::Drawables::Drawables2D::Point::Point(int x, int y, const Color &color): - ADrawable2D(x, y, color) -{ - -} - -void RAY::Drawables::Drawables2D::Point::drawOn(RAY::Window &) -{ - DrawPixel(this->_position.x, this->_position.y, this->_color); -} - -void RAY::Drawables::Drawables2D::Point::drawOn(RAY::Image &image) -{ - ImageDrawPixel(image, this->_position.x, this->_position.y, this->_color); -} - diff --git a/lib/Ray/sources/Drawables/2D/Point.hpp b/lib/Ray/sources/Drawables/2D/Point.hpp index 641aa9d3..e21e01c4 100644 --- a/lib/Ray/sources/Drawables/2D/Point.hpp +++ b/lib/Ray/sources/Drawables/2D/Point.hpp @@ -34,7 +34,7 @@ namespace RAY::Drawables::Drawables2D { Point &operator=(const Point &) = default; //! @brief A default destructor - ~Point() = default; + ~Point() override = default; //! @brief Draw point on window void drawOn(RAY::Window &) override; diff --git a/lib/Ray/sources/Drawables/2D/Rectangle.cpp b/lib/Ray/sources/Drawables/2D/Rectangle.cpp index 4a5bd23e..86a1242d 100644 --- a/lib/Ray/sources/Drawables/2D/Rectangle.cpp +++ b/lib/Ray/sources/Drawables/2D/Rectangle.cpp @@ -8,42 +8,44 @@ #include "Drawables/2D/Rectangle.hpp" #include -RAY::Drawables::Drawables2D::Rectangle::Rectangle(const Vector2 &position, const Vector2 &dimensions, const Color &color): - ADrawable2D(position, color), _dimensions(dimensions) +namespace RAY::Drawables::Drawables2D { -} + Rectangle::Rectangle(const Vector2 &position, const Vector2 &dimensions, const Color &color) : + ADrawable2D(position, color), _dimensions(dimensions) + { + } -RAY::Drawables::Drawables2D::Rectangle::Rectangle(int x, int y, int width, int height, const Color &color): - ADrawable2D(x, y, color), _dimensions(width, height) -{ + Rectangle::Rectangle(int x, int y, int width, int height, const Color &color) : + ADrawable2D(x, y, color), _dimensions(width, height) + { + } -} + const RAY::Vector2 &Rectangle::getDimensions(void) + { + return this->_dimensions; + } -const RAY::Vector2 &RAY::Drawables::Drawables2D::Rectangle::getDimensions(void) -{ - return this->_dimensions; -} + Rectangle &Rectangle::setDimensions(const Vector2 &dimensions) + { + this->_dimensions = dimensions; + return *this; + } -RAY::Drawables::Drawables2D::Rectangle &RAY::Drawables::Drawables2D::Rectangle::setDimensions(const Vector2 &dimensions) -{ - this->_dimensions = dimensions; - return *this; -} + Rectangle &Rectangle::setDimensions(int x, int y) + { + this->_dimensions.x = x; + this->_dimensions.y = y; + return *this; + } -RAY::Drawables::Drawables2D::Rectangle &RAY::Drawables::Drawables2D::Rectangle::setDimensions(int x, int y) -{ - this->_dimensions.x = x; - this->_dimensions.y = y; - return *this; -} + void Rectangle::drawOn(RAY::Window &) + { + DrawRectangleV(this->_position, this->_dimensions, this->_color); + } -void RAY::Drawables::Drawables2D::Rectangle::drawOn(RAY::Window &) -{ - DrawRectangleV(this->_position, this->_dimensions, this->_color); -} - -void RAY::Drawables::Drawables2D::Rectangle::drawOn(RAY::Image &image) -{ - ImageDrawRectangleV(image, this->_position, this->_dimensions, this->_color); -} + void Rectangle::drawOn(RAY::Image &image) + { + ImageDrawRectangleV(image, this->_position, this->_dimensions, this->_color); + } +} \ No newline at end of file diff --git a/lib/Ray/sources/Drawables/2D/Rectangle.hpp b/lib/Ray/sources/Drawables/2D/Rectangle.hpp index 79f9dabb..18f25d4f 100644 --- a/lib/Ray/sources/Drawables/2D/Rectangle.hpp +++ b/lib/Ray/sources/Drawables/2D/Rectangle.hpp @@ -12,7 +12,7 @@ #include "Drawables/ADrawable2D.hpp" namespace RAY::Drawables::Drawables2D { - //! @brief Rectangle in a two-dimensionnal space + //! @brief Rectangle in a two-dimensional space class Rectangle: public ADrawable2D { public: @@ -37,7 +37,7 @@ namespace RAY::Drawables::Drawables2D { Rectangle &operator=(const Rectangle &) = default; //! @brief A default destructor - ~Rectangle() = default; + ~Rectangle() override = default; //! @return the dimensions of the rectangle const Vector2 &getDimensions(void); diff --git a/lib/Ray/sources/Drawables/2D/Text.cpp b/lib/Ray/sources/Drawables/2D/Text.cpp index 29da6b8f..9c679034 100644 --- a/lib/Ray/sources/Drawables/2D/Text.cpp +++ b/lib/Ray/sources/Drawables/2D/Text.cpp @@ -7,73 +7,87 @@ #include "Drawables/2D/Text.hpp" -RAY::Drawables::Drawables2D::Text::Text(const std::string &content, int fontSize, const Vector2 &position, const Color &color): - ADrawable2D(position, color), _text(content), _size(fontSize), _spacing(this->DefaultLetterSpacing) -{ - this->_font.recs = nullptr; -} +#include -RAY::Drawables::Drawables2D::Text::Text(const std::string &content, int fontSize, int x, int y, const Color &color): - ADrawable2D(x, y, color), _text(content), _size(fontSize), _spacing(this->DefaultLetterSpacing) +namespace RAY::Drawables::Drawables2D { - this->_font.recs = nullptr; -} -const std::string &RAY::Drawables::Drawables2D::Text::getString(void) -{ - return this->_text; -} + Text::Text(std::string content, int fontSize, const Vector2 &position, const Color &color) : + ADrawable2D(position, color), + _text(std::move(content)), + _font({}), + _size(fontSize), + _spacing(Text::DefaultLetterSpacing) + { + this->_font.recs = nullptr; + } -int RAY::Drawables::Drawables2D::Text::getFontSize(void) -{ - return this->_size; -} + Text::Text(std::string content, int fontSize, int x, int y, const Color &color) : + ADrawable2D(x, y, color), + _text(std::move(content)), + _font({}), + _size(fontSize), + _spacing(Text::DefaultLetterSpacing) + { + this->_font.recs = nullptr; + } -RAY::Drawables::Drawables2D::Text &RAY::Drawables::Drawables2D::Text::setFont(const Font &font) -{ - this->_font = font; - return *this; -} + const std::string &Text::getString(void) + { + return this->_text; + } -RAY::Drawables::Drawables2D::Text &RAY::Drawables::Drawables2D::Text::setText(const std::string &text) -{ - this->_text = text; - return *this; -} + int Text::getFontSize(void) const + { + return this->_size; + } -RAY::Drawables::Drawables2D::Text &RAY::Drawables::Drawables2D::Text::setFontSize(int size) -{ - this->_size = size; - return *this; -} + Text &Text::setFont(const Font &font) + { + this->_font = font; + return *this; + } -int RAY::Drawables::Drawables2D::Text::getLetterSpacing(void) -{ - return this->_spacing; -} + Text &Text::setText(const std::string &text) + { + this->_text = text; + return *this; + } -RAY::Drawables::Drawables2D::Text &RAY::Drawables::Drawables2D::Text::setLetterSpacing(int spacing) -{ - this->_spacing = spacing; - return *this; -} + Text &Text::setFontSize(int size) + { + this->_size = size; + return *this; + } -void RAY::Drawables::Drawables2D::Text::drawOn(RAY::Window &) -{ - if (!this->_font.recs) - DrawText(this->_text.c_str(), this->_position.x, this->_position.y, - this->_size, this->_color); - else - DrawTextEx(this->_font, this->_text.c_str(), this->_position, - this->_size, this->_spacing, this->_color); -} + int Text::getLetterSpacing(void) const + { + return this->_spacing; + } -void RAY::Drawables::Drawables2D::Text::drawOn(RAY::Image &image) -{ - if (!this->_font.recs) - ImageDrawText(image, this->_text.c_str(), this->_position.x, this->_position.y, - this->_size, this->_color); - else - ImageDrawTextEx(image, this->_font, this->_text.c_str(), this->_position, - this->_size, this->_spacing, this->_color); -} + Text &Text::setLetterSpacing(int spacing) + { + this->_spacing = spacing; + return *this; + } + + void Text::drawOn(RAY::Window &) + { + if (!this->_font.recs) + DrawText(this->_text.c_str(), this->_position.x, this->_position.y, + this->_size, this->_color); + else + DrawTextEx(this->_font, this->_text.c_str(), this->_position, + this->_size, this->_spacing, this->_color); + } + + void Text::drawOn(RAY::Image &image) + { + if (!this->_font.recs) + ImageDrawText(image, this->_text.c_str(), this->_position.x, this->_position.y, + this->_size, this->_color); + else + ImageDrawTextEx(image, this->_font, this->_text.c_str(), this->_position, + this->_size, this->_spacing, this->_color); + } +} \ No newline at end of file diff --git a/lib/Ray/sources/Drawables/2D/Text.hpp b/lib/Ray/sources/Drawables/2D/Text.hpp index 46e0bd37..452c1d03 100644 --- a/lib/Ray/sources/Drawables/2D/Text.hpp +++ b/lib/Ray/sources/Drawables/2D/Text.hpp @@ -16,13 +16,14 @@ namespace RAY::Drawables::Drawables2D { class Text: public ADrawable2D { public: + //! @brief The Letter spacing used when creating a Text instance static constexpr int DefaultLetterSpacing = 1; //! @brief Text constructor //! @param content text //! @param fontSize size of the text //! @param position position of top-left point //! @param Color Color of the text - Text(const std::string &content, int fontSize, const Vector2 &position, const Color &color); + Text(std::string content, int fontSize, const Vector2 &position, const Color &color); //! @brief Text constructor //! @param content text @@ -30,7 +31,7 @@ namespace RAY::Drawables::Drawables2D { //! @param x x-position of top-left point //! @param y y-position of top-left point //! @param Color Color of the text - Text(const std::string &content, int fontSize, int x, int y, const Color &color); + Text(std::string content, int fontSize, int x, int y, const Color &color); //! @brief A default copy constructor Text(const Text &) = default; @@ -39,16 +40,16 @@ namespace RAY::Drawables::Drawables2D { Text &operator=(const Text &) = default; //! @brief A default destructor - ~Text() = default; + ~Text() override = default; //! @return the text's content const std::string &getString(void); //! @return the font size - int getFontSize(void); + int getFontSize(void) const; //! @return the letter spacing - int getLetterSpacing(void); + int getLetterSpacing(void) const; //! @return set font Text &setFont(const Font &font); @@ -79,9 +80,7 @@ namespace RAY::Drawables::Drawables2D { //! @brief spacing of chars int _spacing; - }; }; - #endif /* !TEXT_HPP_ */ diff --git a/lib/Ray/sources/Drawables/2D/Triangle.cpp b/lib/Ray/sources/Drawables/2D/Triangle.cpp index 1857ec4e..4e90d58c 100644 --- a/lib/Ray/sources/Drawables/2D/Triangle.cpp +++ b/lib/Ray/sources/Drawables/2D/Triangle.cpp @@ -8,52 +8,54 @@ #include "Drawables/2D/Triangle.hpp" #include "Exceptions/RayError.hpp" -RAY::Drawables::Drawables2D::Triangle::Triangle(const Vector2 &positionA, const Vector2 &positionB, const Vector2 &positionC, const Color &color): - ADrawable2D(positionA, color), _posB(positionB), _posC(positionC) +namespace RAY::Drawables::Drawables2D { -} + Triangle::Triangle(const Vector2 &positionA, const Vector2 &positionB, const Vector2 &positionC, const Color &color) : + ADrawable2D(positionA, color), _posB(positionB), _posC(positionC) + { + } -const RAY::Vector2 &RAY::Drawables::Drawables2D::Triangle::getPositionA(void) const -{ - return this->getPosition(); -} + const RAY::Vector2 &Triangle::getPositionA(void) const + { + return this->getPosition(); + } -const RAY::Vector2 &RAY::Drawables::Drawables2D::Triangle::getPositionB(void) const -{ - return this->_posB; -} + const RAY::Vector2 &Triangle::getPositionB(void) const + { + return this->_posB; + } -const RAY::Vector2 &RAY::Drawables::Drawables2D::Triangle::getPositionC(void) const -{ - return this->_posC; -} + const RAY::Vector2 &Triangle::getPositionC(void) const + { + return this->_posC; + } -RAY::Drawables::Drawables2D::Triangle &RAY::Drawables::Drawables2D::Triangle::setPositionA(const RAY::Vector2 &position) -{ - this->_position = position; - return *this; -} + Triangle &Triangle::setPositionA(const RAY::Vector2 &position) + { + this->_position = position; + return *this; + } -RAY::Drawables::Drawables2D::Triangle &RAY::Drawables::Drawables2D::Triangle::setPositionB(const RAY::Vector2 &position) -{ - this->_posB = position; - return *this; -} + Triangle &Triangle::setPositionB(const RAY::Vector2 &position) + { + this->_posB = position; + return *this; + } -RAY::Drawables::Drawables2D::Triangle &RAY::Drawables::Drawables2D::Triangle::setPositionC(const Vector2 &position) -{ - this->_posC = position; - return *this; -} + Triangle &Triangle::setPositionC(const Vector2 &position) + { + this->_posC = position; + return *this; + } -void RAY::Drawables::Drawables2D::Triangle::drawOn(RAY::Window &) -{ - DrawTriangle(this->_position, this->_posB, this->_posC, this->_color); -} - -void RAY::Drawables::Drawables2D::Triangle::drawOn(RAY::Image &) -{ - throw RAY::Exception::NotSupportedError("An triangle cannot be drawn on an image"); -} + void Triangle::drawOn(RAY::Window &) + { + DrawTriangle(this->_position, this->_posB, this->_posC, this->_color); + } + void Triangle::drawOn(RAY::Image &) + { + throw RAY::Exception::NotSupportedError("An triangle cannot be drawn on an image"); + } +} \ No newline at end of file diff --git a/lib/Ray/sources/Drawables/2D/Triangle.hpp b/lib/Ray/sources/Drawables/2D/Triangle.hpp index 0fd97d71..947bef1f 100644 --- a/lib/Ray/sources/Drawables/2D/Triangle.hpp +++ b/lib/Ray/sources/Drawables/2D/Triangle.hpp @@ -32,7 +32,7 @@ namespace RAY::Drawables::Drawables2D { Triangle &operator=(const Triangle &) = default; //! @brief A default destructor - ~Triangle() = default; + ~Triangle() override = default; //! @return the position of A of the Triangle const Vector2 &getPositionA(void) const; @@ -58,6 +58,7 @@ namespace RAY::Drawables::Drawables2D { void drawOn(RAY::Image &image) override; private: + //! @note Position of A is given by the Drawable2D position //! @brief Position of B Vector2 _posB; //! @brief Position of C diff --git a/lib/Ray/sources/Drawables/3D/Circle.cpp b/lib/Ray/sources/Drawables/3D/Circle.cpp index c174a30e..5842a710 100644 --- a/lib/Ray/sources/Drawables/3D/Circle.cpp +++ b/lib/Ray/sources/Drawables/3D/Circle.cpp @@ -7,31 +7,33 @@ #include "Drawables/3D/Circle.hpp" -RAY::Drawables::Drawables3D::Circle::Circle(const Vector3 ¢erPosition, int radius, const Color &color, const Vector3 &rotationAxis, float rotationAngle): - ADrawable3D(color), _radius(radius), _centerPos(centerPosition), _rotationAxis(rotationAxis), _rotationAngle(rotationAngle) +namespace RAY::Drawables::Drawables3D { -} + Circle::Circle(const Vector3 ¢erPosition, int radius, const Color &color, const Vector3 &rotationAxis, float rotationAngle) : + ADrawable3D(centerPosition, color), _radius(radius), _rotationAxis(rotationAxis), _rotationAngle(rotationAngle) + { + } + int Circle::getRadius(void) const + { + return this->_radius; + } -int RAY::Drawables::Drawables3D::Circle::getRadius(void) const -{ - return this->_radius; -} + Circle &Circle::setRadius(int radius) + { + this->_radius = radius; + return *this; + } -RAY::Drawables::Drawables3D::Circle &RAY::Drawables::Drawables3D::Circle::setRadius(int radius) -{ - this->_radius = radius; - return *this; -} + const RAY::Vector3 &Circle::getCenterPos(void) const + { + return this->_position; + } -const RAY::Vector3 &RAY::Drawables::Drawables3D::Circle::getCenterPos(void) const -{ - return this->_centerPos; -} - -void RAY::Drawables::Drawables3D::Circle::drawOn(RAY::Window &) -{ - DrawCircle3D(this->_centerPos, this->_radius,this->_rotationAxis, - this->_rotationAngle, this->_color); -} + void Circle::drawOn(RAY::Window &) + { + DrawCircle3D(this->_position, this->_radius, this->_rotationAxis, + this->_rotationAngle, this->_color); + } +} \ No newline at end of file diff --git a/lib/Ray/sources/Drawables/3D/Circle.hpp b/lib/Ray/sources/Drawables/3D/Circle.hpp index 6c014e9c..233ed4c2 100644 --- a/lib/Ray/sources/Drawables/3D/Circle.hpp +++ b/lib/Ray/sources/Drawables/3D/Circle.hpp @@ -30,7 +30,7 @@ namespace RAY::Drawables::Drawables3D { Circle &operator=(const Circle &) = default; //! @brief A default destructor - ~Circle() = default; + ~Circle() override = default; //! @return the radius of the circle int getRadius(void) const; @@ -41,9 +41,6 @@ namespace RAY::Drawables::Drawables3D { //! @return the position of the center const Vector3 &getCenterPos(void) const; - //! @brief set pos of center - Circle &setRadius(const Vector3 &pos) const; - //! @brief Draw circle on window void drawOn(RAY::Window &) override; @@ -51,9 +48,6 @@ namespace RAY::Drawables::Drawables3D { //! @brief Radius of the circle int _radius; - //! @brief position of the center - Vector3 _centerPos; - //! @brief rotation axis Vector3 _rotationAxis; diff --git a/lib/Ray/sources/Drawables/3D/Cube.cpp b/lib/Ray/sources/Drawables/3D/Cube.cpp index edbd9474..6f651a15 100644 --- a/lib/Ray/sources/Drawables/3D/Cube.cpp +++ b/lib/Ray/sources/Drawables/3D/Cube.cpp @@ -7,36 +7,27 @@ #include "Drawables/3D/Cube.hpp" - -RAY::Drawables::Drawables3D::Cube::Cube(const RAY::Vector3 &position, const RAY::Vector3 &dimensions, const Color &color): - ADrawable3D(color), _position(position), _dimenstions(dimensions) +namespace RAY::Drawables::Drawables3D { -} + Cube::Cube(const RAY::Vector3 &position, const RAY::Vector3 &dimensions, const Color &color) : + ADrawable3D(position, color), _dimensions(dimensions) + { + } -const RAY::Vector3 &RAY::Drawables::Drawables3D::Cube::getPosition(void) const -{ - return this->_position; -} + const RAY::Vector3 &Cube::getDimensions(void) const + { + return this->_dimensions; + } -const RAY::Vector3 &RAY::Drawables::Drawables3D::Cube::getDimensions(void) const -{ - return this->_dimenstions; -} + Cube &Cube::setDimensions(const RAY::Vector3 &dimensions) + { + this->_dimensions = dimensions; + return *this; + } -RAY::Drawables::Drawables3D::Cube &RAY::Drawables::Drawables3D::Cube::setDimensions(const RAY::Vector3 &dimensions) -{ - this->_dimenstions = dimensions; - return *this; -} - -RAY::Drawables::Drawables3D::Cube &RAY::Drawables::Drawables3D::Cube::setPosition(const RAY::Vector3 &position) -{ - this->_position = position; - return *this; -} - -void RAY::Drawables::Drawables3D::Cube::drawOn(RAY::Window &) -{ - DrawCubeV(this->_position, this->_dimenstions, this->_color); -} + void Cube::drawOn(RAY::Window &) + { + DrawCubeV(this->_position, this->_dimensions, this->_color); + } +} \ No newline at end of file diff --git a/lib/Ray/sources/Drawables/3D/Cube.hpp b/lib/Ray/sources/Drawables/3D/Cube.hpp index c9972f04..d1fff6f9 100644 --- a/lib/Ray/sources/Drawables/3D/Cube.hpp +++ b/lib/Ray/sources/Drawables/3D/Cube.hpp @@ -30,27 +30,20 @@ namespace RAY::Drawables::Drawables3D { Cube &operator=(const Cube &) = default; //! @brief A default destructor - ~Cube() = default; + ~Cube() override = default; - //! @return the position of the cube - const Vector3 &getPosition(void) const; //! @return the dimensions of the cube const Vector3 &getDimensions(void) const; //! @brief set the dimensions of the cube Cube &setDimensions(const Vector3 &dimensions); - - //! @brief set the dimensions of the cube - Cube &setPosition(const Vector3 &position); //! @brief Draw circle on window void drawOn(RAY::Window &) override; private: - //! @brief Positon in space of the cube - Vector3 _position; //! @brief Dimensions of the cube - Vector3 _dimenstions; + Vector3 _dimensions; }; } diff --git a/lib/Ray/sources/Drawables/3D/Cylinder.cpp b/lib/Ray/sources/Drawables/3D/Cylinder.cpp index eab4e1da..64db931d 100644 --- a/lib/Ray/sources/Drawables/3D/Cylinder.cpp +++ b/lib/Ray/sources/Drawables/3D/Cylinder.cpp @@ -7,60 +7,49 @@ #include "Drawables/3D/Cylinder.hpp" - -RAY::Drawables::Drawables3D::Cylinder::Cylinder(const Vector3 &position, float radiusTop, float radiusBottom, float height, const Color &color): - ADrawable3D(color), _topRadius(radiusTop), _bottomRadius(radiusBottom), _height(height), _centerPos(position) - +namespace RAY::Drawables::Drawables3D { -} + Cylinder::Cylinder(const Vector3 &position, float radiusTop, float radiusBottom, float height, const Color &color) : + ADrawable3D(position, color), _topRadius(radiusTop), _bottomRadius(radiusBottom), _height(height) + { + } + int Cylinder::getTopRadius(void) const + { + return this->_topRadius; + } -int RAY::Drawables::Drawables3D::Cylinder::getTopRadius(void) const -{ - return this->_topRadius; -} + Cylinder &Cylinder::setTopRadius(float radius) + { + this->_topRadius = radius; + return *this; + } -RAY::Drawables::Drawables3D::Cylinder &RAY::Drawables::Drawables3D::Cylinder::setTopRadius(float radius) -{ - this->_topRadius = radius; - return *this; -} + int Cylinder::getBottomRadius(void) const + { + return this->_bottomRadius; + } -int RAY::Drawables::Drawables3D::Cylinder::getBottomRadius(void) const -{ - return this->_bottomRadius; -} + Cylinder &Cylinder::setBottomRadius(float radius) + { + this->_bottomRadius = radius; + return *this; + } -RAY::Drawables::Drawables3D::Cylinder &RAY::Drawables::Drawables3D::Cylinder::setBottopRadius(float radius) -{ - this->_bottomRadius = radius; - return *this; -} + float Cylinder::getHeight(void) const + { + return this->_height; + } -const RAY::Vector3 &RAY::Drawables::Drawables3D::Cylinder::getPosition(void) const -{ - return this->_centerPos; -} + Cylinder &Cylinder::setHeight(float height) + { + this->_height = height; + return *this; + } -RAY::Drawables::Drawables3D::Cylinder &RAY::Drawables::Drawables3D::Cylinder::setPosition(const Vector3 &position) -{ - this->_centerPos = position; - return *this; -} - -float RAY::Drawables::Drawables3D::Cylinder::getHeight(void) const -{ - return this->_height; -} - -RAY::Drawables::Drawables3D::Cylinder &RAY::Drawables::Drawables3D::Cylinder::setHeight(float height) -{ - this->_height = height; - return *this; -} - -void RAY::Drawables::Drawables3D::Cylinder::drawOn(RAY::Window &) -{ - DrawCylinder(this->_centerPos, this->_topRadius, this->_bottomRadius, this->_height, 0, this->_color); -} + void Cylinder::drawOn(RAY::Window &) + { + DrawCylinder(this->_position, this->_topRadius, this->_bottomRadius, this->_height, 0, this->_color); + } +} \ No newline at end of file diff --git a/lib/Ray/sources/Drawables/3D/Cylinder.hpp b/lib/Ray/sources/Drawables/3D/Cylinder.hpp index 91ca8ed2..dc09fb5d 100644 --- a/lib/Ray/sources/Drawables/3D/Cylinder.hpp +++ b/lib/Ray/sources/Drawables/3D/Cylinder.hpp @@ -32,7 +32,7 @@ namespace RAY::Drawables::Drawables3D { Cylinder &operator=(const Cylinder &) = default; //! @brief A default destructor - ~Cylinder() = default; + ~Cylinder() override = default; //! @return the radius of the cylinder int getTopRadius(void) const; @@ -44,13 +44,7 @@ namespace RAY::Drawables::Drawables3D { int getBottomRadius(void) const; //! @brief set radius - Cylinder &setBottopRadius(float radius); - - //! @return the position of the center - const Vector3 &getPosition(void) const; - - //! @brief the position of the center - Cylinder &setPosition(const Vector3 &); + Cylinder &setBottomRadius(float radius); //! @return the Height float getHeight(void) const; @@ -71,8 +65,6 @@ namespace RAY::Drawables::Drawables3D { //! @brief height of the cylinder float _height; - //! @brief position of the center - Vector3 _centerPos; }; }; diff --git a/lib/Ray/sources/Drawables/3D/Grid.cpp b/lib/Ray/sources/Drawables/3D/Grid.cpp index b3cd3159..04b03301 100644 --- a/lib/Ray/sources/Drawables/3D/Grid.cpp +++ b/lib/Ray/sources/Drawables/3D/Grid.cpp @@ -6,36 +6,50 @@ */ #include "Drawables/3D/Grid.hpp" +#include "Exceptions/RayError.hpp" -RAY::Drawables::Drawables3D::Grid::Grid(int slices, float spacing): - ADrawable3D(LIGHTGRAY), _slices(slices), _spacing(spacing) +namespace RAY::Drawables::Drawables3D { -} + Grid::Grid(int slices, float spacing, const RAY::Color &color) : + ADrawable3D(RAY::Vector3(0, 0, 0), color), _slices(slices), _spacing(spacing) + { + } -int RAY::Drawables::Drawables3D::Grid::getSlices(void) const -{ - return this->_slices; -} + int Grid::getSlices(void) const + { + return this->_slices; + } -float RAY::Drawables::Drawables3D::Grid::getSpacing(void) const -{ - return this->_spacing; -} + float Grid::getSpacing(void) const + { + return this->_spacing; + } -RAY::Drawables::Drawables3D::Grid &RAY::Drawables::Drawables3D::Grid::setSlices(int slices) -{ - this->_slices = slices; - return *this; -} + const RAY::Vector3 &Grid::getPosition(void) const + { + throw RAY::Exception::NotSupportedError("A Grid does not have a position"); + } -RAY::Drawables::Drawables3D::Grid &RAY::Drawables::Drawables3D::Grid::setSpacing(float spacing) -{ - this->_spacing = spacing; - return *this; -} + Grid &Grid::setPosition(const RAY::Vector3 &) + { + throw RAY::Exception::NotSupportedError("A Grid does not have a position"); + } -void RAY::Drawables::Drawables3D::Grid::drawOn(RAY::Window &) -{ - DrawGrid(this->_slices, this->_spacing); -} + Grid &Grid::setSlices(int slices) + { + this->_slices = slices; + return *this; + } + + Grid &Grid::setSpacing(float spacing) + { + this->_spacing = spacing; + return *this; + } + + void Grid::drawOn(RAY::Window &) + { + DrawGrid(this->_slices, this->_spacing); + } +} \ No newline at end of file diff --git a/lib/Ray/sources/Drawables/3D/Grid.hpp b/lib/Ray/sources/Drawables/3D/Grid.hpp index ecb209cd..0a2166b9 100644 --- a/lib/Ray/sources/Drawables/3D/Grid.hpp +++ b/lib/Ray/sources/Drawables/3D/Grid.hpp @@ -18,7 +18,7 @@ namespace RAY::Drawables::Drawables3D { //! @brief Grid constructor //! @param slices slices of the grid //! @param spacing spacing of slices - Grid(int slices, float spacing); + Grid(int slices, float spacing, const Color &color = LIGHTGRAY); //! @brief A default copy constructor Grid(const Grid &) = default; @@ -27,7 +27,7 @@ namespace RAY::Drawables::Drawables3D { Grid &operator=(const Grid &) = default; //! @brief A default destructor - ~Grid() = default; + ~Grid() override = default; //! @return the slices of the Grid int getSlices(void) const; @@ -41,6 +41,14 @@ namespace RAY::Drawables::Drawables3D { //! @brief Set spacing Grid &setSpacing(float spacing); + //! @throw NotSupportedError + //! @remark The grid does not have a position + const Vector3 &getPosition(void) const override; + + //! @throw NotSupportedError + //! @remark The grid does not have a position + virtual Grid &setPosition(const Vector3 &position) override; + //! @brief Draw point on window void drawOn(RAY::Window &) override; diff --git a/lib/Ray/sources/Drawables/3D/Line.cpp b/lib/Ray/sources/Drawables/3D/Line.cpp index 76022af1..8c5c051b 100644 --- a/lib/Ray/sources/Drawables/3D/Line.cpp +++ b/lib/Ray/sources/Drawables/3D/Line.cpp @@ -7,35 +7,38 @@ #include "Drawables/3D/Line.hpp" -RAY::Drawables::Drawables3D::Line::Line(const Vector3 &startPosition, const Vector3 &endPosition, const Color &color): - ADrawable3D(color), _startPosition(startPosition), _endPosition(endPosition) +namespace RAY::Drawables::Drawables3D { -} + Line::Line(const Vector3 &startPosition, const Vector3 &endPosition, const Color &color) : + ADrawable3D(startPosition, color), _endPosition(endPosition) + { + } -const RAY::Vector3 &RAY::Drawables::Drawables3D::Line::getStartPosition(void) const -{ - return this->_startPosition; -} + const RAY::Vector3 &Line::getStartPosition(void) const + { + return this->_position; + } -const RAY::Vector3 &RAY::Drawables::Drawables3D::Line::getEndPosition(void) const -{ - return this->_endPosition; -} + const RAY::Vector3 &Line::getEndPosition(void) const + { + return this->_endPosition; + } -RAY::Drawables::Drawables3D::Line &RAY::Drawables::Drawables3D::Line::setStartPosition(const Vector3 &startPosition) -{ - this->_startPosition = startPosition; - return *this; -} + Line &Line::setStartPosition(const Vector3 &startPosition) + { + this->_position = startPosition; + return *this; + } -RAY::Drawables::Drawables3D::Line &RAY::Drawables::Drawables3D::Line::setEndPosition(const Vector3 &endPosition) -{ - this->_endPosition = endPosition; - return *this; -} + Line &Line::setEndPosition(const Vector3 &endPosition) + { + this->_endPosition = endPosition; + return *this; + } -void RAY::Drawables::Drawables3D::Line::drawOn(RAY::Window &) -{ - DrawLine3D(this->_startPosition, this->_endPosition, this->_color); -} + void Line::drawOn(RAY::Window &) + { + DrawLine3D(this->_position, this->_endPosition, this->_color); + } +} \ No newline at end of file diff --git a/lib/Ray/sources/Drawables/3D/Line.hpp b/lib/Ray/sources/Drawables/3D/Line.hpp index 03148618..d2c247a1 100644 --- a/lib/Ray/sources/Drawables/3D/Line.hpp +++ b/lib/Ray/sources/Drawables/3D/Line.hpp @@ -29,7 +29,7 @@ namespace RAY::Drawables::Drawables3D { Line &operator=(const Line &) = default; //! @brief A default destructor - ~Line() = default; + ~Line() override = default; //! @return the start position of the line @@ -48,8 +48,6 @@ namespace RAY::Drawables::Drawables3D { void drawOn(RAY::Window &) override; private: - //! @brief start position - Vector3 _startPosition; //! @brief end position Vector3 _endPosition; }; diff --git a/lib/Ray/sources/Drawables/3D/Plane.cpp b/lib/Ray/sources/Drawables/3D/Plane.cpp index 1a874ba2..13cc09bc 100644 --- a/lib/Ray/sources/Drawables/3D/Plane.cpp +++ b/lib/Ray/sources/Drawables/3D/Plane.cpp @@ -7,35 +7,27 @@ #include "Drawables/3D/Plane.hpp" -RAY::Drawables::Drawables3D::Plane::Plane(const Vector3 &position, const Vector2 &dimensions, const Color &color): - ADrawable3D(color), _position(position), _dimensions(dimensions) +namespace RAY::Drawables::Drawables3D { -} + Plane::Plane(const Vector3 &position, const Vector2 &dimensions, const Color &color) : + ADrawable3D(position, color), _dimensions(dimensions) + { + } -const RAY::Vector3 &RAY::Drawables::Drawables3D::Plane::getPosition(void) const -{ - return this->_position; -} + const RAY::Vector2 &Plane::getDimensions(void) const + { + return this->_dimensions; + } -RAY::Drawables::Drawables3D::Plane &RAY::Drawables::Drawables3D::Plane::setPosition(const Vector3 &Position) -{ - this->_position = Position; - return *this; -} + Plane &Plane::setDimensions(const Vector2 &dimensions) + { + this->_dimensions = dimensions; + return *this; + } -const RAY::Vector2 &RAY::Drawables::Drawables3D::Plane::getDimensions(void) const -{ - return this->_dimensions; -} - -RAY::Drawables::Drawables3D::Plane &RAY::Drawables::Drawables3D::Plane::setDimensions(const Vector2 &dimensions) -{ - this->_dimensions = dimensions; - return *this; -} - -void RAY::Drawables::Drawables3D::Plane::drawOn(RAY::Window &) -{ - DrawPlane(this->_position, this->_dimensions, this->_color); -} + void Plane::drawOn(RAY::Window &) + { + DrawPlane(this->_position, this->_dimensions, this->_color); + } +} \ No newline at end of file diff --git a/lib/Ray/sources/Drawables/3D/Plane.hpp b/lib/Ray/sources/Drawables/3D/Plane.hpp index a4f6dc71..6ecefdca 100644 --- a/lib/Ray/sources/Drawables/3D/Plane.hpp +++ b/lib/Ray/sources/Drawables/3D/Plane.hpp @@ -29,13 +29,7 @@ namespace RAY::Drawables::Drawables3D { Plane &operator=(const Plane &) = default; //! @brief A default destructor - ~Plane() = default; - - //! @return the position of the plane - const Vector3 &getPosition(void) const; - - //! @brief Set position - Plane &setPosition(const Vector3 &Position); + ~Plane() override = default; //! @return the dimensions of the plane const Vector2 &getDimensions(void) const; @@ -47,9 +41,6 @@ namespace RAY::Drawables::Drawables3D { void drawOn(RAY::Window &) override; private: - //! @brief plane position - Vector3 _position; - //! @brief plane dimensions Vector2 _dimensions; }; diff --git a/lib/Ray/sources/Drawables/3D/Point.cpp b/lib/Ray/sources/Drawables/3D/Point.cpp index 21a9f933..57c9af83 100644 --- a/lib/Ray/sources/Drawables/3D/Point.cpp +++ b/lib/Ray/sources/Drawables/3D/Point.cpp @@ -8,24 +8,16 @@ #include "Drawables/3D/Point.hpp" -RAY::Drawables::Drawables3D::Point::Point(const Vector3 &position, const Color &color): - ADrawable3D(color), _position(position) +namespace RAY::Drawables::Drawables3D { -} + Point::Point(const Vector3 &position, const Color &color) : + ADrawable3D(position, color) + { + } -const RAY::Vector3 &RAY::Drawables::Drawables3D::Point::getPosition(void) const -{ - return this->_position; -} - -RAY::Drawables::Drawables3D::Point &RAY::Drawables::Drawables3D::Point::setPosition(const Vector3 &Position) -{ - this->_position = Position; - return *this; -} - -void RAY::Drawables::Drawables3D::Point::drawOn(RAY::Window &) -{ - DrawPoint3D(this->_position, this->_color); -} + void Point::drawOn(RAY::Window &) + { + DrawPoint3D(this->_position, this->_color); + } +} \ No newline at end of file diff --git a/lib/Ray/sources/Drawables/3D/Point.hpp b/lib/Ray/sources/Drawables/3D/Point.hpp index 03af0e98..bf50c013 100644 --- a/lib/Ray/sources/Drawables/3D/Point.hpp +++ b/lib/Ray/sources/Drawables/3D/Point.hpp @@ -28,20 +28,10 @@ namespace RAY::Drawables::Drawables3D { Point &operator=(const Point &) = default; //! @brief A default destructor - ~Point() = default; - - //! @return the position of the point - const Vector3 &getPosition(void) const; - - //! @brief Set position - Point &setPosition(const Vector3 &Position); + ~Point() override = default; //! @brief Draw point on window void drawOn(RAY::Window &) override; - - private: - //! @brief point position - Vector3 _position; }; }; diff --git a/lib/Ray/sources/Drawables/3D/Ray.cpp b/lib/Ray/sources/Drawables/3D/Ray.cpp index b6d5bfa2..aec5d33f 100644 --- a/lib/Ray/sources/Drawables/3D/Ray.cpp +++ b/lib/Ray/sources/Drawables/3D/Ray.cpp @@ -7,35 +7,27 @@ #include "Drawables/3D/Ray.hpp" -RAY::Drawables::Drawables3D::Ray::Ray(const Vector3 &startPosition, const Vector3 &direction, const Color &color): - ADrawable3D(color), _ray({startPosition, direction}) +namespace RAY::Drawables::Drawables3D { -} + Ray::Ray(const Vector3 &startPosition, const Vector3 &direction, const Color &color) : + ADrawable3D(startPosition, color), _direction(direction) + { + } -const RAY::Vector3 RAY::Drawables::Drawables3D::Ray::getStartPosition(void) const -{ - return this->_ray.position; -} + const RAY::Vector3 &Ray::getDirection(void) const + { + return this->_direction; + } -const RAY::Vector3 RAY::Drawables::Drawables3D::Ray::getDirection(void) const -{ - return this->_ray.direction; -} + Ray &Ray::setDirection(const Vector3 &direction) + { + this->_direction = direction; + return *this; + } -RAY::Drawables::Drawables3D::Ray &RAY::Drawables::Drawables3D::Ray::setStartPosition(const Vector3 &startPosition) -{ - this->_ray.position = startPosition; - return *this; -} - -RAY::Drawables::Drawables3D::Ray &RAY::Drawables::Drawables3D::Ray::setDirection(const Vector3 &direction) -{ - this->_ray.direction = direction; - return *this; -} - -void RAY::Drawables::Drawables3D::Ray::drawOn(RAY::Window &) -{ - DrawRay(this->_ray, this->_color); + void Ray::drawOn(RAY::Window &) + { + DrawRay({this->_position, this->_direction}, this->_color); + } } \ No newline at end of file diff --git a/lib/Ray/sources/Drawables/3D/Ray.hpp b/lib/Ray/sources/Drawables/3D/Ray.hpp index 8895c342..40b959a4 100644 --- a/lib/Ray/sources/Drawables/3D/Ray.hpp +++ b/lib/Ray/sources/Drawables/3D/Ray.hpp @@ -29,17 +29,12 @@ namespace RAY::Drawables::Drawables3D { Ray &operator=(const Ray &) = default; //! @brief A default destructor - ~Ray() = default; + ~Ray() override = default; - //! @return the start position of the line - const Vector3 getStartPosition(void) const; //! @return the end position of the line - const Vector3 getDirection(void) const; - - //! @brief Set start position - Ray &setStartPosition(const Vector3 &startPosition); + const Vector3 &getDirection(void) const; //! @brief Set end position Ray &setDirection(const Vector3 &direction); @@ -48,7 +43,7 @@ namespace RAY::Drawables::Drawables3D { void drawOn(RAY::Window &) override; private: - ::Ray _ray; + Vector3 _direction; }; }; diff --git a/lib/Ray/sources/Drawables/3D/Sphere.cpp b/lib/Ray/sources/Drawables/3D/Sphere.cpp index 10c9a576..7d23fc48 100644 --- a/lib/Ray/sources/Drawables/3D/Sphere.cpp +++ b/lib/Ray/sources/Drawables/3D/Sphere.cpp @@ -7,35 +7,27 @@ #include "Drawables/3D/Sphere.hpp" -RAY::Drawables::Drawables3D::Sphere::Sphere(const Vector3 ¢erPosition, int radius, const Color &color): - ADrawable3D(color), _radius(radius), _centerPos(centerPosition) +namespace RAY::Drawables::Drawables3D { -} + Sphere::Sphere(const Vector3 ¢erPosition, int radius, const Color &color) : + ADrawable3D(centerPosition, color), _radius(radius) + { + } -int RAY::Drawables::Drawables3D::Sphere::getRadius(void) const -{ - return this->_radius; -} + int Sphere::getRadius(void) const + { + return this->_radius; + } -RAY::Drawables::Drawables3D::Sphere &RAY::Drawables::Drawables3D::Sphere::setRadius(int radius) -{ - this->_radius = radius; - return *this; -} + Sphere &Sphere::setRadius(int radius) + { + this->_radius = radius; + return *this; + } -const RAY::Vector3 &RAY::Drawables::Drawables3D::Sphere::getCenterPos(void) const -{ - return this->_centerPos; -} - -RAY::Drawables::Drawables3D::Sphere &RAY::Drawables::Drawables3D::Sphere::setRadius(const Vector3 &pos) -{ - this->_centerPos = pos; - return *this; -} - -void RAY::Drawables::Drawables3D::Sphere::drawOn(RAY::Window &) -{ - DrawSphere(this->_centerPos, this->_radius, this->_color); -} + void Sphere::drawOn(RAY::Window &) + { + DrawSphere(this->_position, this->_radius, this->_color); + } +} \ No newline at end of file diff --git a/lib/Ray/sources/Drawables/3D/Sphere.hpp b/lib/Ray/sources/Drawables/3D/Sphere.hpp index 4e1095f6..d053ccf9 100644 --- a/lib/Ray/sources/Drawables/3D/Sphere.hpp +++ b/lib/Ray/sources/Drawables/3D/Sphere.hpp @@ -21,7 +21,6 @@ namespace RAY::Drawables::Drawables3D { //! @param radius radius of the sphere //! @param Color Color of the sphere Sphere(const Vector3 ¢erPosition, int radius, const Color &color); - //! @brief A default copy constructor Sphere(const Sphere &) = default; @@ -30,7 +29,7 @@ namespace RAY::Drawables::Drawables3D { Sphere &operator=(const Sphere &) = default; //! @brief A default destructor - ~Sphere() = default; + ~Sphere() override = default; //! @return the radius of the sphere int getRadius(void) const; @@ -38,21 +37,12 @@ namespace RAY::Drawables::Drawables3D { //! @brief set radius Sphere &setRadius(int radius); - //! @return the position of the center - const Vector3 &getCenterPos(void) const; - - //! @brief set pos of center - Sphere &setRadius(const Vector3 &pos); - //! @brief Draw point on window void drawOn(RAY::Window &) override; private: //! @brief Radius of the sphere int _radius; - - //! @brief position of the center - Vector3 _centerPos; }; }; diff --git a/lib/Ray/sources/Drawables/3D/Triangle.cpp b/lib/Ray/sources/Drawables/3D/Triangle.cpp index d3b4ea8b..5d91ee2f 100644 --- a/lib/Ray/sources/Drawables/3D/Triangle.cpp +++ b/lib/Ray/sources/Drawables/3D/Triangle.cpp @@ -8,48 +8,50 @@ #include "Drawables/3D/Triangle.hpp" #include -RAY::Drawables::Drawables3D::Triangle::Triangle(const Vector3 &positionA, const Vector3 &positionB, const Vector3 &positionC, const Color &color): - ADrawable3D(color), _posA(positionA), _posB(positionB), _posC(positionC) +namespace RAY::Drawables::Drawables3D { + Triangle::Triangle(const Vector3 &positionA, const Vector3 &positionB, const Vector3 &positionC, const Color &color) : + ADrawable3D(positionA, color), _posB(positionB), _posC(positionC) + { + } + + const RAY::Vector3 &Triangle::getPositionA(void) const + { + return this->getPosition(); + } + + const RAY::Vector3 &Triangle::getPositionB(void) const + { + return this->_posB; + } + + const RAY::Vector3 &Triangle::getPositionC(void) const + { + return this->_posC; + } + + Triangle &Triangle::setPositionA(const Vector3 &position) + { + this->setPosition(position); + return *this; + } + + Triangle &Triangle::setPositionB(const Vector3 &position) + { + this->_posB = position; + return *this; + } + + Triangle &Triangle::setPositionC(const Vector3 &position) + { + this->_posC = position; + return *this; + } + + void Triangle::drawOn(RAY::Window &) + { + DrawTriangle3D(this->_position, this->_posB, this->_posC, this->_color); + } } -const RAY::Vector3 &RAY::Drawables::Drawables3D::Triangle::getPositionA(void) const -{ - return this->_posA; -} - -const RAY::Vector3 &RAY::Drawables::Drawables3D::Triangle::getPositionB(void) const -{ - return this->_posB; -} - -const RAY::Vector3 &RAY::Drawables::Drawables3D::Triangle::getPositionC(void) const -{ - return this->_posC; -} - -RAY::Drawables::Drawables3D::Triangle &RAY::Drawables::Drawables3D::Triangle::setPositionA(const Vector3 &position) -{ - this->_posA = position; - return *this; -} - -RAY::Drawables::Drawables3D::Triangle &RAY::Drawables::Drawables3D::Triangle::setPositionB(const Vector3 &position) -{ - this->_posB = position; - return *this; -} - -RAY::Drawables::Drawables3D::Triangle &RAY::Drawables::Drawables3D::Triangle::setPositionC(const Vector3 &position) -{ - this->_posC = position; - return *this; -} - -void RAY::Drawables::Drawables3D::Triangle::drawOn(RAY::Window &) -{ - DrawTriangle3D(this->_posA, this->_posB, this->_posC, this->_color); -} - - diff --git a/lib/Ray/sources/Drawables/3D/Triangle.hpp b/lib/Ray/sources/Drawables/3D/Triangle.hpp index bee8b049..6b633761 100644 --- a/lib/Ray/sources/Drawables/3D/Triangle.hpp +++ b/lib/Ray/sources/Drawables/3D/Triangle.hpp @@ -32,7 +32,7 @@ namespace RAY::Drawables::Drawables3D { Triangle &operator=(const Triangle &) = default; //! @brief A default destructor - ~Triangle() = default; + ~Triangle() override = default; //! @return the position of A of the Triangle const Vector3 &getPositionA(void) const; @@ -56,8 +56,6 @@ namespace RAY::Drawables::Drawables3D { void drawOn(RAY::Window &) override; private: - //! @brief Position of A - Vector3 _posA; //! @brief Position of B Vector3 _posB; //! @brief Position of C diff --git a/lib/Ray/sources/Drawables/ADrawable2D.cpp b/lib/Ray/sources/Drawables/ADrawable2D.cpp index ad1a9608..af031e36 100644 --- a/lib/Ray/sources/Drawables/ADrawable2D.cpp +++ b/lib/Ray/sources/Drawables/ADrawable2D.cpp @@ -7,44 +7,46 @@ #include "Drawables/ADrawable2D.hpp" -RAY::Drawables::Drawables2D::ADrawable2D::ADrawable2D(const Vector2 &position, const RAY::Color &color): - _position(position), _color(color) +namespace RAY::Drawables { -} + ADrawable2D::ADrawable2D(const Vector2 &position, const RAY::Color &color) : + _position(position), _color(color) + { + } -RAY::Drawables::Drawables2D::ADrawable2D::ADrawable2D(int x, int y, const RAY::Color &color): - _position(x, y), _color(color) -{ + ADrawable2D::ADrawable2D(int x, int y, const RAY::Color &color) : + _position(static_cast(x), static_cast(y)), _color(color) + { + } -} + const RAY::Vector2 &ADrawable2D::getPosition(void) const + { + return this->_position; + } -const RAY::Vector2 &RAY::Drawables::Drawables2D::ADrawable2D::getPosition(void) const -{ - return this->_position; -} + const RAY::Color &ADrawable2D::getColor(void) const + { + return this->_color; + } -const RAY::Color &RAY::Drawables::Drawables2D::ADrawable2D::getColor(void) const -{ - return this->_color; -} + ADrawable2D &ADrawable2D::setPosition(const Vector2 &position) + { + this->_position = position; + return *this; + } -RAY::Drawables::Drawables2D::ADrawable2D &RAY::Drawables::Drawables2D::ADrawable2D::setPosition(const Vector2 &position) -{ - this->_position = position; - return *this; -} + ADrawable2D &ADrawable2D::setPosition(int x, int y) + { + this->_position.x = static_cast(x); + this->_position.y = static_cast(y); + return *this; + } -RAY::Drawables::Drawables2D::ADrawable2D &RAY::Drawables::Drawables2D::ADrawable2D::setPosition(int x, int y) -{ - this->_position.x = x; - this->_position.y = y; - return *this; -} - -RAY::Drawables::Drawables2D::ADrawable2D &RAY::Drawables::Drawables2D::ADrawable2D::setColor(const Color &color) -{ - this->_color = color; - return *this; -} + ADrawable2D &ADrawable2D::setColor(const Color &color) + { + this->_color = color; + return *this; + } +} \ No newline at end of file diff --git a/lib/Ray/sources/Drawables/ADrawable2D.hpp b/lib/Ray/sources/Drawables/ADrawable2D.hpp index 11108da2..46a9407b 100644 --- a/lib/Ray/sources/Drawables/ADrawable2D.hpp +++ b/lib/Ray/sources/Drawables/ADrawable2D.hpp @@ -10,10 +10,11 @@ #include #include "Vector/Vector2.hpp" +#include "Image.hpp" #include "Drawables/IDrawable.hpp" #include "Color.hpp" -namespace RAY::Drawables::Drawables2D { +namespace RAY::Drawables { //! @brief Abstraction of any two-dimensionnal drawable class ADrawable2D: public IDrawable { @@ -32,10 +33,10 @@ namespace RAY::Drawables::Drawables2D { ADrawable2D(const ADrawable2D &) = default; //! @brief A default destructor - virtual ~ADrawable2D() = default; + ~ADrawable2D() override = default; //! @return the top-left position of the ADrawable - const Vector2 &getPosition(void) const; + const RAY::Vector2 &getPosition(void) const; //! @return the color of the ADrawable const RAY::Color &getColor(void) const; @@ -50,7 +51,7 @@ namespace RAY::Drawables::Drawables2D { ADrawable2D &setColor(const Color &color); //! @brief Draw drawble on window - virtual void drawOn(RAY::Window &) = 0; + void drawOn(RAY::Window &) override = 0; //! @brief Draw drawble on image virtual void drawOn(RAY::Image &image) = 0; diff --git a/lib/Ray/sources/Drawables/ADrawable3D.cpp b/lib/Ray/sources/Drawables/ADrawable3D.cpp index a810f562..0fff69f8 100644 --- a/lib/Ray/sources/Drawables/ADrawable3D.cpp +++ b/lib/Ray/sources/Drawables/ADrawable3D.cpp @@ -7,19 +7,33 @@ #include "Drawables/ADrawable3D.hpp" -RAY::Drawables::Drawables3D::ADrawable3D::ADrawable3D(const RAY::Color &color): - _color(color) +namespace RAY::Drawables { -} + ADrawable3D::ADrawable3D(const RAY::Vector3 &position, const RAY::Color &color) : + _position(position), _color(color) + { + } -const RAY::Color &RAY::Drawables::Drawables3D::ADrawable3D::getColor(void) const -{ - return this->_color; -} + const RAY::Color &ADrawable3D::getColor(void) const + { + return this->_color; + } -RAY::Drawables::Drawables3D::ADrawable3D &RAY::Drawables::Drawables3D::ADrawable3D::setColor(const RAY::Color &color) -{ - this->_color = color; - return *this; -} + ADrawable3D &ADrawable3D::setColor(const RAY::Color &color) + { + this->_color = color; + return *this; + } + + const RAY::Vector3 &ADrawable3D::getPosition(void) const + { + return this->_position; + } + + ADrawable3D &ADrawable3D::setPosition(const RAY::Vector3 &position) + { + this->_position = position; + return *this; + } +} \ No newline at end of file diff --git a/lib/Ray/sources/Drawables/ADrawable3D.hpp b/lib/Ray/sources/Drawables/ADrawable3D.hpp index cb2c8fcf..cc989fed 100644 --- a/lib/Ray/sources/Drawables/ADrawable3D.hpp +++ b/lib/Ray/sources/Drawables/ADrawable3D.hpp @@ -12,30 +12,40 @@ #include "Drawables/IDrawable.hpp" #include "Color.hpp" -namespace RAY::Drawables::Drawables3D { +namespace RAY::Drawables { //! @brief Abstraction of any three-dimensionnal drawable class ADrawable3D: public IDrawable { public: - //! @param Color Color of the drawable - ADrawable3D(const RAY::Color &color); + //! @param Color Color of the drawable + //! @param Position Position of the drawable (wether its center or start position for lines) + ADrawable3D(const RAY::Vector3 &position, const RAY::Color &color); //! @brief A default copy constructor ADrawable3D(const ADrawable3D &) = default; //! @brief A default destructor - virtual ~ADrawable3D() = default; + ~ADrawable3D() override = default; //! @brief Draw drawble on window - virtual void drawOn(RAY::Window &) = 0; + void drawOn(RAY::Window &) override = 0; //! @return the color of the ADrawable - const Color &getColor(void) const; + const RAY::Color &getColor(void) const; //! @brief set color ADrawable3D &setColor(const RAY::Color &color); + //! @return the position of the ADrawable + virtual const RAY::Vector3 &getPosition(void) const; + + //! @brief set position + virtual ADrawable3D &setPosition(const Vector3 &position); + protected: + //! @brief Position of the ADrawable + Vector3 _position; + //! @brief Color of the ADrawable Color _color; diff --git a/lib/Ray/sources/Drawables/IDrawable.hpp b/lib/Ray/sources/Drawables/IDrawable.hpp index 97c0a110..9e3b403b 100644 --- a/lib/Ray/sources/Drawables/IDrawable.hpp +++ b/lib/Ray/sources/Drawables/IDrawable.hpp @@ -8,13 +8,11 @@ #ifndef IDRAWABLE_HPP_ #define IDRAWABLE_HPP_ -#include "Drawables/Image.hpp" #include "Window.hpp" namespace RAY { class Window; - class Image; namespace Drawables { //! @brief Interface for any drawable class IDrawable { diff --git a/lib/Ray/sources/Drawables/Image.cpp b/lib/Ray/sources/Drawables/Image.cpp index ee28e3e0..0145e642 100644 --- a/lib/Ray/sources/Drawables/Image.cpp +++ b/lib/Ray/sources/Drawables/Image.cpp @@ -6,17 +6,13 @@ */ #include "Drawables/Image.hpp" +#include "Drawables/IDrawable.hpp" RAY::Image::Image(const std::string &filename): _image(LoadImage(filename.c_str())) { } -RAY::Image::Image() -{ - -} - RAY::Image::Image(RAY::Texture &texture): _image(GetTextureData(texture)) { @@ -28,24 +24,12 @@ RAY::Image::~Image() UnloadImage(_image); } -bool RAY::Image::load(const std::string &filename) -{ - this->_image = LoadImage(filename.c_str()); - return true; -} - bool RAY::Image::exportTo(const std::string &outputPath) { ExportImage(_image, outputPath.c_str()); return true; } -bool RAY::Image::unload() -{ - UnloadImage(_image); - return true; -} - RAY::Image::operator ::Image() const { return _image; diff --git a/lib/Ray/sources/Drawables/Image.hpp b/lib/Ray/sources/Drawables/Image.hpp index beeda629..ac802580 100644 --- a/lib/Ray/sources/Drawables/Image.hpp +++ b/lib/Ray/sources/Drawables/Image.hpp @@ -10,18 +10,15 @@ #include #include -#include "Canvas.hpp" #include "Texture.hpp" -#include "IRessource.hpp" namespace RAY { namespace Drawables { class ADrawable2D; } - class IRessource; //! @brief Object representation of a framebuffer - class Image: public Canvas, public IRessource { + class Image { public: //! @brief Create an image, loading a file //! @param filename: path to file to load @@ -32,28 +29,18 @@ namespace RAY Image(Texture &texture); //! @brief A default copy constructor - Image(const Image &image) = default; - - //! @brief A default constructor, no ressources loaded - Image(); + Image(const Image &image) = delete; //! @brief An image is assignable - Image &operator=(const Image &image) = default; + Image &operator=(const Image &image) = delete; //! @brief Image destructor, will unload ressources ~Image(); - //! @brief load ressources from file - //! @param filename: path of input - bool load(const std::string &filename) override; - //! @brief export to file //! @param outputPath: path of output bool exportTo(const std::string &outputPath); - //! @brief unload ressources - bool unload() override; - //! @brief draw drawable void draw(Drawables::ADrawable2D &); diff --git a/lib/Ray/sources/Drawables/Texture.cpp b/lib/Ray/sources/Drawables/Texture.cpp index 6255002e..a92e1349 100644 --- a/lib/Ray/sources/Drawables/Texture.cpp +++ b/lib/Ray/sources/Drawables/Texture.cpp @@ -7,40 +7,36 @@ #include "Drawables/Texture.hpp" -RAY::Texture::Texture(const std::string &filename): - _texture(LoadTexture(filename.c_str())) -{ -} - -RAY::Texture::Texture(const Image &image): - _texture(LoadTextureFromImage(image)) -{ - -} - -RAY::Texture::Texture() -{ - -} - -RAY::Texture::~Texture() -{ - UnloadTexture(this->_texture); -} - -bool RAY::Texture::load(const std::string &filename) -{ - this->_texture = LoadTexture(filename.c_str()); - return true; -} - -bool RAY::Texture::unload() -{ - UnloadTexture(this->_texture); - return true; -} - -RAY::Texture::operator ::Texture() const -{ - return this->_texture; +namespace RAY { + + Texture::Texture(const std::string &filename): + _texture(LoadTexture(filename.c_str())), + _resourcePath(filename) + { + } + + Texture::Texture(const Texture &texture): + _texture(LoadTexture(texture._resourcePath.c_str())), + _resourcePath(texture._resourcePath) + { + } + + + Texture &Texture::operator=(const Texture &other) + { + UnloadTexture(this->_texture); + this->_resourcePath = other._resourcePath; + this->_texture = LoadTexture(this->_resourcePath.c_str()); + return *this; + } + + Texture::~Texture() + { + UnloadTexture(this->_texture); + } + + Texture::operator ::Texture() const + { + return this->_texture; + } } diff --git a/lib/Ray/sources/Drawables/Texture.hpp b/lib/Ray/sources/Drawables/Texture.hpp index fb4bf0ec..a2054b1a 100644 --- a/lib/Ray/sources/Drawables/Texture.hpp +++ b/lib/Ray/sources/Drawables/Texture.hpp @@ -10,46 +10,32 @@ #include #include -#include "Canvas.hpp" -#include "IRessource.hpp" namespace RAY { //! @brief Object representation of a texture - class Texture: public IRessource { + class Texture { public: //! @brief Create an texture, loading a file //! @param filename: path to file to load Texture(const std::string &filename); - //! @brief Create an texture, from an image - //! @param image: reference to image to create texture from - Texture(const Image &image); - - //! @brief A default copy constructor - Texture(const Texture &) = default; - - //! @brief A default constructor, no ressources loaded - Texture(); + //! @brief A texture is not copy constructable + Texture(const Texture &); //! @brief An image is assignable - Texture &operator=(const Texture &) = default; + Texture &operator=(const Texture &); //! @brief Texture destructor, will unload ressources - ~Texture() override; - - //! @brief load ressources from file - //! @param filename: path of input - bool load(const std::string &filename) override; - - //! @brief unload ressources - bool unload() override; + ~Texture(); protected: private: //! @brief Texture, really, that's just it... ::Texture _texture; + std::string _resourcePath; + INTERNAL: //! @return libray Texture struct operator ::Texture() const; diff --git a/lib/Ray/sources/Font.cpp b/lib/Ray/sources/Font.cpp index a619cd55..00711def 100644 --- a/lib/Ray/sources/Font.cpp +++ b/lib/Ray/sources/Font.cpp @@ -17,18 +17,6 @@ RAY::Font::Font() } RAY::Font::~Font() -{ - this->unload(); -} - -bool RAY::Font::load(const std::string &filename) -{ - this->_font = LoadFont(filename.c_str()); - return true; -} - -bool RAY::Font::unload() { UnloadFont(this->_font); - return true; } diff --git a/lib/Ray/sources/Font.hpp b/lib/Ray/sources/Font.hpp index 5b467e96..1ad65a1e 100644 --- a/lib/Ray/sources/Font.hpp +++ b/lib/Ray/sources/Font.hpp @@ -9,12 +9,12 @@ #define FONT_HPP_ #include -#include "IRessource.hpp" +#include namespace RAY { //! @brief A font manager - class Font: public IRessource { + class Font { public: //! @brief Create an font, loading a file //! @param filename: path to file to load @@ -32,13 +32,6 @@ namespace RAY //! @brief Unload font at destruction ~Font(); - //! @brief load font from file - //! @param filename: path of input - bool load(const std::string &filename); - - //! @brief unload ressources - bool unload(); - protected: private: //! @brief Font, really, that's just it... diff --git a/lib/Ray/sources/IRessource.hpp b/lib/Ray/sources/IRessource.hpp deleted file mode 100644 index 2482cc3c..00000000 --- a/lib/Ray/sources/IRessource.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/* -** EPITECH PROJECT, 2021 -** Bomberman -** File description: -** Ressource -*/ - -#ifndef RESSOURCE_HPP_ -#define RESSOURCE_HPP_ - -#include - -namespace RAY { - //! @brief A Ressource interface - class IRessource { - public: - virtual ~IRessource() = default; - - virtual bool load(const std::string &filePath) = 0; - - virtual bool unload() = 0; - }; -}; - -#endif /* !RESSOURCE_HPP_ */ diff --git a/lib/Ray/sources/Model/Model.cpp b/lib/Ray/sources/Model/Model.cpp index 5ce18d71..cb4cd024 100644 --- a/lib/Ray/sources/Model/Model.cpp +++ b/lib/Ray/sources/Model/Model.cpp @@ -8,65 +8,102 @@ #include "Model/Model.hpp" #include "Exceptions/RayError.hpp" -RAY::Model::Model(const std::string &filename): - _model(LoadModel(filename.c_str())) -{ -} +namespace RAY::Drawables::Drawables3D { -RAY::Model::Model(const Mesh &mesh): - _model(LoadModelFromMesh(mesh)) -{ -} + Model::Model(const std::string &filename, + std::optional> texture, + const RAY::Vector3 &position, + const RAY::Vector3 &rotationAxis, + float rotationAngle, + const RAY::Vector3 &scale) + : ADrawable3D(position, WHITE), + _model(LoadModel(filename.c_str())), + _rotationAxis(rotationAxis), + _rotationAngle(rotationAngle), + _scale(scale) + { + if (texture.has_value()) + this->setTextureToMaterial(texture->first, texture->second); + } -RAY::Model::~Model() -{ - this->unload(); -} + Model::Model(const Mesh &mesh) + : ADrawable3D({0, 0, 0}, WHITE), _model(LoadModelFromMesh(mesh)) + { + } -bool RAY::Model::load(const std::string &filename) -{ - this->_model = LoadModel(filename.c_str()); - return true; -} + Model::~Model() + { + UnloadModel(this->_model); + } -bool RAY::Model::load(const Mesh &mesh) -{ - this->_model = LoadModelFromMesh(mesh); - return true; -} + bool Model::unloadKeepMeshes() + { + UnloadModelKeepMeshes(_model); + return true; + } -bool RAY::Model::unload() -{ - UnloadModel(this->_model); - return true; -} + bool Model::setAnimation(const RAY::ModelAnimation &animation) + { + if (!IsModelAnimationValid(this->_model, animation)) + throw RAY::Exception::NotCompatibleError("The animation is not compatible with the model"); + UpdateModelAnimation(this->_model, animation, animation.getFrameCounter()); + return true; + } -bool RAY::Model::unloadKeepMeshes() -{ - UnloadModelKeepMeshes(_model); - return true; -} + bool Model::setTextureToMaterial(Model::MaterialType materialType, const std::string &texturePath) + { + this->_textureList.emplace(materialType, texturePath); + SetMaterialTexture(&this->_model.materials[materialType], + materialType, + this->_textureList.at(materialType)); + return true; + } -bool RAY::Model::setAnimation(const RAY::ModelAnimation &animation) -{ - if (!IsModelAnimationValid(this->_model, animation)) - throw RAY::Exception::NotCompatibleError("The animation is not compatible with the model"); - UpdateModelAnimation(this->_model, animation, animation.getFrameCounter()); - return true; -} + Model::operator ::Model() const + { + return this->_model; + } -bool RAY::Model::setTextureToMaterial(RAY::Model::MaterialType materialType, const RAY::Texture &texture) -{ - SetMaterialTexture(&this->_model.materials[materialType], materialType, texture); - return true; -} + int Model::getBoneCount() const + { + return this->_model.boneCount; + } -RAY::Model::operator ::Model() const -{ - return this->_model; -} + Model &Model::setRotationAngle(float rotationAngle) + { + this->_rotationAngle = rotationAngle; + return *this; + } -int RAY::Model::getBoneCount() const -{ - return this->_model.boneCount; + float Model::getRotationAngle(void) + { + return this->_rotationAngle; + } + + Model &Model::setRotationAxis(const RAY::Vector3 &scale) + { + this->_scale = scale; + return *this; + } + + const RAY::Vector3 &Model::getRotationAxis(void) + { + return this->_rotationAxis; + } + + Model &Model::setScale(const RAY::Vector3 &scale) + { + this->_scale = scale; + return *this; + } + + const RAY::Vector3 &Model::getScale(void) + { + return this->_scale; + } + + void Model::drawOn(RAY::Window &) + { + DrawModelEx(this->_model, this->_position, this->_rotationAxis, this->_rotationAngle, this->_scale, this->_color); + } } \ No newline at end of file diff --git a/lib/Ray/sources/Model/Model.hpp b/lib/Ray/sources/Model/Model.hpp index 50ee4bc8..039304ae 100644 --- a/lib/Ray/sources/Model/Model.hpp +++ b/lib/Ray/sources/Model/Model.hpp @@ -8,23 +8,29 @@ #ifndef MODEL_HPP_ #define MODEL_HPP_ -#include "IRessource.hpp" #include "Drawables/Texture.hpp" -#include "Drawables/IDrawable.hpp" +#include "Drawables/ADrawable3D.hpp" #include "Model/ModelAnimation.hpp" #include #include +#include +#include -namespace RAY { +namespace RAY::Drawables::Drawables3D { //! @brief Basic 3D Model type - class Model: public IRessource { + class Model: public Drawables::ADrawable3D { public: typedef ::MaterialMapIndex MaterialType; //! @brief Create an model, loading a file //! @param filePath: path to file to load - Model(const std::string &filePath); + Model(const std::string &filePath, + std::optional> texture = std::nullopt, + const RAY::Vector3 &position = {0, 0, 0}, + const RAY::Vector3 &rotationAxis = RAY::Vector3(0, 1, 0), + float rotationAngle = 0, + const RAY::Vector3 &scale = RAY::Vector3(1, 1, 1)); //! @brief Create an model, loading a file //! @param mesh: mesh to load @@ -39,15 +45,6 @@ namespace RAY { //! @brief Model destructor, unloads all related data ~Model(); - //! @brief Load model from file (meshes and materials) - bool load(const std::string &filePath); - - //! @brief Load model from mesh (default materials) - bool load(const Mesh &mesh); - - //! @brief Unload model (including meshes) from memory (RAM and/or VRAM) - bool unload() override; - //! @brief Unload model (excluding meshes) from memory (RAM and/or VRAM) bool unloadKeepMeshes(); @@ -57,13 +54,42 @@ namespace RAY { //! @brief Sets a texture to the Nth material //! @param materielIndex The type of material to apply the texture to (serves as an index) //! @param texture the texture to apply - bool setTextureToMaterial(MaterialType materialType, const RAY::Texture &texture); + bool setTextureToMaterial(MaterialType materialType, const std::string &texture); //! @return The number of bones in the model int getBoneCount() const; + + //! @brief Set rotation angle + Model &setRotationAngle(float roationAngle); + + //! @return rotation angle + float getRotationAngle(void); + + //! @brief Set Rotation Axis + Model &setRotationAxis(const RAY::Vector3 &scale); + + //! @return rotation axis + const RAY::Vector3 & getRotationAxis(void); + + //! @brief Set Scale + Model &setScale(const RAY::Vector3 &scale); + + //! @return Scale + const RAY::Vector3 & getScale(void); + + void drawOn(RAY::Window &) override; + private: //! @brief Raw data from raylib ::Model _model; + //! @brief The list of textures that can be applied to this model. + std::map _textureList; + //! @brief Rotation property + RAY::Vector3 _rotationAxis; + //! @brief Rotation property + float _rotationAngle; + //! @brief Scale of the shape + RAY::Vector3 _scale; INTERNAL: //! @brief A RAY Model is cast-able in libray's model diff --git a/lib/Ray/sources/Model/ModelAnimations.cpp b/lib/Ray/sources/Model/ModelAnimations.cpp index 08973e42..224b9979 100644 --- a/lib/Ray/sources/Model/ModelAnimations.cpp +++ b/lib/Ray/sources/Model/ModelAnimations.cpp @@ -11,6 +11,7 @@ RAY::ModelAnimations::ModelAnimations(const std::string &filePath): _animationsPtr(LoadModelAnimations(filePath.c_str(), &this->_animationCount)) { ::ModelAnimation *ptr = this->_animationsPtr.get(); + for (int i = 0; i < this->_animationCount; i++) this->_animations.push_back(RAY::ModelAnimation(ptr[i])); } diff --git a/lib/Ray/sources/TraceLog.cpp b/lib/Ray/sources/TraceLog.cpp new file mode 100644 index 00000000..394809a7 --- /dev/null +++ b/lib/Ray/sources/TraceLog.cpp @@ -0,0 +1,13 @@ +/* +** EPITECH PROJECT, 2021 +** Bomberman +** File description: +** TraceLog +*/ + +#include "TraceLog.hpp" + +void RAY::TraceLog::setLevel(RAY::TraceLog::Level level) +{ + SetTraceLogLevel(level); +} \ No newline at end of file diff --git a/lib/Ray/sources/TraceLog.hpp b/lib/Ray/sources/TraceLog.hpp new file mode 100644 index 00000000..3c5022da --- /dev/null +++ b/lib/Ray/sources/TraceLog.hpp @@ -0,0 +1,24 @@ +/* +** EPITECH PROJECT, 2021 +** Bomberman +** File description: +** TraceLog +*/ + +#ifndef TRACELOG_HPP_ +#define TRACELOG_HPP_ + +#include + +namespace RAY { + class TraceLog { + public: + typedef ::TraceLogLevel Level; + + //! @brief Set Trace Log level + //! @param level Level of log to display + static void setLevel(Level level); + }; +} + +#endif /* !TRACELOG_HPP_ */ diff --git a/lib/Ray/sources/Window.cpp b/lib/Ray/sources/Window.cpp index 96760078..11b14486 100644 --- a/lib/Ray/sources/Window.cpp +++ b/lib/Ray/sources/Window.cpp @@ -6,15 +6,28 @@ */ #include "Window.hpp" - #include +#include #include "Controllers/Mouse.hpp" +#include "Drawables/ADrawable2D.hpp" +#include "Drawables/ADrawable3D.hpp" -RAY::Window &RAY::Window::getInstance(int width, int height, const std::string &title, unsigned flags, bool openNow) +std::optional RAY::Window::_instance = std::nullopt; + +RAY::Window &RAY::Window::getInstance() { - static RAY::Window window(width, height, title, flags, openNow); + if (!RAY::Window::_instance.has_value()) + throw std::runtime_error("No window has been constructed."); + return RAY::Window::_instance.value(); +} - return window; +RAY::Window &RAY::Window::getInstance(int width, int height, const std::string &title, unsigned flags, bool openNow) noexcept +{ + if (!RAY::Window::_instance.has_value()){ + RAY::Window window(width, height, title, flags, openNow); + RAY::Window::_instance.emplace(std::move(window)); + } + return RAY::Window::_instance.value(); } RAY::Window::Window(int width, int height, std::string title, unsigned flags, bool openNow): @@ -22,7 +35,7 @@ RAY::Window::Window(int width, int height, std::string title, unsigned flags, bo _title(std::move(title)), _isOpen(openNow), _flags(flags), - _drawingState(IDLE), _displayState(NONE) + _displayState(NONE) { if (openNow) this->open(); @@ -89,25 +102,15 @@ void RAY::Window::setFPS(unsigned int fps) SetTargetFPS(fps); } -void RAY::Window::clear(const RAY::Color &color) +void RAY::Window::clear(RAY::Color color) { ClearBackground(color); } -void RAY::Window::setDrawingState(enum RAY::Window::drawingState state) +void RAY::Window::draw() { - if (state == this->_drawingState) - return; - switch (state) - { - case DRAWING: - BeginDrawing(); - break; - case IDLE: - EndDrawing(); - break; - } - this->_drawingState = state; + EndDrawing(); + BeginDrawing(); } void RAY::Window::useCamera(RAY::Camera::Camera2D &camera) @@ -160,12 +163,7 @@ void RAY::Window::draw(const Mesh &mesh, const Material &material, const Matrix DrawMesh(mesh, material, transform); } -void RAY::Window::draw(const RAY::Model &model, const RAY::Vector3 &position, const RAY::Vector3 &rotationAxis, float rotationAngle, const RAY::Vector3 &scale, const RAY::Color &tint) -{ - DrawModelEx(model, position, rotationAxis, rotationAngle, scale, tint); -} - void RAY::Window::setIcon(RAY::Image &img) { SetWindowIcon(img); -} \ No newline at end of file +} diff --git a/lib/Ray/sources/Window.hpp b/lib/Ray/sources/Window.hpp index 568bebb3..b04f60d8 100644 --- a/lib/Ray/sources/Window.hpp +++ b/lib/Ray/sources/Window.hpp @@ -10,25 +10,40 @@ #include #include +#include +#include "Drawables/Image.hpp" #include "Vector/Vector2.hpp" #include "Vector/Vector3.hpp" #include "Controllers/Keyboard.hpp" #include "Camera/Camera2D.hpp" #include "Camera/Camera3D.hpp" #include "Color.hpp" -#include "Canvas.hpp" -#include "Drawables/IDrawable.hpp" #include "Drawables/Texture.hpp" -#include "Model/Model.hpp" namespace RAY { - class Model; //! @brief Window manager - class Window: public Canvas { + namespace Drawables { + class IDrawable; + class ADrawable3D; + namespace Drawables3D + { + class Model; + } + } + class Window { + private: + //! @brief The window's instance as an optional. + static std::optional _instance; public: + //! @brief Get The window's instance, if the window has not been already constructed a runtime exception is thrown. + static Window &getInstance(); + //! @return A widow insta,ce. Only one window can be open at a time - static Window &getInstance(int width, int height, const std::string &title, unsigned flags = 0, bool openNow = true); + static Window &getInstance(int width, int height, const std::string &title, unsigned flags = 0, bool openNow = true) noexcept; + //! @brief A window is movable. + Window(Window &&) = default; + //! @brief A default copy constructor Window(const Window &window) = delete; @@ -65,7 +80,7 @@ namespace RAY { bool cursorIsVisible(void) const; //! @brief set the window icon - void setIcon(Image &img); + void setIcon(RAY::Image &img); //! @brief Get the cursor position Vector2 getCursorPosition() const; @@ -75,15 +90,7 @@ namespace RAY { //! @brief Set background color (framebuffer clear color) //! @param color The color to clear the screen (default: black) - void clear(const Color &color = BLACK); - - //! @brief Different states of the draw-ability of the window - enum drawingState { - //! @brief Must be called after last draw of iteration - IDLE, - //! @brief Must be called before first draw of iteration - DRAWING, - }; + void clear(Color color = BLACK); //! @brief Different states of the view of the window enum displayState { @@ -95,8 +102,8 @@ namespace RAY { NONE, }; - //! @brief Set drawing state of the window - void setDrawingState(enum drawingState); + //! @brief Draw the content of the buffer on the screen. + void draw(); //! @brief Initialize 2D mode with custom camera (2D) void useCamera(Camera::Camera2D &camera); @@ -111,9 +118,9 @@ namespace RAY { void setTitle(const std::string &title); - //! @brief draw rectangle + //! @brief draw drawable //! @param drawable The drawable to render on screen - void draw(Drawables::IDrawable &drawable) override; + void draw(RAY::Drawables::IDrawable &drawable); //! @brief draw texture at position //! @param texture The object to render @@ -124,15 +131,11 @@ namespace RAY { //! @brief Draw a 3d mesh with material and transform void draw(const Mesh &mesh, const Material &material, const Matrix &transform); - //! @brief Draw a model - void draw(const Model &model, const Vector3 &position, const Vector3 &rotationAxis = Vector3(0, 0, 0), - float rotationAngle = 0, const Vector3 &scale = Vector3(1, 1, 1), const Color &tint = WHITE); - private: //! @brief Creates window, and opens it if openNow is set to true Window(int width, int height, std::string title, unsigned flags = 0, bool openNow = true); - + //! @brief Dimension of window RAY::Vector2 _dimensions; @@ -145,9 +148,6 @@ namespace RAY { //! @brief flags for the window (ex: FLAG_WINDOW_RESIZABLE) unsigned int _flags; - //! @brief Current window draw-state - enum drawingState _drawingState; - //! @brief Current window draw-state enum displayState _displayState; }; diff --git a/lib/wal/CMakeLists.txt b/lib/wal/CMakeLists.txt index 41a455d0..e8cd8655 100644 --- a/lib/wal/CMakeLists.txt +++ b/lib/wal/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.19) +cmake_minimum_required(VERSION 3.11) project(wal) set(CMAKE_CXX_STANDARD 20) diff --git a/lib/wal/eCPPLINT.cfg b/lib/wal/eCPPLINT.cfg new file mode 100644 index 00000000..9992b3d2 --- /dev/null +++ b/lib/wal/eCPPLINT.cfg @@ -0,0 +1,4 @@ +# Use 'ART_' as the cpp header guard prefix (e.g. #ifndef ART_PATH_TO_FILE_H_). +root=. + +exclude_files=tests/* \ No newline at end of file diff --git a/lib/wal/sources/Component/Component.cpp b/lib/wal/sources/Component/Component.cpp index fb4e1279..aba34221 100644 --- a/lib/wal/sources/Component/Component.cpp +++ b/lib/wal/sources/Component/Component.cpp @@ -22,11 +22,11 @@ namespace WAL void Component::onStart() { - //TODO handle events here + // TODO handle events here } void Component::onStop() { - //TODO handle events here + // TODO handle events here } -} \ No newline at end of file +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/Component/Component.hpp b/lib/wal/sources/Component/Component.hpp index b2441383..33794d89 100644 --- a/lib/wal/sources/Component/Component.hpp +++ b/lib/wal/sources/Component/Component.hpp @@ -12,7 +12,7 @@ namespace WAL { //! @brief The entity class, used to prevent circular dependencies. class Entity; - + //! @brief Represent a single component of WAL. class Component { @@ -37,7 +37,7 @@ namespace WAL //! @param entity The entity that owns the ne component. virtual Component *clone(Entity &entity) const = 0; - //! @brief Used if the component is disabled + //! @brief Used if the component is disabled bool isDisabled() const; //! @brief Disable this component. void setDisable(bool disabled); @@ -48,4 +48,4 @@ namespace WAL //! @brief The entity or this component has just been disable. virtual void onStop(); }; -} \ No newline at end of file +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/Entity/Entity.cpp b/lib/wal/sources/Entity/Entity.cpp index 9a59447b..56627a16 100644 --- a/lib/wal/sources/Entity/Entity.cpp +++ b/lib/wal/sources/Entity/Entity.cpp @@ -3,7 +3,7 @@ // #include "Entity/Entity.hpp" - +#include #include namespace WAL @@ -67,4 +67,4 @@ namespace WAL }); return existing != this->_components.end(); } -} \ No newline at end of file +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/Entity/Entity.hpp b/lib/wal/sources/Entity/Entity.hpp index 5f4b21ca..8e157c6e 100644 --- a/lib/wal/sources/Entity/Entity.hpp +++ b/lib/wal/sources/Entity/Entity.hpp @@ -34,7 +34,7 @@ namespace WAL //! @brief Get the name fo the entity std::string getName() const; - //! @brief Used if the entity is disabled + //! @brief Used if the entity is disabled bool isDisable() const; //! @brief Disable this entity. @@ -75,11 +75,11 @@ namespace WAL //! @throw DuplicateError is thrown if a component with the same type already exist. //! @return This entity is returned template - Entity &addComponent(Types ...params) + Entity &addComponent(Types &&...params) { if (this->hasComponent()) throw DuplicateError("A component of the type \"" + std::string(typeid(T).name()) + "\" already exists."); - this->_components.push_back(std::make_unique(*this, params...)); + this->_components.push_back(std::make_unique(*this, std::forward(params)...)); return *this; } @@ -111,7 +111,7 @@ namespace WAL Entity(Entity &&) = default; //! @brief A default destructor ~Entity() = default; - //! @brief An entity is assignable - Entity &operator=(const Entity &) = default; + //! @brief An entity is not assignable + Entity &operator=(const Entity &) = delete; }; -} \ No newline at end of file +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/Exception/WalError.cpp b/lib/wal/sources/Exception/WalError.cpp index 53581300..c1039567 100644 --- a/lib/wal/sources/Exception/WalError.cpp +++ b/lib/wal/sources/Exception/WalError.cpp @@ -2,6 +2,7 @@ // Created by Zoe Roux on 2021-05-14. // +#include #include "WalError.hpp" namespace WAL @@ -17,4 +18,4 @@ namespace WAL NotFoundError::NotFoundError(const std::string &what) : WalError(what) {} -} \ No newline at end of file +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/Exception/WalError.hpp b/lib/wal/sources/Exception/WalError.hpp index 0c791647..d7c04c96 100644 --- a/lib/wal/sources/Exception/WalError.hpp +++ b/lib/wal/sources/Exception/WalError.hpp @@ -7,6 +7,7 @@ #include #include +#include namespace WAL { @@ -51,4 +52,4 @@ namespace WAL //! @brief A default assignment operator NotFoundError &operator=(const NotFoundError &) = default; }; -} +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/Models/Callback.hpp b/lib/wal/sources/Models/Callback.hpp index 334d39a7..be2c092f 100644 --- a/lib/wal/sources/Models/Callback.hpp +++ b/lib/wal/sources/Models/Callback.hpp @@ -6,6 +6,8 @@ #pragma once #include +#include +#include namespace WAL { @@ -57,4 +59,4 @@ namespace WAL this->addCallback(callback); } }; -} \ No newline at end of file +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/Scene/Scene.cpp b/lib/wal/sources/Scene/Scene.cpp index b0a3b3a7..3c07f3c8 100644 --- a/lib/wal/sources/Scene/Scene.cpp +++ b/lib/wal/sources/Scene/Scene.cpp @@ -10,5 +10,8 @@ namespace WAL { return this->_entities; } -} - + Scene &Scene::operator=(const Scene &) + { + return *this; + } +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/Scene/Scene.hpp b/lib/wal/sources/Scene/Scene.hpp index 00329172..bddf1e5c 100644 --- a/lib/wal/sources/Scene/Scene.hpp +++ b/lib/wal/sources/Scene/Scene.hpp @@ -24,10 +24,9 @@ namespace WAL //! @brief Add a new entity to the scene, you can use this method with the same arguments as the entity's constructor. //! @return The current scene is returned to allow you to chain call. template - Scene &addEntity(Params ...params) + Entity &addEntity(Params &&...params) { - this->_entities.emplace_back(params...); - return *this; + return this->_entities.emplace_back(std::forward(params)...); } //! @brief A default constructor @@ -37,6 +36,7 @@ namespace WAL //! @brief A default destructor ~Scene() = default; //! @brief A scene is assignable - Scene &operator=(const Scene &) = default; + Scene &operator=(const Scene &); + Scene(Scene &&) = default; }; -} +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/System/System.cpp b/lib/wal/sources/System/System.cpp index 56814735..0dd69f30 100644 --- a/lib/wal/sources/System/System.cpp +++ b/lib/wal/sources/System/System.cpp @@ -3,7 +3,7 @@ // #include "System.hpp" - +#include #include namespace WAL @@ -25,4 +25,4 @@ namespace WAL { return this->_dependencies; } -} \ No newline at end of file +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/System/System.hpp b/lib/wal/sources/System/System.hpp index 5ab9b8a5..59c82c4a 100644 --- a/lib/wal/sources/System/System.hpp +++ b/lib/wal/sources/System/System.hpp @@ -5,6 +5,7 @@ #pragma once #include +#include #include "Entity/Entity.hpp" namespace WAL @@ -44,4 +45,4 @@ namespace WAL //! @brief A system can't be instantiated, it should be derived. System &operator=(const System &) = default; }; -} \ No newline at end of file +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/Wal.cpp b/lib/wal/sources/Wal.cpp index 126f78dd..875e3bd8 100644 --- a/lib/wal/sources/Wal.cpp +++ b/lib/wal/sources/Wal.cpp @@ -6,15 +6,13 @@ #include #include "Wal.hpp" -using namespace std::chrono_literals; - namespace WAL { - std::chrono::nanoseconds Wal::timestep = 8ms; + std::chrono::nanoseconds Wal::timestep = std::chrono::milliseconds(8); void Wal::_update(std::chrono::nanoseconds dtime) { - auto &entities = this->_scene.getEntities(); + auto &entities = this->scene->getEntities(); for (auto &system : this->_systems) { for (auto &entity : entities) { @@ -28,7 +26,7 @@ namespace WAL void Wal::_fixedUpdate() { - auto &entities = this->_scene.getEntities(); + auto &entities = this->scene->getEntities(); for (auto &system : this->_systems) { for (auto &entity : entities) { @@ -47,4 +45,4 @@ namespace WAL return entity.hasComponent(dependency); }); } -} \ No newline at end of file +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/Wal.hpp b/lib/wal/sources/Wal.hpp index 9f560ac2..50a87188 100644 --- a/lib/wal/sources/Wal.hpp +++ b/lib/wal/sources/Wal.hpp @@ -6,6 +6,7 @@ #pragma once #include +#include #include #include #include "Exception/WalError.hpp" @@ -20,12 +21,8 @@ namespace WAL class Wal { private: - //! @brief The scene manager that allow multiple scene to work together. - Scene _scene; //! @brief The list of registered systems std::vector> _systems = {}; - //! @brief True if the engine should close after the end of the current tick. - bool _shouldClose = false; //! @brief Call the onUpdate of every system with every component void _update(std::chrono::nanoseconds dtime); @@ -39,13 +36,17 @@ namespace WAL //! @return True if all dependencies are met, false otherwise. static bool _hasDependencies(const Entity &entity, const System &system); public: + //! @brief The scene that contains entities. + std::shared_ptr scene; + //! @brief True if the engine should close after the end of the current tick. + bool shouldClose = false; //! @brief The time between each fixed update. static std::chrono::nanoseconds timestep; //! @brief Create a new system in place. //! @return The wal instance used to call this function is returned. This allow method chaining. template - Wal &addSystem(Types ...params) + Wal &addSystem(Types &&...params) { const std::type_info &type = typeid(T); auto existing = std::find_if(this->_systems.begin(), this->_systems.end(), [&type] (auto &sys) { @@ -53,7 +54,7 @@ namespace WAL }); if (existing != this->_systems.end()) throw DuplicateError("A system of the type \"" + std::string(type.name()) + "\" already exists."); - this->_systems.push_back(std::make_unique(params...)); + this->_systems.push_back(std::make_unique(std::forward(params)...)); return *this; } @@ -84,7 +85,6 @@ namespace WAL if (existing == this->_systems.end()) throw NotFoundError("A system of the type \"" + std::string(type.name()) + "\" could not be found."); return *static_cast(existing->get()); - } //! @brief Remove a system using it's type. @@ -122,7 +122,7 @@ namespace WAL auto lastTick = std::chrono::steady_clock::now(); std::chrono::nanoseconds fBehind(0); - while (!this->_shouldClose) { + while (!this->shouldClose) { auto now = std::chrono::steady_clock::now(); std::chrono::nanoseconds dtime = now - lastTick; fBehind += dtime; @@ -146,4 +146,4 @@ namespace WAL //! @brief A WAL can't be assigned. Wal &operator=(const Wal &) = delete; }; -} +} // namespace WAL \ No newline at end of file diff --git a/sources/Component/Keyboard/KeyboardComponent.hpp b/sources/Component/Keyboard/KeyboardComponent.hpp index f18e54a4..bd0f2ab7 100644 --- a/sources/Component/Keyboard/KeyboardComponent.hpp +++ b/sources/Component/Keyboard/KeyboardComponent.hpp @@ -23,11 +23,11 @@ namespace BBM //! @brief pause key Key keyPause = KEY_ESCAPE; //! @brief move right key - Key keyRight = KEY_Q; + Key keyRight = KEY_A; //! @brief move left key Key keyLeft = KEY_D; //! @brief move up key - Key keyUp = KEY_Z; + Key keyUp = KEY_W; //! @brief move down key Key keyDown = KEY_S; diff --git a/sources/Component/Movable/MovableComponent.cpp b/sources/Component/Movable/MovableComponent.cpp index 2bbbde92..4fc9bc0c 100644 --- a/sources/Component/Movable/MovableComponent.cpp +++ b/sources/Component/Movable/MovableComponent.cpp @@ -19,4 +19,4 @@ namespace BBM { this->_acceleration += force; } -} \ No newline at end of file +} // namespace WAL \ No newline at end of file diff --git a/sources/Component/Movable/MovableComponent.hpp b/sources/Component/Movable/MovableComponent.hpp index 5266232a..7656a960 100644 --- a/sources/Component/Movable/MovableComponent.hpp +++ b/sources/Component/Movable/MovableComponent.hpp @@ -36,4 +36,4 @@ namespace BBM friend class MovableSystem; }; -} \ No newline at end of file +} // namespace WAL \ No newline at end of file diff --git a/sources/Component/Position/PositionComponent.cpp b/sources/Component/Position/PositionComponent.cpp index c237f845..b1b88f43 100644 --- a/sources/Component/Position/PositionComponent.cpp +++ b/sources/Component/Position/PositionComponent.cpp @@ -40,4 +40,4 @@ namespace BBM { return this->position.z; } -} \ No newline at end of file +} // namespace WAL \ No newline at end of file diff --git a/sources/Component/Position/PositionComponent.hpp b/sources/Component/Position/PositionComponent.hpp index 368934eb..0a34a8ca 100644 --- a/sources/Component/Position/PositionComponent.hpp +++ b/sources/Component/Position/PositionComponent.hpp @@ -39,4 +39,4 @@ namespace BBM //! @brief A position component is not assignable PositionComponent &operator=(const PositionComponent &) = delete; }; -} +} // namespace WAL \ No newline at end of file diff --git a/sources/Component/Renderer/CameraComponent.cpp b/sources/Component/Renderer/CameraComponent.cpp new file mode 100644 index 00000000..3f6c1239 --- /dev/null +++ b/sources/Component/Renderer/CameraComponent.cpp @@ -0,0 +1,17 @@ +// +// Created by Zoe Roux on 5/27/21. +// + +#include "CameraComponent.hpp" + +namespace BBM +{ + CameraComponent::CameraComponent(WAL::Entity &entity) + : Component(entity) + {} + + WAL::Component *BBM::CameraComponent::clone(WAL::Entity &entity) const + { + return new CameraComponent(entity); + } +} \ No newline at end of file diff --git a/sources/Component/Renderer/CameraComponent.hpp b/sources/Component/Renderer/CameraComponent.hpp new file mode 100644 index 00000000..1aa5cc38 --- /dev/null +++ b/sources/Component/Renderer/CameraComponent.hpp @@ -0,0 +1,28 @@ +// +// Created by Zoe Roux on 5/27/21. +// + +#pragma once + +#include + +namespace BBM +{ + //! @brief A class allowing one to place the camera in the scene. + //! @warning Only one CameraComponent is allowed on the scene. Using more than one result in undefined behaviors. + class CameraComponent : public WAL::Component + { + public: + //! @inherit + Component *clone(WAL::Entity &entity) const override; + + //! @brief Ctor + explicit CameraComponent(WAL::Entity &); + //! @brief A camera component is copy constructable. + CameraComponent(const CameraComponent &) = default; + //! @brief Default destructor. + ~CameraComponent() override = default; + //! @brief A camera component can't be assigned. + CameraComponent &operator=(const CameraComponent &) = delete; + }; +} \ No newline at end of file diff --git a/sources/Component/Renderer/Drawable2DComponent.hpp b/sources/Component/Renderer/Drawable2DComponent.hpp new file mode 100644 index 00000000..63aaaf2b --- /dev/null +++ b/sources/Component/Renderer/Drawable2DComponent.hpp @@ -0,0 +1,48 @@ +// +// Created by cbihan on 24/05/2021. +// + +#pragma once + +#include "Component/Component.hpp" +#include "Drawables/ADrawable2D.hpp" + +namespace BBM +{ + template + class Drawable2DComponent : public WAL::Component + { + public: + //! @brief The type of the component + T member; + + //! ctor + Drawable2DComponent(WAL::Entity &entity, T member) + : WAL::Component(entity), + member(std::move(member)) + {} + + //! ctor + template + explicit Drawable2DComponent(WAL::Entity &entity, Params &&...params) + : WAL::Component(entity), + member(std::forward(params)...) + {} + + //! @brief Clone a component for another or the same entity. + //! @param entity The entity that owns the ne component. + WAL::Component *clone(WAL::Entity &entity) const override + { + return new Drawable2DComponent(entity, this->member); + } + + //! @brief Default copy ctor + Drawable2DComponent(const Drawable2DComponent &) = default; + //! @brief Default dtor + ~Drawable2DComponent() override = default; + //! @brief Default assignment operator + Drawable2DComponent &operator=(const Drawable2DComponent &) = delete; + + + }; +} \ No newline at end of file diff --git a/sources/Component/Renderer/Drawable3DComponent.hpp b/sources/Component/Renderer/Drawable3DComponent.hpp new file mode 100644 index 00000000..e4f85321 --- /dev/null +++ b/sources/Component/Renderer/Drawable3DComponent.hpp @@ -0,0 +1,47 @@ +// +// Created by cbihan on 24/05/2021. +// + +#pragma once + +#include "Component/Component.hpp" +#include "Drawables/ADrawable3D.hpp" +#include "Model/Model.hpp" + +namespace BBM +{ + template + class Drawable3DComponent : public WAL::Component + { + public: + //! @brief The type of the component + T member; + + //! @brief ctor + Drawable3DComponent(WAL::Entity &entity, T member) + : WAL::Component(entity), + member(std::move(member)) + {} + + //! ctor + template + explicit Drawable3DComponent(WAL::Entity &entity, Params &&...params) + : WAL::Component(entity), + member(std::forward(params)...) + {} + + //! @brief Clone a component for another or the same entity. + //! @param entity The entity that owns the ne component. + WAL::Component *clone(WAL::Entity &entity) const override + { + return new Drawable3DComponent(entity, this->member); + } + + //! @brief Default copy ctor + Drawable3DComponent(const Drawable3DComponent &) = default; + //! @brief Default dtor + ~Drawable3DComponent() override = default; + //! @brief Default assignment operator + Drawable3DComponent &operator=(const Drawable3DComponent &) = delete; + }; +} \ No newline at end of file diff --git a/sources/Models/Vector2.hpp b/sources/Models/Vector2.hpp new file mode 100644 index 00000000..07904949 --- /dev/null +++ b/sources/Models/Vector2.hpp @@ -0,0 +1,166 @@ +// +// Created by Zoe Roux on 5/17/21. +// + + +#pragma once + +#include +#include +#include "Vector/Vector2.hpp" + +namespace BBM +{ + //! @brief A Vector2 data type. (templated to allow any kind of vector2) + template + class Vector2 + { + public: + //! @brief The x value of the vector + T x; + //! @brief The y value of the vector + T y; + + //! @brief Create a new nil vector2. + Vector2() + : x(0), y(0) + {} + + //! @brief Create a new vector2 representing a specific coordinate. + Vector2(T x, T y) + : x(x), y(y) + {} + + //! @brief A default destructor + ~Vector2() = default; + + bool operator==(const Vector2 &other) const + { + return this->x == other.x && this->y == other.y; + } + + bool operator!=(const Vector2 &other) const + { + return !this->operator==(other); + } + + template + Vector2 &operator+=(const Vector2 &vec) + { + this->x += vec.x; + this->y += vec.y; + return *this; + } + + template + Vector2 operator+(const Vector2 &vec) const + { + return Vector2(this->x + vec.x, this->y + vec.y); + } + + template + Vector2 &operator-=(const Vector2 &vec) + { + this->x -= vec.x; + this->y -= vec.y; + return *this; + } + + template + Vector2 &operator*=(T2 d) + { + this->x *= d; + this->y *= d; + return *this; + } + + template + Vector2 operator*(T2 d) const + { + return Vector2(this->x * d, this->y * d); + } + + template + Vector2 operator*(const Vector2 &b) const + { + return Vector2(this->x * b.x, this->y * b.y); + } + + template + Vector2 operator/=(const Vector2 &b) + { + this->x /= b.x; + this->y /= b.y; + return this; + } + + template + Vector2 operator/(const Vector2 &b) const + { + return Vector2(this->x / b.x, this->y / b.y); + } + + template + Vector2 operator/=(T2 b) + { + this->x /= b; + this->y /= b; + return this; + } + + template + Vector2 operator/(T2 b) const + { + return Vector2(this->x / b, this->y / b); + } + + template + double distance(const Vector2 &o) const + { + return std::sqrt(std::pow(this->x - o.x, 2) + std::pow(this->y - o.y, 2)); + } + + double magnitude() const + { + return std::sqrt(std::pow(this->x, 2) + std::pow(this->y, 2)); + } + + Vector2 normalize() + { + double mag = this->magnitude(); + + this->x /= mag; + this->y /= mag; + return *this; + } + + Vector2 normalized() const + { + T mag = this->magnitude(); + + return Vector2(this->x / mag, this->y / mag); + } + + Vector2 projection(const Vector2 &point) const + { + return (point * this) / std::pow(this->magnitude(), 2) * this; + } + + operator RAY::Vector2() const requires(std::is_same_v) + { + return RAY::Vector2(this->x, this->y); + } + }; + + typedef Vector2 Vector2f; + typedef Vector2 Vector2u; + typedef Vector2 Vector2i; +} + + +template +std::ostream &operator<<(std::ostream &s, const BBM::Vector2 &v) +{ + s << "Vector2<" << typeid(T).name() << ">("<< v.x << ", " << v.y << ")"; + return s; +} \ No newline at end of file diff --git a/sources/Models/Vector3.hpp b/sources/Models/Vector3.hpp index 094f6da9..5579b382 100644 --- a/sources/Models/Vector3.hpp +++ b/sources/Models/Vector3.hpp @@ -7,6 +7,7 @@ #include #include +#include "Vector/Vector3.hpp" namespace BBM { @@ -85,13 +86,13 @@ namespace BBM } template - Vector3 operator*(Vector3 &b) const + Vector3 operator*(const Vector3 &b) const { return Vector3(this->x * b.x, this->y * b.y, this->z * b.z); } template - Vector3 operator/=(Vector3 &b) + Vector3 operator/=(const Vector3 &b) { this->x /= b.x; this->y /= b.y; @@ -100,7 +101,7 @@ namespace BBM } template - Vector3 operator/(Vector3 &b) const + Vector3 operator/(const Vector3 &b) const { return Vector3(this->x / b.x, this->y / b.y, this->z / b.z); } @@ -152,6 +153,11 @@ namespace BBM { return (point * this) / std::pow(this->magnitude(), 2) * this; } + + operator RAY::Vector3() const requires(std::is_same_v) + { + return RAY::Vector3(this->x, this->y, this->z); + } }; typedef Vector3 Vector3f; @@ -159,6 +165,7 @@ namespace BBM typedef Vector3 Vector3i; } + template std::ostream &operator<<(std::ostream &s, const BBM::Vector3 &v) { diff --git a/sources/Runner/Runner.cpp b/sources/Runner/Runner.cpp index ff2dc933..7e0dce41 100644 --- a/sources/Runner/Runner.cpp +++ b/sources/Runner/Runner.cpp @@ -4,9 +4,27 @@ #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "Models/Vector2.hpp" +#include "Component/Renderer/CameraComponent.hpp" #include "Runner.hpp" #include "Models/GameState.hpp" +namespace RAY2D = RAY::Drawables::Drawables2D; +namespace RAY3D = RAY::Drawables::Drawables3D; + namespace BBM { void updateState(WAL::Wal &engine, GameState &state) @@ -15,11 +33,56 @@ namespace BBM // If you want to keep a scene loaded but not running, store it in the state.loadedScenes. // If you don't need the scene anymore, remember to remove it from the loadedScene array. + if (RAY::Window::getInstance().shouldClose()) + engine.shouldClose = true; + } + + void addSystems(WAL::Wal &wal) + { + wal.addSystem() + .addSystem() + .addSystem(); + } + + void enableRaylib(WAL::Wal &wal) + { + RAY::TraceLog::setLevel(LOG_WARNING); + RAY::Window &window = RAY::Window::getInstance(600, 400, "Bomberman", FLAG_WINDOW_RESIZABLE); + + wal.addSystem>(); + + wal.addSystem(window) + .addSystem>(); + wal.addSystem(window); + } + + std::shared_ptr loadGameScene() + { + auto scene = std::make_shared(); + scene->addEntity("cube") + .addComponent() + .addComponent>(Vector2f(), Vector2f(10, 10), RED) + .addComponent() + .addComponent() + .addComponent();; + scene->addEntity("player") + .addComponent() + .addComponent>("assets/player/player.iqm", std::make_pair(MAP_DIFFUSE, "assets/player/blue.png")) + .addComponent() + .addComponent() + .addComponent(); + scene->addEntity("camera") + .addComponent(10, 10, 10) + .addComponent(); + return scene; } int run() { WAL::Wal wal; + addSystems(wal); + enableRaylib(wal); + wal.scene = loadGameScene(); try { wal.run(updateState); diff --git a/sources/System/Controllable/ControllableSystem.cpp b/sources/System/Controllable/ControllableSystem.cpp index 5b596d76..3c6dc01c 100644 --- a/sources/System/Controllable/ControllableSystem.cpp +++ b/sources/System/Controllable/ControllableSystem.cpp @@ -22,6 +22,6 @@ namespace BBM auto &controllable = entity.getComponent(); auto &movable = entity.getComponent(); - movable.addForce(Vector3f(controllable.moveX, 0, controllable.moveZ)); + movable.addForce(Vector3f(controllable.moveX, controllable.jump, controllable.moveZ)); } } \ No newline at end of file diff --git a/sources/System/GridCentered/GridCenteredSystem.hpp b/sources/System/GridCentered/GridCenteredSystem.hpp index 206e9eca..e84e65fb 100644 --- a/sources/System/GridCentered/GridCenteredSystem.hpp +++ b/sources/System/GridCentered/GridCenteredSystem.hpp @@ -12,7 +12,7 @@ namespace BBM class GridCenteredSystem : public WAL::System { public: - void onFixedUpdate(Entity &entity) override; + void onFixedUpdate(WAL::Entity &entity) override; //! @brief A default constructor GridCenteredSystem(); diff --git a/sources/System/Keyboard/KeyboardSystem.cpp b/sources/System/Keyboard/KeyboardSystem.cpp index a9dd52d4..686cd8bf 100644 --- a/sources/System/Keyboard/KeyboardSystem.cpp +++ b/sources/System/Keyboard/KeyboardSystem.cpp @@ -3,6 +3,7 @@ // Edited by Benjamin Henry on 2021-05-20. // +#include #include "KeyboardSystem.hpp" #include "Component/Keyboard/KeyboardComponent.hpp" #include "Component/Controllable/ControllableComponent.hpp" @@ -25,23 +26,23 @@ namespace BBM const auto &keyboard = entity.getComponent(); auto &controllable = entity.getComponent(); - const std::map keyPressedMap = { + const std::map keyPressedMap = { {keyboard.keyJump, controllable.jump}, {keyboard.keyBomb, controllable.bomb}, {keyboard.keyPause, controllable.pause} }; for (auto key : keyPressedMap) - key.second = Keyboard::isPressed(key.first); + key.second = Keyboard::isDown(key.first); controllable.moveX = 0; controllable.moveZ = 0; - if (Keyboard::isPressed(keyboard.keyRight)) + if (Keyboard::isDown(keyboard.keyRight)) controllable.moveX += 1; - if (Keyboard::isPressed(keyboard.keyLeft)) - controllable.moveX -= 1; - if (Keyboard::isPressed(keyboard.keyUp)) - controllable.moveX += 1; - if (Keyboard::isPressed(keyboard.keyDown)) + if (Keyboard::isDown(keyboard.keyLeft)) controllable.moveX -= 1; + if (Keyboard::isDown(keyboard.keyUp)) + controllable.moveZ += 1; + if (Keyboard::isDown(keyboard.keyDown)) + controllable.moveZ -= 1; } } \ No newline at end of file diff --git a/sources/System/Movable/MovableSystem.cpp b/sources/System/Movable/MovableSystem.cpp index 2f699ece..1c439345 100644 --- a/sources/System/Movable/MovableSystem.cpp +++ b/sources/System/Movable/MovableSystem.cpp @@ -5,12 +5,11 @@ #include "Component/Position/PositionComponent.hpp" #include "MovableSystem.hpp" #include "Component/Movable/MovableComponent.hpp" -#include "Wal.hpp" namespace BBM { MovableSystem::MovableSystem() - : System({ + : WAL::System({ typeid(MovableComponent), typeid(PositionComponent) }) @@ -21,8 +20,8 @@ namespace BBM auto &movable = entity.getComponent(); auto &position = entity.getComponent(); - position.position += movable._velocity * WAL::Wal::timestep.count(); - movable._velocity = movable._acceleration * WAL::Wal::timestep.count(); + position.position += movable._velocity; + movable._velocity = movable._acceleration; movable._acceleration = Vector3f(); } -} \ No newline at end of file +} // namespace WAL \ No newline at end of file diff --git a/sources/System/Movable/MovableSystem.hpp b/sources/System/Movable/MovableSystem.hpp index 08555d26..51a56ea9 100644 --- a/sources/System/Movable/MovableSystem.hpp +++ b/sources/System/Movable/MovableSystem.hpp @@ -6,6 +6,7 @@ #pragma once #include "System/System.hpp" +#include "Entity/Entity.hpp" namespace BBM { @@ -25,4 +26,4 @@ namespace BBM //! @brief A movable system is assignable. MovableSystem &operator=(const MovableSystem &) = default; }; -} +} // namespace WAL diff --git a/sources/System/Renderer/Render2DScreenSystem.cpp b/sources/System/Renderer/Render2DScreenSystem.cpp new file mode 100644 index 00000000..938d107f --- /dev/null +++ b/sources/System/Renderer/Render2DScreenSystem.cpp @@ -0,0 +1,19 @@ +// +// Created by Zoe Roux on 5/27/21. +// + +#include "Render2DScreenSystem.hpp" + +namespace BBM +{ + Render2DScreenSystem::Render2DScreenSystem(RAY::Window &window) + : WAL::System({}), + _window(window), + _camera(RAY::Vector2(10, 10), RAY::Vector2(), 0) + {} + + void Render2DScreenSystem::onSelfUpdate() + { + this->_window.useCamera(this->_camera); + } +} \ No newline at end of file diff --git a/sources/System/Renderer/Render2DScreenSystem.hpp b/sources/System/Renderer/Render2DScreenSystem.hpp new file mode 100644 index 00000000..12adaf34 --- /dev/null +++ b/sources/System/Renderer/Render2DScreenSystem.hpp @@ -0,0 +1,33 @@ +// +// Created by Zoe Roux on 5/27/21. +// + +#pragma once + +#include +#include + +namespace BBM +{ + class Render2DScreenSystem : public WAL::System + { + //! @brief The window to render on + RAY::Window &_window; + + //! @brief The camera used to render. + RAY::Camera::Camera2D _camera; + public: + //! @brief A method called after all entities that this system manage has been updated. + //! @note render on screen here + void onSelfUpdate() override; + + //! @brief ctor + explicit Render2DScreenSystem(RAY::Window &window); + //! @brief Default copy ctor + Render2DScreenSystem(const Render2DScreenSystem &) = default; + //! @brief Default dtor + ~Render2DScreenSystem() override = default; + //! @brief A render screen system can't be assigned. + Render2DScreenSystem &operator=(const Render2DScreenSystem &) = delete; + }; +} \ No newline at end of file diff --git a/sources/System/Renderer/RenderScreenSystem.cpp b/sources/System/Renderer/RenderScreenSystem.cpp new file mode 100644 index 00000000..5523ee48 --- /dev/null +++ b/sources/System/Renderer/RenderScreenSystem.cpp @@ -0,0 +1,32 @@ +// +// Created by Zoe Roux on 5/27/21. +// + +#include "RenderScreenSystem.hpp" +#include "Component/Renderer/CameraComponent.hpp" +#include "Component/Position/PositionComponent.hpp" + +namespace BBM +{ + RenderScreenSystem::RenderScreenSystem(RAY::Window &window) + : WAL::System({ + typeid(CameraComponent), + typeid(PositionComponent) + }), + _window(window), + _camera(Vector3f(), Vector3f(), Vector3f(0, 1, 0), 50, CAMERA_PERSPECTIVE) + {} + + void RenderScreenSystem::onSelfUpdate() + { + this->_window.draw(); + this->_window.clear(); + this->_window.useCamera(this->_camera); + } + + void RenderScreenSystem::onUpdate(WAL::Entity &entity, std::chrono::nanoseconds dtime) + { + const auto &pos = entity.getComponent(); + _camera.setPosition(pos.position); + } +} \ No newline at end of file diff --git a/sources/System/Renderer/RenderScreenSystem.hpp b/sources/System/Renderer/RenderScreenSystem.hpp new file mode 100644 index 00000000..e9b2ea85 --- /dev/null +++ b/sources/System/Renderer/RenderScreenSystem.hpp @@ -0,0 +1,37 @@ +// +// Created by cbihan on 26/05/2021. +// + +#pragma once + +#include "System/System.hpp" +#include "Camera/Camera2D.hpp" +#include "Window.hpp" + +namespace BBM +{ + class RenderScreenSystem : public WAL::System + { + //! @brief The window to render on + RAY::Window &_window; + + //! @brief The camera used to render. + RAY::Camera::Camera3D _camera; + public: + //! @brief A method called after all entities that this system manage has been updated. + //! @note render on screen here + void onSelfUpdate() override; + + //! @inherit + void onUpdate(WAL::Entity &entity, std::chrono::nanoseconds dtime) override; + + //! @brief ctor + explicit RenderScreenSystem(RAY::Window &window); + //! @brief Default copy ctor + RenderScreenSystem(const RenderScreenSystem &) = default; + //! @brief Default dtor + ~RenderScreenSystem() override = default; + //! @brief A render screen system can't be assigned. + RenderScreenSystem &operator=(const RenderScreenSystem &) = delete; + }; +} diff --git a/sources/System/Renderer/Renderer2DSystem.hpp b/sources/System/Renderer/Renderer2DSystem.hpp new file mode 100644 index 00000000..a1622c0d --- /dev/null +++ b/sources/System/Renderer/Renderer2DSystem.hpp @@ -0,0 +1,48 @@ +// +// Created by cbihan on 24/05/2021. +// + +#pragma once + +#include +#include "System/System.hpp" +#include "Entity/Entity.hpp" +#include "Component/Position/PositionComponent.hpp" +#include "Component/Renderer/Drawable2DComponent.hpp" +#include "Window.hpp" + +namespace BBM +{ + template + class Renderer2DSystem : public WAL::System + { + private: + //! @brief The class to render + RAY::Window &_window; + public: + explicit Renderer2DSystem() + : WAL::System({typeid(PositionComponent), typeid(Drawable2DComponent)}), + _window(RAY::Window::getInstance()) + { + } + + //! @brief Update the corresponding component of the given entity + //! @param entity The entity to update. + //! @param dtime The delta time. + void onUpdate(WAL::Entity &entity, std::chrono::nanoseconds) override + { + auto &comp = entity.getComponent>(); + auto &pos = entity.getComponent(); + + comp.member.setPosition({pos.getX(), pos.getY()}); + comp.member.drawOn(this->_window); + } + + //! @brief default copy ctor + Renderer2DSystem(const Renderer2DSystem &) = default; + //! @brief default dtor + ~Renderer2DSystem() override = default; + //! @brief Default assignment operator + Renderer2DSystem &operator=(const Renderer2DSystem &) = delete; + }; +} \ No newline at end of file diff --git a/sources/System/Renderer/Renderer3DSystem.hpp b/sources/System/Renderer/Renderer3DSystem.hpp new file mode 100644 index 00000000..8dba98f6 --- /dev/null +++ b/sources/System/Renderer/Renderer3DSystem.hpp @@ -0,0 +1,48 @@ +// +// Created by cbihan on 24/05/2021. +// + +#pragma once + +#include +#include "System/System.hpp" +#include "Entity/Entity.hpp" +#include "Component/Position/PositionComponent.hpp" +#include "Component/Renderer/Drawable3DComponent.hpp" +#include "Window.hpp" + +namespace BBM +{ + template + class Renderer3DSystem : public WAL::System + { + private: + //! @brief The class to render + RAY::Window &_window; + public: + //! @brief ctor + explicit Renderer3DSystem() + : WAL::System({typeid(PositionComponent), typeid(Drawable3DComponent)}), + _window(RAY::Window::getInstance()) + {} + + //! @brief Update the corresponding component of the given entity + //! @param entity The entity to update. + //! @param dtime The delta time. + void onUpdate(WAL::Entity &entity, std::chrono::nanoseconds) override + { + auto &comp = entity.getComponent>(); + auto &pos = entity.getComponent(); + + comp.member.setPosition(static_cast(pos.position)); + comp.member.drawOn(this->_window); + } + + //! @brief Default copy ctor + Renderer3DSystem(const Renderer3DSystem &) = default; + //! @brief Default dtor + ~Renderer3DSystem() override = default; + //! @brief Default assignment operator + Renderer3DSystem &operator=(const Renderer3DSystem &) = delete; + }; +} \ No newline at end of file diff --git a/sources/Util/vector.cpp b/sources/Util/vector.cpp deleted file mode 100644 index ff4c15e9..00000000 --- a/sources/Util/vector.cpp +++ /dev/null @@ -1,14 +0,0 @@ -/* -** EPITECH PROJECT, 2021 -** Bomberman -** File description: -** Vector -*/ - -#include "Vector/Vector3.hpp" -#include "Models/Vector3.hpp" - -RAY::Vector3 toRAY(const WAL::Vector3f &wal) -{ - return RAY::Vector3(wal.x, wal.y, wal.y); -} \ No newline at end of file diff --git a/sources/main.cpp b/sources/main.cpp index cd4efc41..43dccd7d 100644 --- a/sources/main.cpp +++ b/sources/main.cpp @@ -13,85 +13,41 @@ #include "Camera/Camera3D.hpp" #include "Controllers/Keyboard.hpp" #include "Drawables/2D/Text.hpp" +#include "Drawables/Image.hpp" #include "Drawables/3D/Grid.hpp" #include "Drawables/Texture.hpp" +#include "Drawables/3D/Circle.hpp" +#include "Drawables/2D/Circle.hpp" +#include "Drawables/3D/Cube.hpp" +#include "Drawables/3D/Sphere.hpp" #include "Model/Model.hpp" #include "Model/ModelAnimations.hpp" +#include "System/Renderer/Renderer3DSystem.hpp" +#include "System/Renderer/Renderer2DSystem.hpp" +#include "Component/Renderer/Drawable3DComponent.hpp" +#include "Component/Renderer/Drawable2DComponent.hpp" +#include "System/Renderer/RenderScreenSystem.hpp" #include "Vector/Vector3.hpp" #include "Window.hpp" +#include "TraceLog.hpp" +#include "Wal.hpp" -int demo() +const std::vectortextures = { + "blue", "cyan", "green", "purple", "red", "yellow" +}; + +std::string get_full_path(const std::string &color) { + std::string path = "assets/player/"; - // Initialization - //-------------------------------------------------------------------------------------- - const int screenWidth = 800; - const int screenHeight = 450; - RAY::Window &window = RAY::Window::getInstance(screenWidth, screenHeight, "Bidibidibop", FLAG_WINDOW_RESIZABLE); - RAY::Camera::Camera3D camera(RAY::Vector3(10.0f, 10.0f, 10.0f), - RAY::Vector3(0.0f, 0.0f, 0.0f), - RAY::Vector3(0.0f, 1.0f, 0.0f), - 45.0f, CAMERA_PERSPECTIVE - ); - RAY::Model model("assets/guy.iqm"); - RAY::Texture texture("assets/guytex.png"); - RAY::ModelAnimations animations("assets/guy.iqm"); - RAY::Drawables::Drawables3D::Grid grid(10, 1.0f); - RAY::Drawables::Drawables2D::Text instructionText("PRESS SPACE to PLAY MODEL ANIMATION", 10, {10, 20} , MAROON); - model.setTextureToMaterial(MAP_DIFFUSE, texture); - - RAY::Vector3 position(0.0f, 0.0f, 0.0f); // Set model position - - camera.setMode(CAMERA_FREE); // Set free camera mode - - window.setFPS(60); // Set our game to run at 60 frames-per-second - //-------------------------------------------------------------------------------------- - - // Main game loop - while (!window.shouldClose()) // Detect window close button or ESC key - { - // Update - //---------------------------------------------------------------------------------- - camera.update(); - - // Play animation when spacebar is held down - if (RAY::Controller::Keyboard::isDown(KEY_SPACE)) - { - animations[0].incrementFrameCounter(); - model.setAnimation(animations[0]); - } - //---------------------------------------------------------------------------------- - - // Draw - //---------------------------------------------------------------------------------- - window.setDrawingState(RAY::Window::DRAWING); - - window.clear(); - - window.useCamera(camera); - - window.draw(model, position, RAY::Vector3(1.0f, 0.0f, 0.0f), -90.0f, RAY::Vector3( 1.0f, 1.0f, 1.0f )); - - window.draw(grid); - - window.unuseCamera(); - - window.draw(instructionText); - - window.setDrawingState(RAY::Window::IDLE); - //---------------------------------------------------------------------------------- - } - - // De-Initialization - //-------------------------------------------------------------------------------------- - - window.close(); // Close window and OpenGL context - //-------------------------------------------------------------------------------------- - - return 0; + path += color; + path += ".png"; + return path; } + + void usage(const std::string &bin) { std::cout << "Bomberman." << std::endl @@ -106,6 +62,6 @@ int main(int argc, char **argv) usage(argv[0]); return 1; } - return demo(); +// return demo(); return BBM::run(); } diff --git a/tests/CallbackTest.cpp b/tests/CallbackTest.cpp index c0d43f15..534ca9f4 100644 --- a/tests/CallbackTest.cpp +++ b/tests/CallbackTest.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include "Entity/Entity.hpp" #include "Models/Callback.hpp" using namespace WAL;