- Object
-
- AbstractHullGenerator
-
- All Implemented Interfaces:
HullGenerator
- Direct Known Subclasses:
DivideAndConquer
,GiftWrap
,GrahamScan
,MonotoneChain
public abstract class AbstractHullGenerator extends Object implements HullGenerator
Abstract implementation of theHullGenerator
interface.- Since:
- 4.2.0
- Version:
- 4.2.0
- Author:
- William Bittle
-
-
Constructor Summary
Constructors Constructor Description AbstractHullGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Vector2>
generate(List<Vector2> points)
Returns a convex hull generated from the given point set in counter-clockwise point order.-
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface HullGenerator
generate
-
-
-
-
Method Detail
-
generate
public List<Vector2> generate(List<Vector2> points)
Description copied from interface:HullGenerator
Returns a convex hull generated from the given point set in counter-clockwise point order.Returns null if the given points array is null.
Returns the array unchanged if the length is less than or equal to 2.
- Specified by:
generate
in interfaceHullGenerator
- Parameters:
points
- the point set or cloud- Returns:
- List<
Vector2
> the convex hull vertices
-
-