All Projects → dimforge → Nphysics

dimforge / Nphysics

Licence: apache-2.0
2 and 3-dimensional rigid body physics engine for Rust.

Programming Languages

rust
11053 projects
shell
77523 projects

Projects that are alternatives of or similar to Nphysics

Matter Js
a 2D rigid body physics engine for the web ▲● ■
Stars: ✭ 12,522 (+718.43%)
Mutual labels:  physics-engine, physics, rigid-bodies
Physac
2D physics header-only library for videogames developed in C using raylib library.
Stars: ✭ 151 (-90.13%)
Mutual labels:  physics-engine, physics
P2.js
JavaScript 2D physics library
Stars: ✭ 2,367 (+54.71%)
Mutual labels:  physics-engine, physics
Legion-Engine
Rythe is a data-oriented C++17 game engine built to make optimal use of modern hardware.
Stars: ✭ 502 (-67.19%)
Mutual labels:  physics, physics-engine
ign-physics
Abstract physics interface designed to support simulation and rapid development of robot applications.
Stars: ✭ 40 (-97.39%)
Mutual labels:  physics, physics-engine
Libbulletjme
A JNI interface to Bullet Physics and V-HACD
Stars: ✭ 55 (-96.41%)
Mutual labels:  physics, rigid-bodies
Py3ODE
Port of PyODE for Python 3
Stars: ✭ 29 (-98.1%)
Mutual labels:  physics, physics-engine
Specs Physics
nphysics integration for the Specs entity component system
Stars: ✭ 94 (-93.86%)
Mutual labels:  physics-engine, physics
kosm
Kosm for Android source code
Stars: ✭ 33 (-97.84%)
Mutual labels:  physics, physics-engine
Torque
2d 纯计算高性能刚体物理引擎
Stars: ✭ 62 (-95.95%)
Mutual labels:  physics, physics-engine
Planck.js
2D JavaScript Physics Engine
Stars: ✭ 4,149 (+171.18%)
Mutual labels:  physics-engine, rigid-bodies
Physics3d
A 3D physics engine
Stars: ✭ 101 (-93.4%)
Mutual labels:  physics-engine, physics
Tbtk
A C++ library for solving second-quantized Hamiltonians
Stars: ✭ 89 (-94.18%)
Mutual labels:  physics
Micro Racing
🚗 🏎️ 🎮 online 3D multiplayer neural networks based racing game
Stars: ✭ 100 (-93.46%)
Mutual labels:  physics-engine
Refractiveindex.info Database
Database of optical constants
Stars: ✭ 87 (-94.31%)
Mutual labels:  physics
Thephysicshub
The Physics Hub is an open source physics simulations project that is being developed by physics students worldwide and aims to deliver clear and easy to understand physics simulations free for everyone!
Stars: ✭ 88 (-94.25%)
Mutual labels:  physics
Ode4j
Java 3D Physics Engine & Library
Stars: ✭ 105 (-93.14%)
Mutual labels:  physics
Webots
Webots Robot Simulator
Stars: ✭ 1,324 (-13.46%)
Mutual labels:  physics-engine
Bout Dev
BOUT++: Plasma fluid finite-difference simulation code in curvilinear coordinate systems
Stars: ✭ 87 (-94.31%)
Mutual labels:  physics
Buoyancysystem
A system for buoyancy and boat physics in Unreal Engine 4.
Stars: ✭ 87 (-94.31%)
Mutual labels:  physics

crates.io

crates.io (nphysics2d) crates.io (nphysics3d) Build status

Users guide | 2D Documentation | 3D Documentation | Forum

⚠️**This crate is now passively-maintained. It is being superseded by the Rapier project.**⚠️


nphysics

nphysics is a 2 and 3-dimensional physics engine for games and animations. It uses ncollide for collision detection, and nalgebra for vector/matrix math. 2D and 3D implementations both share the same code!

Examples are available in the examples2d and examples3d directories. Interactive 3D are available there. Because those demos are based on WASM and WebGl 1.0 they should work on most modern browsers. Feel free to ask for help and discuss features on the official user forum.

Why another physics engine?

There are a lot of physics engine out there. However having a physics engine written in Rust is much more fun than writing bindings and has several advantages:

  • It shows that Rust is suitable for soft real-time applications. − It features an efficient implementation of multibodies using the reduced-coordinates approach. Constraint-based joints are also supported.
  • It shows that there is no need to write two separate engines for 2D and 3D: genericity wrt the dimension is possible (modulo low level arithmetic specializations for each dimension).
  • In a not-that-near future, C++ will die of ugliness. Then, people will search for a physics engine and nphysics will be there, proudly exhibiting its Rusty sexiness.

Features

  • Static, dynamic, and kinematic rigid bodies.
  • Common convex primitives: box, ball, convex polyhedron.
  • Concave geometries built from convex primitives: compound geometries, triangle mesh, polylines.
  • Multibodies using reduced-coordinates approaches or constraints-based joints.
  • Multibody joint limits and motors.
  • Stable stacking due to non-linear a position-based penetration correction and one-shot contact manifold generation.
  • Island based sleeping (objects deactivation when they are at rest).
  • Ray casting.
  • Swept sphere based continuous collision detection.
  • Ball-in-socket joint.
  • FixedJoint joint.
  • Sensors.
  • Deformable bodies (aka. soft-bodies)
  • Kinematic bodies
  • WASM support

What is missing?

nphysics is a very young library and needs to learn a lot of things to become a grown up. Many missing features are because of missing features on ncollide. Features missing from nphysics itself include:

  • more joints, joint limits, joint motors and breakable joints.
  • parallel pipeline
  • GPU-based pipeline

Dependencies

The libraries needed to compile the physics engine are:

  • ncollide: the collision detection library.
  • nalgebra: the linear algebra library.

The libraries needed to compile the examples are:

  • kiss3d: the 3d graphics engine.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].