org.gicentre.utils.geom

## Class ConvexHull

- java.lang.Object
- - org.gicentre.utils.geom.ConvexHull

-     public class ConvexHull
      extends java.lang.Object

  Class for representing and building a convex hull around a set of point values.
  Version:
    3.4, 5th February, 2016.
  Author:
    Jo Wood, giCentre, City University London.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConvexHull(java.util.Collection<processing.core.PVector> points)` Creates a convex hull from the given collection of point values.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addPoint(processing.core.PVector point)` Adds a given point to the collection from which the hull is to be constructed.
    `java.util.ArrayList<processing.core.PVector>` | `getHull()` Provides the convex hull that surrounds the collection of points stored in this object.
    `static java.util.ArrayList<processing.core.PVector>` | `getHull(java.util.Collection<processing.core.PVector> points)` Calculates the convex hull from the given collection of point values.
    `boolean` | `removePoint(processing.core.PVector point)` Removes a given point from the collection from which the hull is to be constructed.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ConvexHull

          public ConvexHull(java.util.Collection<processing.core.PVector> points)

      Creates a convex hull from the given collection of point values.
      Parameters:
        `points` - Points around which the convex hull is created.

  - ### Method Detail

    - #### getHull

          public static java.util.ArrayList<processing.core.PVector> getHull(java.util.Collection<processing.core.PVector> points)

      Calculates the convex hull from the given collection of point values.
      Parameters:
        `points` - Points around which the convex hull is created.
      Returns:
        Ordered list of points representing the convex hull.

    - #### getHull

          public java.util.ArrayList<processing.core.PVector> getHull()

      Provides the convex hull that surrounds the collection of points stored in this object.
      Returns:
        Ordered list of points representing the convex hull.

    - #### addPoint

          public void addPoint(processing.core.PVector point)

      Adds a given point to the collection from which the hull is to be constructed.
      Parameters:
        `point` - Point to add.

    - #### removePoint

          public boolean removePoint(processing.core.PVector point)

      Removes a given point from the collection from which the hull is to be constructed.
      Parameters:
        `point` - Point to remove.
      Returns:
        True if the point was found and removed.