diff --git a/strafe-client/src/model_physics.rs b/strafe-client/src/model_physics.rs index bb50252..1adfd41 100644 --- a/strafe-client/src/model_physics.rs +++ b/strafe-client/src/model_physics.rs @@ -84,11 +84,11 @@ pub trait MeshQuery{ } fn vert(&self,vert_id:Self::Vert)->Planar64Vec3; fn face_nd(&self,face_id:Self::Face)->(Self::Normal,Self::Offset); - fn face_edges(&self,face_id:Self::Face)->Cow>; + fn face_edges(&self,face_id:Self::Face)->Cow<[Self::Edge]>; fn edge_faces(&self,edge_id:::UndirectedEdge)->Cow<[Self::Face;2]>; fn edge_verts(&self,edge_id:::UndirectedEdge)->Cow<[Self::Vert;2]>; - fn vert_edges(&self,vert_id:Self::Vert)->Cow>; - fn vert_faces(&self,vert_id:Self::Vert)->Cow>; + fn vert_edges(&self,vert_id:Self::Vert)->Cow<[Self::Edge]>; + fn vert_faces(&self,vert_id:Self::Vert)->Cow<[Self::Face]>; } struct FaceRefs{ edges:Vec, @@ -434,7 +434,7 @@ impl MeshQuery for PhysicsMeshView<'_>{ let vert_idx=self.topology.verts[vert_id.get() as usize].get() as usize; self.data.verts[vert_idx].0 } - fn face_edges(&self,face_id:SubmeshFaceId)->Cow>{ + fn face_edges(&self,face_id:SubmeshFaceId)->Cow<[SubmeshDirectedEdgeId]>{ Cow::Borrowed(&self.topology.face_topology[face_id.get() as usize].edges) } fn edge_faces(&self,edge_id:SubmeshEdgeId)->Cow<[SubmeshFaceId;2]>{ @@ -443,10 +443,10 @@ impl MeshQuery for PhysicsMeshView<'_>{ fn edge_verts(&self,edge_id:SubmeshEdgeId)->Cow<[SubmeshVertId;2]>{ Cow::Borrowed(&self.topology.edge_topology[edge_id.get() as usize].verts) } - fn vert_edges(&self,vert_id:SubmeshVertId)->Cow>{ + fn vert_edges(&self,vert_id:SubmeshVertId)->Cow<[SubmeshDirectedEdgeId]>{ Cow::Borrowed(&self.topology.vert_topology[vert_id.get() as usize].edges) } - fn vert_faces(&self,vert_id:SubmeshVertId)->Cow>{ + fn vert_faces(&self,vert_id:SubmeshVertId)->Cow<[SubmeshFaceId]>{ Cow::Borrowed(&self.topology.vert_topology[vert_id.get() as usize].faces) } } @@ -512,7 +512,7 @@ impl MeshQuery for TransformedMesh<'_>{ self.transform.vertex.transform_point3(self.view.vert(vert_id)).fix_1() } #[inline] - fn face_edges(&self,face_id:SubmeshFaceId)->Cow>{ + fn face_edges(&self,face_id:SubmeshFaceId)->Cow<[SubmeshDirectedEdgeId]>{ self.view.face_edges(face_id) } #[inline] @@ -524,11 +524,11 @@ impl MeshQuery for TransformedMesh<'_>{ self.view.edge_verts(edge_id) } #[inline] - fn vert_edges(&self,vert_id:SubmeshVertId)->Cow>{ + fn vert_edges(&self,vert_id:SubmeshVertId)->Cow<[SubmeshDirectedEdgeId]>{ self.view.vert_edges(vert_id) } #[inline] - fn vert_faces(&self,vert_id:SubmeshVertId)->Cow>{ + fn vert_faces(&self,vert_id:SubmeshVertId)->Cow<[SubmeshFaceId]>{ self.view.vert_faces(vert_id) } } @@ -838,7 +838,7 @@ impl MeshQuery for MinkowskiMesh<'_>{ }, } } - fn face_edges(&self,face_id:MinkowskiFace)->Cow>{ + fn face_edges(&self,face_id:MinkowskiFace)->Cow<[MinkowskiDirectedEdge]>{ match face_id{ MinkowskiFace::VertFace(v0,f1)=>{ Cow::Owned(self.mesh1.face_edges(f1).iter().map(|&edge_id1|{ @@ -939,7 +939,7 @@ impl MeshQuery for MinkowskiMesh<'_>{ }, } } - fn vert_edges(&self,vert_id:MinkowskiVert)->Cow>{ + fn vert_edges(&self,vert_id:MinkowskiVert)->Cow<[MinkowskiDirectedEdge]>{ match vert_id{ MinkowskiVert::VertVert(v0,v1)=>{ let mut edges=Vec::new(); @@ -981,7 +981,7 @@ impl MeshQuery for MinkowskiMesh<'_>{ }, } } - fn vert_faces(&self,_vert_id:MinkowskiVert)->Cow>{ + fn vert_faces(&self,_vert_id:MinkowskiVert)->Cow<[MinkowskiFace]>{ unimplemented!() } }