|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiewald_CV_kit.utility.ConvexHullDiwi
public final class ConvexHullDiwi
the class ConvexHullDiwi calculates the convex-hull of some given points (Pixel).
the list of convex-hull-points is represented as a double-linked-list, which enables very fast adding/removing of points
Constructor Summary | |
---|---|
ConvexHullDiwi()
generate a new convex hull. |
Method Summary | |
---|---|
void |
clear()
clear the convex hull (empty the point list). |
DoubleLinkedList<Pixel> |
get()
returns the double-linked list, that represents the convex-hull-points. |
float |
onSide(Pixel a,
Pixel b,
Pixel c)
used for calculating the position of a point "c" according to a line "ab" |
boolean |
remove(float x,
float y)
if the given coordinates are part of the hull, remove this hull-point. |
boolean |
remove(Pixel pixel)
if the coordinates of the given pixel are part of the hull, remove this hull-point. |
ConvexHullDiwi |
update(ConvexHullDiwi convex_hull)
update the existing convex-hull, on an other convex-hull. |
ConvexHullDiwi |
update(int x,
int y)
update the existing convex-hull, on a single coordinate. |
ConvexHullDiwi |
update(List<Pixel> pixels)
update the existing convex-hull, on a list of pixels. |
ConvexHullDiwi |
update(Pixel pixel)
update the existing convex-hull, on a single pixel. |
ConvexHullDiwi |
update(Pixel[] pixels)
update the existing convex-hull, on an array of pixels. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConvexHullDiwi()
Method Detail |
---|
public final DoubleLinkedList<Pixel> get()
public final void clear()
public final boolean remove(Pixel pixel)
pixel
- the pixel to remove
public final boolean remove(float x, float y)
x
- the x-coordinatey
- the y-coordinate
public final ConvexHullDiwi update(ConvexHullDiwi convex_hull)
convex_hull
-
public final ConvexHullDiwi update(List<Pixel> pixels)
pixels
-
public final ConvexHullDiwi update(Pixel[] pixels)
pixels
-
public final ConvexHullDiwi update(Pixel pixel)
pixel
-
public final ConvexHullDiwi update(int x, int y)
x
- y
-
public final float onSide(Pixel a, Pixel b, Pixel c)
a
- start point of lineb
- end point of linec
- point to calculate
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |