Skip to content

Implement generic integrators for the physics world.  #40

@dkushner

Description

@dkushner

As you mentioned on the Gitter, I think working towards a generic integrator implementation would be an excellent step towards getting this wonderful project production ready. As far as I can tell (and that's not terribly far considering I've only just started to get a handle on the code base), all of the important pieces seem to be in place.

What design approach were you thinking about for this feature and does this approach sound reasonable? If I understand correctly, the current dependency tree for the systems in order of actual execution looks something like:

SpatialSortSystem -> CollisionSystem -> SolverSystem

Where the collision system relies on the spatial sort being performed to make the BVT query more efficient and the solver system relies on the contact events published by the collision system. Furthermore, the solver system appears to be doing the actual force integration as well as the contact resolution. Is the idea to make the actual integration strategy pluggable by the end user or to simply improve the logic that is already present?

At the very least, it would certainly pay to implement island/sleep detection to be able to prune out inactive bodies and more efficiently parallelize integration. Should also consider supporting linear and angular dampening.

Possible implementations for the integrators include:

  • Symplectic Euler
  • RK4
  • Verlet

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions