Add cone support.

This commit is contained in:
Crozet Sébastien
2020-10-20 14:16:01 +02:00
parent 865ce8a8e5
commit d513c22d33
15 changed files with 257 additions and 18 deletions

View File

@@ -26,6 +26,7 @@ use rapier::geometry::{Collider, ColliderHandle, ColliderSet, Shape};
//#[cfg(feature = "fluids")]
//use crate::objects::FluidRenderingMode;
use crate::objects::capsule::Capsule;
use crate::objects::cone::Cone;
use crate::objects::cylinder::Cylinder;
use crate::objects::mesh::Mesh;
use rand::{Rng, SeedableRng};
@@ -419,6 +420,17 @@ impl GraphicsManager {
window,
)))
}
#[cfg(feature = "dim3")]
if let Some(cone) = shape.as_cone() {
out.push(Node::Cone(Cone::new(
handle,
cone.half_height,
cone.radius,
color,
window,
)))
}
}
/*