org.jdelaunay.delaunay.geometries
Class ConstraintPolygon

java.lang.Object
  extended by org.jdelaunay.delaunay.geometries.Element
      extended by org.jdelaunay.delaunay.geometries.ConstraintPolygon

public final class ConstraintPolygon
extends Element

Delaunay Package.

Author:
Adelin Piau, Erwan Bocher, Alexis Guéganno

Field Summary
 
Fields inherited from class org.jdelaunay.delaunay.geometries.Element
WEIGHTED_PROPERTIES
 
Constructor Summary
ConstraintPolygon(com.vividsolutions.jts.geom.Polygon polygon)
          Generate a polygon.
ConstraintPolygon(com.vividsolutions.jts.geom.Polygon polygon, boolean isEmpty)
          Generate a polygon.
ConstraintPolygon(com.vividsolutions.jts.geom.Polygon polygon, int property)
          Generate a polygon with property.
ConstraintPolygon(com.vividsolutions.jts.geom.Polygon polygon, int property, boolean usePolygonZ)
          Generate a polygon with property.
ConstraintPolygon(com.vividsolutions.jts.geom.Polygon polygon, int property, boolean usePolygonZ, boolean isEmpty)
          Generate a polygon with property.
 
Method Summary
 boolean contains(com.vividsolutions.jts.geom.Coordinate coordinate)
          check if this polygon contain the point given in argument.
 boolean contains(DEdge anEdge)
           
 boolean contains(DPoint aPoint)
          Check if this polygon contain the point given in argument.
 BoundaryBox getBoundingBox()
          Get the minimum boundary of this element.
 List<DEdge> getEdges()
          Get the edges structure.
 List<DPoint> getPoints()
          Get points.
 com.vividsolutions.jts.geom.Polygon getPolygon()
           
 DTriangle getRefTriangle()
           
 boolean isEmpty()
           
 boolean isIntersect(DEdge anEdge)
           
 boolean isUsePolygonZ()
           
 void setEmpty(boolean isEmpty)
          True, if we remove triangle who are inside the polygon.
 void setRefTriangle(DTriangle refTriangle)
          Set the reference triangle.
 
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, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstraintPolygon

public ConstraintPolygon(com.vividsolutions.jts.geom.Polygon polygon)
                  throws DelaunayError
Generate a polygon.

Parameters:
polygon -
Throws:
DelaunayError

ConstraintPolygon

public ConstraintPolygon(com.vividsolutions.jts.geom.Polygon polygon,
                         boolean isEmpty)
                  throws DelaunayError
Generate a polygon.

Parameters:
polygon -
isEmpty - True, if we remove triangle who are inside the polygon.
Throws:
DelaunayError

ConstraintPolygon

public ConstraintPolygon(com.vividsolutions.jts.geom.Polygon polygon,
                         int property)
                  throws DelaunayError
Generate a polygon with property.

Parameters:
polygon -
property -
Throws:
DelaunayError

ConstraintPolygon

public ConstraintPolygon(com.vividsolutions.jts.geom.Polygon polygon,
                         int property,
                         boolean usePolygonZ)
                  throws DelaunayError
Generate a polygon with property.

Parameters:
polygon -
property -
usePolygonZ - - True, if we set Z coordinate of polygon to new point else set an average of polygon and mesh Z coordinate.
Throws:
DelaunayError

ConstraintPolygon

public ConstraintPolygon(com.vividsolutions.jts.geom.Polygon polygon,
                         int property,
                         boolean usePolygonZ,
                         boolean isEmpty)
                  throws DelaunayError
Generate a polygon with property.

Parameters:
polygon -
property -
usePolygonZ - True, if we set Z coordinate of polygon to new point else set an average of polygon and mesh Z coordinate.
isEmpty - True, if we remove triangle who are inside the polygon.
Throws:
DelaunayError
Method Detail

isUsePolygonZ

public boolean isUsePolygonZ()
Returns:
True, if we set Z coordinate of polygon to new point else set an average of polygon and mesh Z coordinate.

isEmpty

public boolean isEmpty()
Returns:
True, if we remove triangle who are inside the polygon.

setEmpty

public void setEmpty(boolean isEmpty)
True, if we remove triangle who are inside the polygon.

Parameters:
isEmpty -

getRefTriangle

public DTriangle getRefTriangle()
Returns:
The reference triangle.

setRefTriangle

public void setRefTriangle(DTriangle refTriangle)
Set the reference triangle.

Parameters:
refTriangle -

getPolygon

public com.vividsolutions.jts.geom.Polygon getPolygon()
Returns:
a polygon.

getEdges

public List<DEdge> getEdges()
Get the edges structure.

Returns:
edges

getPoints

public List<DPoint> getPoints()
                       throws DelaunayError
Get points.

Returns:
points
Throws:
DelaunayError

getBoundingBox

public BoundaryBox getBoundingBox()
Get the minimum boundary of this element.

Specified by:
getBoundingBox in class Element
Returns:
The bounding box of the polygon.

contains

public boolean contains(DPoint aPoint)
Check if this polygon contain the point given in argument.

Specified by:
contains in class Element
Parameters:
aPoint -
Returns:
true if aPoint is in this.

contains

public boolean contains(DEdge anEdge)
                 throws DelaunayError
Throws:
DelaunayError

contains

public boolean contains(com.vividsolutions.jts.geom.Coordinate coordinate)
                 throws DelaunayError
check if this polygon contain the point given in argument.

Specified by:
contains in class Element
Parameters:
coordinate -
Returns:
true if coordinate is in this
Throws:
DelaunayError

isIntersect

public boolean isIntersect(DEdge anEdge)
                    throws DelaunayError
Parameters:
anEdge -
Returns:
true if anEdge intersects this.
Throws:
DelaunayError


Copyright © 2014 IRSTV CNRS-FR-2488. All Rights Reserved.