|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdelaunay.delaunay.geometries.Element
org.jdelaunay.delaunay.geometries.DPoint
public class DPoint
The smallest geometric element of a mesh.
| Field Summary |
|---|
| Fields inherited from class org.jdelaunay.delaunay.geometries.Element |
|---|
WEIGHTED_PROPERTIES |
| Constructor Summary | |
|---|---|
DPoint()
Build a point at the origin |
|
DPoint(com.vividsolutions.jts.geom.Coordinate coord)
Build a point as a copy of jts Coordinates |
|
DPoint(double x,
double y,
double z)
Build a point at coordinates x, y, z with no type |
|
DPoint(DPoint pt)
Build a point as a copy of another point |
|
| Method Summary | |
|---|---|
protected boolean |
closedTo(DPoint aPoint,
double tolerence)
Check if the point is closed to the current point, ie if the distance between this and aPoint is inferior to tolerence. |
int |
compareTo(DPoint p)
Compare this and p in two dimensions. |
int |
compareTo2D(DPoint p)
Compare this and p in two dimensions. |
boolean |
contains(com.vividsolutions.jts.geom.Coordinate c)
Check if the coordinate is inside the element |
boolean |
contains(DPoint aPoint)
Check if aPoint can be considered as equal to this. |
void |
displayObject(Graphics g,
int decalageX,
int decalageY,
double minX,
double minY,
double scaleX,
double scaleY)
Display the point in a JPanel Must be used only when using package drawing |
boolean |
equals(Object p)
We override the equals method, as two points can be said equal when their coordinate are exactly the same |
boolean |
equals2D(DPoint y)
Check if this==y, considering only the first two coordinates. |
BoundaryBox |
getBoundingBox()
Computed bounding box |
com.vividsolutions.jts.geom.Coordinate |
getCoordinate()
return jts Coordinate |
double |
getX()
Get X coordinate |
double |
getY()
Get Y coordinate |
double |
getZ()
Get Z coordinate |
int |
hashCode()
Generate an hashcode based on the coordinates of the point. |
protected void |
setColor(Graphics g)
Set the point color for the JFrame panel |
void |
setX(double x)
Set X coordinate |
void |
setY(double y)
Set Y coordinate |
void |
setZ(double z)
Set Z coordinate |
protected double |
squareDistance(double x,
double y)
plane square distance to another point |
protected double |
squareDistance(double x,
double y,
double z)
square distance to another point |
double |
squareDistance(DPoint aPoint)
square distance to another point |
protected double |
squareDistance2D(double x,
double y)
plane square distance to another point |
protected double |
squareDistance2D(DPoint aPoint)
plane square distance to another point |
String |
toString()
Gives a string representation of this object. |
| Methods inherited from class org.jdelaunay.delaunay.geometries.Element |
|---|
addProperty, getExternalGID, getGID, getHeight, getMaxWeight, getProperty, hasProperty, removeProperties, setExternalGID, setGID, setHeight, setProperty |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DPoint()
throws DelaunayError
DelaunayError - If x, y or z is not set.
public DPoint(double x,
double y,
double z)
throws DelaunayError
x - y - z -
DelaunayError - If x, y or z is not set.
public DPoint(DPoint pt)
throws DelaunayError
DelaunayError - DelaunayError
public DPoint(com.vividsolutions.jts.geom.Coordinate coord)
throws DelaunayError
DelaunayError - If x, y or z is not set.| Method Detail |
|---|
public final double getX()
public final double getY()
public final double getZ()
public final void setX(double x)
x - public final void setY(double y)
y - public final void setZ(double z)
z - public final com.vividsolutions.jts.geom.Coordinate getCoordinate()
public final BoundaryBox getBoundingBox()
Element
getBoundingBox in class Elementpublic final boolean contains(DPoint aPoint)
contains in class ElementaPoint -
public final boolean contains(com.vividsolutions.jts.geom.Coordinate c)
Element
contains in class Elementprotected final double squareDistance2D(DPoint aPoint)
aPoint -
protected final double squareDistance2D(double x,
double y)
x - y -
public final double squareDistance(DPoint aPoint)
aPoint -
protected final double squareDistance(double x,
double y)
x - y -
protected final double squareDistance(double x,
double y,
double z)
x - y - z -
protected final boolean closedTo(DPoint aPoint,
double tolerence)
aPoint - tolerence -
public final String toString()
toString in class Objectpublic final boolean equals(Object p)
equals in class Objectp -
public final int hashCode()
hashCode in class Objectpublic final boolean equals2D(DPoint y)
y -
public final int compareTo2D(DPoint p)
p -
public final int compareTo(DPoint p)
compareTo in interface Comparable<DPoint>p -
protected final void setColor(Graphics g)
g -
public final void displayObject(Graphics g,
int decalageX,
int decalageY,
double minX,
double minY,
double scaleX,
double scaleY)
g - decalageX - decalageY -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||