dmech ~master

3D physics engine


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

Build Status DUB Package License

dmech

dmech is discontinued. If you need a mature physics engine to use with D, we recommend Newton Dynamics and corresponding BindBC binding.

dmech stands for "D mechanics": it is a real-time 3D physics engine written in D language, capable of simulating rigid body dynamics. It is more suitable for computer games than scientific simulations: the goal is to convince a player, rather than giving accurate results. dmech is GC-free and fully platform-independent, it can be used with any API or graphics engine.

Screenshots

Screenshot1 Screenshot2 Screenshot3

Features

  • Impulse-based rigid body dynamics with iterative SI solver
  • High-performance collision detection (MPR algorithm)
  • Basic geometry shapes (sphere, box, cylinder, cone, ellipsoid)
  • Support for any convex shape defined by support mapping
  • Multiple geometries per body
  • Arbitrary static trimeshes (collision detection is optimized via BVH)
  • Body constraints: distance, angular, slider, ball-socket, prismatic, hinge
  • Persistent contact cache
  • Ray cast support
  • Ownership-based memory management
  • Partial C API

Dependencies

dmech heavily relies on dlib - a collection of utility libraries for D, including linear math and computational geometry functionality.

Documentation

See tutorials.

Usage examples

You can find some simple examples in demos directory.

License

Copyright (c) 2013-2025 Timur Gafarov. Distributed under the Boost Software License, Version 1.0. (See accompanying file COPYING or at http://www.boost.org/LICENSE10.txt)

Authors:
  • Timur Gafarov
Dependencies:
dlib
Versions:
0.4.1 2020-Jul-30
0.4.0 2019-Jun-27
0.3.1 2017-Nov-12
0.3.0 2017-Jan-03
0.2.6 2015-Oct-04
Show all 14 versions
Download Stats:
  • 0 downloads today

  • 1 downloads this week

  • 1 downloads this month

  • 1286 downloads total

Score:
2.4
Short URL:
dmech.dub.pm