Package repast.simphony.space.delaunay
Class TriangulationPoint
java.lang.Object
repast.simphony.space.delaunay.TriangulationPoint
This adds geometric primitives to ILocations to support
DelaunayTriangulation. These primitives are defined in guibas and stolfi.
- Version:
- $revision$
- Author:
- Howe
-
Field Summary
-
Constructor Summary
ConstructorDescriptionTriangulationPoint
(double x, double y, Object contents) Construct a new TriangulationPoint using an x and a y cooridnate. -
Method Summary
Modifier and TypeMethodDescriptionConstruct a new TriangulationPoint using an ILocation object.double
getX()
double
getY()
boolean
Tests whether this point is inside the circumcircle of the other three points.boolean
Is this point to the left of the supplied Edge.boolean
Is this point on the supplied edge?boolean
Is this point to the right of the supplied Edge.void
setX
(int x) void
setY
(int y)
-
Field Details
-
contents
-
-
Constructor Details
-
TriangulationPoint
Construct a new TriangulationPoint using an x and a y cooridnate.- Parameters:
x
- The x coordinate of the point.y
- The y coordinate of the point.
-
-
Method Details
-
getContents
Construct a new TriangulationPoint using an ILocation object.- Parameters:
loc
- The location to be triangulated.
-
isOn
Is this point on the supplied edge?- Parameters:
e
- The edge to test.- Returns:
- true if this point is on the edge.
-
isRightOf
Is this point to the right of the supplied Edge.- Parameters:
e
- The edge to test.- Returns:
- true if this point is right of the edge.
-
isLeftOf
Is this point to the left of the supplied Edge.- Parameters:
e
- The edge to test.- Returns:
- true if this point is left of the edge.
-
isInCircle
Tests whether this point is inside the circumcircle of the other three points.- Parameters:
p1
- A point in the circlep2
- A point in the circlep3
- A point in the circle.- Returns:
- true if this point lies incide the circumcircle of the other three points.
-
getX
public double getX()- Returns:
- Returns the x.
-
setX
public void setX(int x) - Parameters:
x
- The x to set.
-
getY
public double getY()- Returns:
- Returns the y.
-
setY
public void setY(int y) - Parameters:
y
- The y to set.
-