physics2d 0.6.0

Yet another 2D physics engine, but with Iron power.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
mod naive;
mod bounds_tree;

pub use self::naive::NaiveBroadPhase;
pub use self::bounds_tree::BoundsTreeBroadPhase;

use world::{Bodies, ConstraintsMap, BodyPair, Body};
use collision::ContactConstraint;

pub type ProxyId = usize;

pub trait BroadPhase {
    fn new_potential_pairs(&self, bodies: &Bodies, constraints: &mut ConstraintsMap<ContactConstraint>);
    
    fn create_proxy(&mut self, body: &Body) -> ProxyId;
    fn destroy_proxy(&mut self, proxy_id: ProxyId);
    fn update_proxy(&mut self, proxy_id: ProxyId, body: &Body);
}