RandyGaul/qu3e logo

RandyGaul/qu3e

Free

Lightweight and Simple 3D Open Source Physics Engine in C++

FreeFree tier
Type
Open Source

About RandyGaul/qu3e

qu3e is a compact, lightweight, and fast 3D physics engine written in C++, specifically designed for use in games. It focuses on simplicity and ease of use, providing an extremely simple API for creating and manipulating rigid bodies. The engine supports discrete collision detection with 3D oriented bounding boxes (OBB), raycasting, AABB and point queries, collision event callbacks, sensors (collision volumes), and aggregate rigid bodies composed of multiple boxes. It includes features like box stacking, islanding and sleeping for CPU optimization, a renderer-agnostic debug drawing interface, dynamic AABB tree broad phase, collision layers, and axis locking. The engine is portable with no external dependencies beyond standard C header files, and its inner code is heavily commented, making it a great resource for learning the workings of a 3D physics engine. Only box collision is supported; no other shapes are currently available. The repository has been archived as read-only since November 2022.

Key Features

Extremely simple and friendly API
3D Oriented Bounding Box (OBB) collision detection and resolution
Discrete collision detection
3D raycasting into the world
Ability to query the world with AABBs and points
Callbacks for collision events
Sensors (collision volumes)
Ability to create an aggregate rigid body composed of any number of boxes
Box stacking
Islanding and sleeping for CPU optimization

Pros & Cons

Pros
  • Extremely simple and clean API easy to integrate
  • Portable with no external dependencies
  • Lightweight and fast performance
  • Heavily commented source code aids learning
  • Includes useful features like raycasting, sensors, and scene dump
  • Supports box stacking and sleeping for optimization
  • Custom memory allocation allows fine-grained control
Cons
  • Only box (OBB) collision is supported; no spheres, capsules, or other shapes
  • Repository is archived and read-only as of November 2022 (no active development)
  • Limited feature set compared to full-featured engines like Bullet
  • Written in C++ only, not accessible for non-C++ developers
  • No built-in rendering or audio integration (expected for a physics engine)

Best For

Game physics simulation (rigid bodies, collisions, stacking)Learning and understanding the internals of a 3D physics engineRapid prototyping of physics interactions in C++ projectsEducational demonstrations of collision detection algorithms (SAT, broad phase)

FAQ

What is qu3e?
qu3e is a lightweight, fast 3D physics engine written in C++, specifically designed for games. It stands for 'cube' because boxes (or cubes) are the primary collision object.
What collision shapes does qu3e support?
Currently, only box (3D Oriented Bounding Box) collision is supported. Other shapes like capsules and spheres may be added in the future if requested.
Is qu3e still actively maintained?
No, the qu3e repository was archived by the owner on November 30, 2022, and is now read-only. No further updates are expected.
How do I use qu3e in my project?
Include the single header 'q3.h'. Create a q3Scene with a fixed timestep (e.g., 1.0/60.0). Define a q3BodyDef, create rigid bodies, attach boxes, and run the simulation step.
What are the dependencies of qu3e?
qu3e has no external dependencies other than standard C header files like cassert and cmath.