qu3e is a compact, light-weight and fast 3D physics engine in C++. It is has been specifically created to be used in games.

It is portable with no external dependencies other than various standard c header files (such as cassert and cmath). qu3e is designed to have an extremely simple interface for creating and manipulating rigid bodies.

qu3e is of particular interest to those in need of a fast and simple 3D physics engine, without spending too much time learning about how the whole engine works. In order to keep things very simple and friendly for new users, only box collision is supported. No other shapes are supported (capsules and spheres may be added in the future if requested).

Since qu3e is written in C++ is intended for users familiar with C++. The inner-code of qu3e has quite a few comments and is a great place for users to learn the workings of a 3D physics engine.

qu3e stands for "cube", since the 3 looks slightly like the letter b and boxes (or cubes!) are the primary type of collision object.

Features

  • Extremely simple and friendly to use API
  • 3D Oriented Bounding Box (OBB) collision detection and resolution
  • Discrete collision detection
  • 3D Raycasting into the world (see RayPush.h in the demo for example usage)
  • 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
  • Renderer agnostic debug drawing interface
  • Dynamic AABB tree broad phase
  • Highly accurate collision manifold generation via the Separating Axis Theorem
  • Collision layers
  • Axis of rotation locking (x, y or z axes)
  • Modifiable q3Alloc and q3Free functions for custom memory allocation
  • Internal heaps and dynamic arrays for memory management, uses q3Alloc/q3Free
  • Scene dump -- Can output a log file of C++ code to re-create a physics scene

License

The qu3e project is licensed under the zlib license.

Resources