forked from StrafesNET/strafe-client
implement PhysicsMesh
This commit is contained in:
parent
7ce08b0bbe
commit
1b51e21ecd
@ -21,12 +21,9 @@ struct FaceRefs{
|
|||||||
verts:Vec<VertId>,
|
verts:Vec<VertId>,
|
||||||
}
|
}
|
||||||
struct EdgeRefs{
|
struct EdgeRefs{
|
||||||
f0:FaceId,//left
|
faces:[FaceId;2],//left, right
|
||||||
f1:FaceId,//right
|
verts:[VertId;2],//bottom, top
|
||||||
v0:VertId,//bottom
|
vert_faces:[FaceId;2],//bottom, top
|
||||||
v1:VertId,//top
|
|
||||||
v0f:FaceId,//bottom capping face
|
|
||||||
v1f:FaceId,//top capping face
|
|
||||||
}
|
}
|
||||||
struct VertRefs{
|
struct VertRefs{
|
||||||
faces:Vec<FaceId>,
|
faces:Vec<FaceId>,
|
||||||
@ -39,23 +36,23 @@ pub struct PhysicsMesh{
|
|||||||
vert_topology:Vec<VertRefs>,
|
vert_topology:Vec<VertRefs>,
|
||||||
}
|
}
|
||||||
impl PhysicsMesh{
|
impl PhysicsMesh{
|
||||||
pub fn face_edges(face_id:FaceId)->Vec<EdgeId>{
|
pub fn face_edges(&self,face_id:FaceId)->&Vec<EdgeId>{
|
||||||
todo!()
|
&self.face_topology[face_id.0].edges
|
||||||
}
|
}
|
||||||
pub fn edge_side_faces(edge_id:EdgeId)->[FaceId;2]{
|
pub fn edge_side_faces(&self,edge_id:EdgeId)->&[FaceId;2]{
|
||||||
todo!()
|
&self.edge_topology[edge_id.0].faces
|
||||||
}
|
}
|
||||||
pub fn edge_end_faces(edge_id:EdgeId)->[FaceId;2]{
|
pub fn edge_end_faces(&self,edge_id:EdgeId)->&[FaceId;2]{
|
||||||
todo!()
|
&self.edge_topology[edge_id.0].vert_faces
|
||||||
}
|
}
|
||||||
pub fn edge_verts(edge_id:EdgeId)->[VertId;2]{
|
pub fn edge_verts(&self,edge_id:EdgeId)->&[VertId;2]{
|
||||||
todo!()
|
&self.edge_topology[edge_id.0].verts
|
||||||
}
|
}
|
||||||
pub fn vert_edges(vert_id:VertId)->Vec<EdgeId>{
|
pub fn vert_edges(&self,vert_id:VertId)->&Vec<EdgeId>{
|
||||||
todo!()
|
&self.vert_topology[vert_id.0].edges
|
||||||
}
|
}
|
||||||
pub fn vert_faces(vert_id:VertId)->Vec<FaceId>{
|
pub fn vert_faces(&self,vert_id:VertId)->&Vec<FaceId>{
|
||||||
todo!()
|
&self.vert_topology[vert_id.0].faces
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user