getFaceNormal method

Vector3 getFaceNormal(
  1. int i,
  2. Vector3 target
)

Compute the normal of a face from its vertices

Implementation

Vector3 getFaceNormal(int i, final Vector3 target) {
  final List<int> f = faces[i];
  final Vector3 va = vertices[f[0]];
  final Vector3 vb = vertices[f[1]];
  final Vector3 vc = vertices[f[2]];
  return ConvexPolyhedron.computeNormal(va, vb, vc, target);
}