Skip to content
/ bad3d Public

a 3d physics engine in rust. not really a serious project.

License

Notifications You must be signed in to change notification settings

thomcc/bad3d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

a toy 3d physics engine in rust

eventually this might be a good physics engine. at the moment, i'm still working out a bunch of it's bugs. caveat emptor.

if you're brave, some nice demos are in the examples. i recommend cargo run --release --example phys (TODO: screenshots). note: currently debug assertions are on even for the release build. this is because the non-release build is unusable, but if i increase the optimization level in [profile.dev], rust-analyzer gets noticably slower. so, consider disabling that before running the examples, since this code is extremely debug_assert heavy.

this was a pretty early rust project of mine, and i abandoned it for a while, and am only now getting back to making it not embarassing. it's... still getting there.

features

  • 3d collision detection of arbitrary convex solids
    • via GJK + EPA.
  • 3d rigidbody simulation with a vareity of constraints
    • immediate-mode api for specifying constraints (i'm still deciding if this is worth the trouble)
  • convex decomposition.
    • TODO: make the API for this less roundabout
  • constructive solid geometry (CSG) via BSP trees
    • TODO: better integrate this with the rest of the API
  • convex hull computation (both exact and approximate)
  • many routines are SIMD accelerated when on x86
  • a variety of exciting bugs
  • ...

About

a 3d physics engine in rust. not really a serious project.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages