computeNormal static method
void
computeNormal(
- Vector3 va,
- Vector3 vb,
- Vector3 vc,
- Vector3 target,
Get face normal given 3 vertices
Implementation
static void computeNormal(Vector3 va, Vector3 vb, Vector3 vc, Vector3 target) {
final cb = Vector3.zero();
final ab = Vector3.zero();
vb.sub2(va, ab);
vc.sub2(vb, cb);
cb.cross2(ab, target);
if (!target.isZero()) {
target.normalize();
}
}