public class DPoint extends Element implements Comparable<DPoint>
WEIGHTED_PROPERTIES| Constructor and Description |
|---|
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
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
addProperty, getExternalGID, getGID, getHeight, getMaxWeight, getProperty, hasProperty, removeProperties, setExternalGID, setGID, setHeight, setPropertypublic 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 - DelaunayErrorpublic DPoint(com.vividsolutions.jts.geom.Coordinate coord)
throws DelaunayError
DelaunayError - If x, y or z is not set.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()
ElementgetBoundingBox in class Elementpublic final boolean contains(DPoint aPoint)
public final boolean contains(com.vividsolutions.jts.geom.Coordinate c)
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()
public final boolean equals(Object p)
public final int hashCode()
public 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 - Copyright © 2013 IRSTV CNRS-FR-2488. All Rights Reserved.