Is there any ordering on the three edges, stored in ccd_pt_face_t? I want to compute the normal of a face, pointing away from the polytope. I compute the normal as n = e₁.cross(e₂), but this normal n does not necessarily points away from the polytope.
If the edges are always stored in a specific order (counter clockwise order, for example), then we can always guarantee the cross product e₁.cross(e₂) points away from the polytope. Does libccd guarantee such ordering? Is there a good way to always get the normal vector pointing away from the polytope?
Is there any ordering on the three edges, stored in ccd_pt_face_t? I want to compute the normal of a face, pointing away from the polytope. I compute the normal as
n = e₁.cross(e₂)
, but this normaln
does not necessarily points away from the polytope.If the edges are always stored in a specific order (counter clockwise order, for example), then we can always guarantee the cross product
e₁.cross(e₂)
points away from the polytope. Does libccd guarantee such ordering? Is there a good way to always get the normal vector pointing away from the polytope?