A 2D Physics Engine written in C++, supporting circles and orientable, non-regular convex polygons.

Overview

PhysicsEngine

A basic physics engine supporting circles and orientable non-regular convex polygons. Oh, and it has undamped springs and strings.

Demo

The demo has some basic examples, and uses SDL for rendering.

Controls:

  • S to toggle stepping mode
  • Space to step through frames when stepping mode is activated

Interface

Everything is in the PhysicsEngine namespace.

PhysicsManager is the class which handles everything else. Just feed it the RigidBody instances you want it to manage, and it'll do the rest for you.

PhysicsManager:

  • update(float dt) : Updates the physics (currently does the same thing as step)

  • step(float dt) : Updates all RigidBody and Constraint objects tracked by the manager

  • add_body(RigidBody body) : Adds the RigidBody instance to the list of tracked objects. These will get updated every time step is called.

  • add_constraint(Constraint* constraint) : Adds the Constraint pointer to the list of tracked objects. These will get updated every time step is called.

  • get_bodies() : Returns a reference to the vector of RigidBody instances. Most useful for rendering the objects. This should really be read-only. Modify at your own risk.

  • get_constraints() : Returns a reference to the vector of Constraint pointers. Most useful for rendering the objects. This should really be read-only. Modify at your own risk.

  • TODO set_constants

RigidBody:

  • TODO
  • It needs a Shape pointer

Circle:

  • TODO
  • It inherits from Shape

Polygon:

  • TODO
  • It inherits from Shape

Constraint:

  • TODO
  • Needs pointers to two RigidBody instances.
Owner
ThePythonator
ThePythonator
Phyxed is a 2D physics engine with support for fixed point math.

Phyxed is a 2D physics engine with support for fixed point math.

Anders Elfgren 23 Jan 18, 2022
Horde3D is a small 3D rendering and animation engine. It is written in an effort to create an engine being as lightweight and conceptually clean as possible.

Horde3D Horde3D is a 3D rendering engine written in C++ with an effort being as lightweight and conceptually clean as possible. Horde3D requires a ful

Volker Vogelhuber 1.2k Jun 22, 2022
A multi core friendly rigid body physics and collision detection library suitable for games and VR applications.

A multi core friendly rigid body physics and collision detection library suitable for games and VR applications.

null 1.8k Jun 24, 2022
graphics and computational physics framework

atto Graphics and computational physics research framework: aligned memory allocation, string manipulation, file IO, etc. 2-, 3- and 4-dimensional vec

Carlos Correia 1 Oct 25, 2021
Multi-Joint dynamics with Contact. A general purpose physics simulator.

Multi-Joint dynamics with Contact. A general purpose physics simulator.

DeepMind 4.5k Jun 28, 2022
Brand new engine with new and QoL features. Grafex is Psych engine with some additions and Better graphics

Friday Night Funkin' - Graphex Engine Credits: Grafex Mod aka Psych Graphic Rework: Xale - Lead Coding, Artist PurpleSnake - Second Coder Psych Engine

Xale 2 Jun 27, 2022
Vire is a C++ voxel rendering engine. It is written in C++14 and uses OpenGL for graphics.

Vire Vire is a C++ voxel rendering engine. It is written in C++14 and uses OpenGL for graphics. Downloads If you'd just like to just download and try,

null 35 Jun 25, 2022
Open 3D Engine (O3DE) is an Apache 2.0-licensed multi-platform AAA Open 3D Engine

Open 3D Engine (O3DE) is an Apache 2.0-licensed multi-platform 3D engine that enables developers and content creators to build AAA games, cinema-quality 3D worlds, and high-fidelity simulations without any fees or commercial obligations.

O3DE 4.9k Jun 29, 2022
ORE (OpenGL Rendering Engine) is a rendering engine developed for my college minor project assessment.

ORE (OPENGL RENDERING ENGINE) What is ORE? ORE(OpenGL Rendering Engine) is a rendering engine with great and easy to use UI that allows the user to lo

HARSHIT BARGUJAR 4 Dec 20, 2021
Software RayTracing engine written in C++ without the usage of any libraries.

Software Raytracing Engine This is a software unidirectional raytracing engine, fully written in C++17, with no dependencies or external libraries use

Makar Ivashko 2 Jun 23, 2022
Cross-platform 2D and 3D game engine.

Urho3D Urho3D is a free lightweight, cross-platform 2D and 3D game engine implemented in C++ and released under the MIT license. Greatly inspired by O

null 4k Jun 27, 2022
Dear PyGui 3D Engine (early development) and Graphics API demos.

Marvel This repo is the working location of the eventual Dear PyGui 3D Engine. It also contains several single file examples of creating a triangle wi

Jonathan Hoffstadt 79 Jun 29, 2022
appleseed is an open source, physically-based global illumination rendering engine primarily designed for animation and visual effects.

appleseed is an open source, physically-based global illumination rendering engine primarily designed for animation and visual effects.

appleseedhq 1.9k Jul 1, 2022
Linux/X11 tool for intercepting mouse events and executing commands. Written in Kotlin Native.

XMG XMG (X11 Mouse Grabber) is a Linux/X11 tool for intercepting mouse button press events and triggering actions. It's a way of making use of the ext

Eduardo Fonseca 12 Sep 11, 2021
Software ray tracer written from scratch in C that can run on CPU or GPU with emphasis on ease of use and trivial setup

A minimalist and platform-agnostic interactive/real-time raytracer. Strong emphasis on simplicity, ease of use and almost no setup to get started with

Arnon Marcus 44 May 18, 2022
physically based renderer written in DX12 with image-based lighting, classic deffered and tiled lighting approaches

Features Classical Deferred Renderer Physically Based shading Image Based Lighting BRDF Disney model (Burley + GGX) Tangent space normal mapping Reinh

Alena 35 Jun 2, 2022
Tetris written with C++ and OpenGL.

Tetrec This is yet another Tetris game, which is in 3D, written using C++ and OpenGL 2.1, aiming at being lightweight towards not-so-beefy computers (

Lê Duy Quang 14 Jan 17, 2022
Yet another Chip-8 interpreter, this time written in C++ using GLFW and OpenGL as its graphics library 💻

Yet another Chip-8 interpreter, but this time with a beautiful interface ??

Akshit Garg 26 Jun 4, 2022
Metal-cpp is a low-overhead C++ interface for Metal that helps developers add Metal functionality to graphics apps, games, and game engines that are written in C++.

About metal-cpp is a low overhead and header only C++ interface for Metal that helps developers add Metal functionality to graphics applications that

Бранимир Караџић 138 Jun 27, 2022