copyNormalInto method

void copyNormalInto(
  1. Vector3 normal
)

Copy the normal of the triangle into a Vector3

Implementation

void copyNormalInto(Vector3 normal) {
  Vector3 v0 = point1 - point0;
  Vector3 v1 = point2 - point0;
  Vector3 n = v0.cross(v1);
  n.normalize();
  normal.setFrom(n);
}