Pegasus is a cross-platform C++ game physics engine that is written with the data-oriented design in mind with minimum external dependencies (GLM and SPDLog). The aim of this project is to implement a robust, modern and simple to use API for game physics computations. The main motivation to write this engine was curiosity and desire to write physics code that utilizes a modern approach to software development, such as cache friendly code, high parallelization ability (CPU and GPU with CS), robust memory management with model C++ standard versions.
Tested on Ubuntu 16.04.
Install essential components:
sudo apt-get install build-essential git cmake gcc g++
Install dependencies:
sudo apt-get install freeglut3 freeglut3-dev libglew1.5 libglew1.5-dev libglu1-mesa libglu1-mesa-dev libgl1-mesa-glx libgl1-mesa-dev libxtst-dev xvfb libxmu-dev libxi-dev libxinerama-dev
Clone and initialize:
git clone git@github.com:Godlike/Pegasus.git && cd Pegasus
git submodule init && git submodule update --init --recursive
Build:
mkdir build && cd build && cmake .. && make && chmod +x ./output/PegasusPhysics
Run the demo:
./output/PegasusPhysics
Tested on Windows 10 VS 2017.
git@github.com:Godlike/Pegasus.git
PegasusDemo
project.Tested on Mac OS High Sierra.
git clone git@github.com:Godlike/Pegasus.git && cd Pegasus
git submodule init && git submodule update --init --recursive
mkdir build && cd build && cmake .. && make && chmod +x ./output/PegasusPhysics
./output/PegasusPhysics
Plane
Box
Sphere
Collision detection is handled using custom implementations of Jacobi Eigenvalue, Quickhull Convex Hull, Half-Edge Data Structure, CSO, GJK and EPA algorithms.
Collision resolution is based on the constraint collision model and implemented using such techniques as Sequential Impules, Restitution Slop, and Warm Starting to help improve overall stabity of the system.
Pegasus provides an API for creation of Dynamic and Static rigid bodies. Creating new simulation is as simple as creation new Scene
object, and population of the new Scene
could be peformd trought high-level OOP based API or trough low level Functional handle-based API, which provides developer with the flexibily when performas is needed.