face_normal

This commit is contained in:
Quaternions 2023-10-26 16:43:58 -07:00
parent 1b51e21ecd
commit 558febabc3

View File

@ -36,6 +36,10 @@ pub struct PhysicsMesh{
vert_topology:Vec<VertRefs>, vert_topology:Vec<VertRefs>,
} }
impl PhysicsMesh{ impl PhysicsMesh{
pub fn face_normal(&self,face_id:FaceId)->Planar64Vec3{
self.faces[face_id.0].normal
}
//ideally I never calculate the vertex position, but I have to for the graphical meshes...
pub fn face_edges(&self,face_id:FaceId)->&Vec<EdgeId>{ pub fn face_edges(&self,face_id:FaceId)->&Vec<EdgeId>{
&self.face_topology[face_id.0].edges &self.face_topology[face_id.0].edges
} }