1use collider_shape::{Shape, ShapeType};
2
3pub struct Mesh {
5 pub path: String,
7}
8
9impl Mesh {
10 pub fn new(path: String) -> Self {
12 Mesh { path }
13 }
14}
15
16impl Shape for Mesh {
17 fn is_convex(&self) -> bool {
18 false
19 }
20
21 fn clone_box(&self) -> Box<dyn Shape + Send + Sync> {
22 Box::new(Mesh {
23 path: self.path.clone(),
24 })
25 }
26
27 fn get_shape_type(&self) -> ShapeType {
28 ShapeType::Mesh
29 }
30
31 fn get_mesh_path(&self) -> Option<String> {
32 Some(self.path.clone())
33 }
34}