use amethyst_core::math::{Isometry3, Point3, Vector3};
use crate::objects::*;
pub trait ShapePhysicsServerTrait<N: crate::PtReal> {
fn create(&self, shape: &ShapeDesc<N>) -> PhysicsHandle<PhysicsShapeTag>;
fn update(&self, shape_tag: PhysicsShapeTag, shape_desc: &ShapeDesc<N>);
}
#[derive(Clone, Debug)]
pub enum ShapeDesc<N: crate::PtReal> {
Sphere {
radius: N,
},
Cube {
half_extents: Vector3<N>,
},
Capsule {
half_height: N,
radius: N,
},
Cylinder {
half_height: N,
radius: N,
},
Plane,
Convex {
points: Vec<Point3<N>>,
},
TriMesh {
points: Vec<Point3<N>>,
indices: Vec<Point3<usize>>,
},
Compound {
shapes: Vec<(Isometry3<N>, ShapeDesc<N>)>,
},
}