setFromPoints method

ConvexHull setFromPoints(
  1. List<Vector3> points
)

Implementation

ConvexHull setFromPoints(List<Vector3> points) {
  // The algorithm needs at least four points.

  if (points.length >= 4) {
    makeEmpty();

    for (var i = 0, l = points.length; i < l; i++) {
      vertices.add(VertexNode(points[i]));
    }

    compute();
  }

  return this;
}