setFromCoplanarPoints method

Plane setFromCoplanarPoints(
  1. Vector3 a,
  2. Vector3 b,
  3. Vector3 c
)

Implementation

Plane setFromCoplanarPoints(Vector3 a, Vector3 b, Vector3 c) {
  final normal =
      _vector1.sub2(c, b).cross(_vector2.sub2(a, b)).normalize();

  // Q: should an error be thrown if normal is zero (e.g. degenerate plane)?

  setFromNormalAndCoplanarPoint(normal, a);

  return this;
}