From 558febabc3d25e2b66ed70ea764c5a43ca22c7a7 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Thu, 26 Oct 2023 16:43:58 -0700 Subject: [PATCH] face_normal --- src/model_physics.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/model_physics.rs b/src/model_physics.rs index 9de1c02..fb8791f 100644 --- a/src/model_physics.rs +++ b/src/model_physics.rs @@ -36,6 +36,10 @@ pub struct PhysicsMesh{ vert_topology:Vec, } 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{ &self.face_topology[face_id.0].edges }