|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvoronoi.VoronoiGraph
public class VoronoiGraph
Class that contains the functionality for computing local generalized Voronoi graphs (lGVGs) using Java's native interface to employ the VRONI voronoi computation library.
Field Summary | |
---|---|
private double |
seg_x1
|
private double |
seg_x2
|
private double |
seg_y1
|
private double |
seg_y2
|
Constructor Summary | |
---|---|
VoronoiGraph()
Constructs and initializes new instance. |
Method Summary | |
---|---|
private void |
clearInputData()
Allow new input data. |
void |
computeVD()
Computes voronoi diagram, results are stored internally and can be read with getVEdge |
void |
finalize()
Frees memory used by the Vroni library. |
private void |
finalizeProgram()
Frees memory used for VD computation. |
private int |
getNumOfVEdges()
Returns number of VEdges in voronoi diagram. |
private java.awt.geom.Line2D |
getSegment(int index)
Returns a Line representing voronoi edge with index "index", null if this is not available. |
private int |
getVEdge(int index)
Returns voronoi edge with index "index", coordinates of start and end point are stored in the seg_... variables and 0 is returned if edge was not available. |
java.util.Vector<java.awt.geom.Line2D> |
getVoronoiLineSegments()
Returns a vector containing all voronoi edges as Line objects. |
private void |
handleSeg(double x1,
double y1,
double x2,
double y2)
Adds line segment (x1,y1)->(x2,y2) to set of obstacles regarded for VD computation. |
private void |
init()
Initializes voronoi computation. |
void |
setInputLineSegments(java.util.Vector<java.awt.geom.Line2D> segments)
Adds a vector of line segments to the set of obstacles regarded for Voronoi computation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private double seg_x1
private double seg_y1
private double seg_x2
private double seg_y2
Constructor Detail |
---|
public VoronoiGraph()
Method Detail |
---|
private void handleSeg(double x1, double y1, double x2, double y2)
x1
- x coordinate of start pointy1
- y coordinate of start pointx2
- x coordinate of end pointy2
- y coordinate of end pointpublic void computeVD()
private void finalizeProgram()
private int getVEdge(int index)
index
- index of voronoi edge to be returned
private int getNumOfVEdges()
private void init()
private void clearInputData()
private java.awt.geom.Line2D getSegment(int index)
index
- index of voronoi edge
public void setInputLineSegments(java.util.Vector<java.awt.geom.Line2D> segments)
segments
- vector of Line instancespublic java.util.Vector<java.awt.geom.Line2D> getVoronoiLineSegments()
public void finalize()
finalize
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |