Skip to content

Instantly share code, notes, and snippets.

@XMPPwocky
Created November 18, 2014 21:15
Show Gist options
  • Save XMPPwocky/f351a55d1b30b7d9569f to your computer and use it in GitHub Desktop.
Save XMPPwocky/f351a55d1b30b7d9569f to your computer and use it in GitHub Desktop.
#[test]
fn foo() {
let mut world = World::new();
let b1 = Rc::new(RefCell::new(Body::Static {
shape: box ncollide::shape::Ball::new(1.0),
transform: na::Iso3::new(na::zero(), na::zero())
}));
world.add(b1.clone());
let s = ncollide::shape::Ball::new(1.0);
let m = na::Iso3::new(na::Vec3::new(2.5, 0.0, 0.0), na::zero());
let d = na::Vec3::new(-1., 0., 0.);
let cast = world.cast_shape(&s, &m, d);
panic!("{}", cast.unwrap().0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment