Skip to the content.

Physics3D

Ubuntu CI Badge MSVC CI Badge

A 3D physics engine, written in C++

Different Shapes Imgur Library with the history of the engine Other images can be found in pictures/

Project structure

The Physics3D project consists of 7 projects, each with its own role:

Dependencies

Application & engine & graphics

Setup Guide

CMake

If you suddenly can’t build the project anymore after pulling, perhaps one of the dependencies has changed. Try running install/clean.sh (Unix) or install/clean.bat (Windows) and rerun the setup script in the steps below.

If you still have build problems, please create an issue as we want setting up to be as easy as possible.

Platform independent using vcpkg

  1. Clone the repository
  2. If you do not have cmake already: download it from cmake.org/download/
  3. Run install/setup.sh (Unix) or install/setup.bat (Windows) from the Physics3D directory, this will install the necessary dependencies using vcpkg and create the build folders. It will also run cmake for debug and release. The dependencies can be installed on their own with install/setupDependencies.sh (Unix) or install/setupDependencies.bat (Windows) The build directories can be generated on their own with install/setupBuild.sh (Unix) or install/setupBuild.bat (Windows)
  4. Make the build from the build directory cd build with cmake --build .. To speed up the build, multithreaded building can be enabled by addding --parallel or -- -j 5 to the end of the build command.
  5. To run the application, you must also run it from the build directory: cd build Debug\.\application. Tests and benchmarks can be run from anywhere.

Ubuntu specific using apt-get

If you are using Ubuntu, we recommend using this installation method instead, as setting up using vcpkg can take a very long time. This method should get you a working version of the engine starting from a clean Ubuntu 18.04.

  1. Clone the repository
  2. Run install/setupUbuntu.sh from the Physics3D directory, this will install the necessary dependencies and create the build folders. It will also run cmake for debug and release. The dependencies can be installed on their own with install/setupDependenciesUbuntu.sh The build directories can be generated on their own with install/setupBuildUbuntu.sh
  3. Make the build from the build directory cd build with cmake --build .. To speed up the build, multithreaded building can be enabled by addding --parallel or -- -j 5 to the end of the build command.
  4. To run the application, you must also run it from the build directory: ./application. Tests and benchmarks can be run from anywhere.

Visual Studio

  1. Clone the repository
  2. The physics project on its own does not depend on any libraries, so if you wish to only build it then you may skip step 3.
  3. Download the dependencies, the Visual Studio configuration expects the libraries to be stored in Physics3D/lib/, includes should be stored in Physics3D/include/, with Physics3D/ the root folder of the git project. Your project structure should look like this:
    Physics3D/
    | - include/
    | | - freetype/
    | | | - (freetype headers)
    | | - GL
    | | | - (glew headers)
    | | - GLFW/
    | | | - (glfw3 headers)
    | | - imgui/
    | | | - imconfig.h
    | | | - imgui.h & .cpp
    | | | - imgui_draw.h
    | | | - imgui_internal.h
    | | | - imgui_widgets.cpp
    | | | - imgui_rectpack.h
    | | | - imgui_textedit.h
    | | | - imgui_truetype.h
    | | | - imgui_impl_glfw.h & .cpp
    | | | - imgui_impl_opengl3.h & .cpp
    | | - stb_image.h
    | | - ft2build.h
    | - lib/
    | | - freetype.lib
    | | - glew32.lib
    | | - glew32s.lib
    | | - glfw3.lib
    | - (Project and other files)
  4. The configuration should already be configured in the provided project and solution files
  5. You are done!

Authors

This list is inconclusive as new contributors are always welcome!

License

This project is licensed under the MIT License - see the LICENSE.md file for details