Created
July 19, 2017 04:41
-
-
Save MichaelShaw/4057fa515aff0c3277788753cd0bf729 to your computer and use it in GitHub Desktop.
ncollide: Cuboid Cylinder inconsistent case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use nalgebra as na; | |
use ncollide as nc; | |
use nalgebra::{Isometry3, Vector3}; | |
use ncollide::shape::{Cuboid, Cylinder}; | |
let cyl = Cylinder::new(0.925, 0.5); | |
let cyl_at = Isometry3::new(Vector3::new(10.97, 0.925, 61.02), na::zero()); | |
let cuboid = Cuboid::new(Vector3::new(0.05, 0.75, 0.5)); | |
let cuboid_at = Isometry3::new(Vector3::new(11.52, 0.75, 60.5), na::zero()); | |
let distance = nc::query::distance(&cyl_at, &cyl, | |
&cuboid_at, &cuboid); | |
let proximity = nc::query::proximity(&cyl_at, &cyl, | |
&cuboid_at, &cuboid, | |
0.1); | |
let contact = nc::query::contact(&cyl_at, &cyl, | |
&cuboid_at, &cuboid, | |
10.0); | |
println!("distance -> {:?}", distance); | |
println!("proximity -> {:?}", proximity); | |
println!("contact -> {:?}", contact); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment