org.geotools.geometry.iso.util.elem2D
Class Edge2D

java.lang.Object
  extended by java.awt.geom.Line2D
      extended by org.geotools.geometry.iso.util.elem2D.Edge2D
All Implemented Interfaces:
java.awt.Shape, java.lang.Cloneable

public class Edge2D
extends java.awt.geom.Line2D

Author:
roehrig TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.geom.Line2D
java.awt.geom.Line2D.Double, java.awt.geom.Line2D.Float
 
Field Summary
 int id
           
static int LEFTSIDE
           
 java.lang.Object object
           
protected  Node2D p1
           
protected  Node2D p2
           
static int RIGHTSIDE
           
protected  Simplex2D surfaceLeft
           
protected  Simplex2D surfaceRight
           
 
Constructor Summary
protected Edge2D(Node2D p1, Node2D p2)
           
protected Edge2D(Node2D p1, Node2D p2, Simplex2D surfaceRight, Simplex2D surfaceLeft)
           
 
Method Summary
 java.awt.geom.Rectangle2D getBounds2D()
           
static java.util.ArrayList<java.util.LinkedList<java.awt.geom.Point2D>> getCoordinateSequencesFromEdges(java.util.ArrayList<Edge2D> edges)
           
 Simplex2D getLeftSimplex()
           
 double getLength()
           
 double getLengthSq()
           
 Simplex2D getNeighborSimplex(Simplex2D f)
           
 Edge2D getNeighbourEdge(Node2D n)
          returns the neighbour edge from this connected to node n.
 Node2D getNode1()
           
 Node2D getNode2()
           
 int getNumberOfSurfaces()
           
 java.awt.geom.Point2D getP1()
           
 java.awt.geom.Point2D getP2()
           
 Simplex2D getRightSimplex()
           
 Simplex2D getSurfaceLeft()
           
 Simplex2D getSurfaceRight()
           
 double getX1()
           
 double getX2()
           
 double getY1()
           
 double getY2()
           
 boolean hasPoint(java.awt.geom.Point2D p)
           
 boolean hasSimplex(Simplex2D s)
           
 void reverse()
           
 void setLine(double x1, double y1, double x2, double y2)
           
protected  void setNodes(Node2D p1, Node2D p2)
           
protected  void setSimplex(Simplex2D simplex, int SIDE)
           
 
Methods inherited from class java.awt.geom.Line2D
clone, contains, contains, contains, contains, getBounds, getPathIterator, getPathIterator, intersects, intersects, intersectsLine, intersectsLine, linesIntersect, ptLineDist, ptLineDist, ptLineDist, ptLineDistSq, ptLineDistSq, ptLineDistSq, ptSegDist, ptSegDist, ptSegDist, ptSegDistSq, ptSegDistSq, ptSegDistSq, relativeCCW, relativeCCW, relativeCCW, setLine, setLine
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LEFTSIDE

public static int LEFTSIDE

RIGHTSIDE

public static int RIGHTSIDE

id

public int id

p1

protected Node2D p1

p2

protected Node2D p2

surfaceRight

protected Simplex2D surfaceRight

surfaceLeft

protected Simplex2D surfaceLeft

object

public java.lang.Object object
Constructor Detail

Edge2D

protected Edge2D(Node2D p1,
                 Node2D p2)

Edge2D

protected Edge2D(Node2D p1,
                 Node2D p2,
                 Simplex2D surfaceRight,
                 Simplex2D surfaceLeft)
Method Detail

setNodes

protected void setNodes(Node2D p1,
                        Node2D p2)

setSimplex

protected void setSimplex(Simplex2D simplex,
                          int SIDE)

getSurfaceRight

public Simplex2D getSurfaceRight()
Returns:
Returns the surfaceRight.

getSurfaceLeft

public Simplex2D getSurfaceLeft()
Returns:
Returns the surfaceLeft.

getNumberOfSurfaces

public int getNumberOfSurfaces()

hasPoint

public boolean hasPoint(java.awt.geom.Point2D p)
Returns:
Returns the point0.

hasSimplex

public boolean hasSimplex(Simplex2D s)
Returns:
Returns the surfaceLeft.

reverse

public void reverse()

getNeighborSimplex

public Simplex2D getNeighborSimplex(Simplex2D f)
Parameters:
f -
Returns:

getLeftSimplex

public Simplex2D getLeftSimplex()
Returns:

getRightSimplex

public Simplex2D getRightSimplex()

getX1

public double getX1()
Specified by:
getX1 in class java.awt.geom.Line2D

getY1

public double getY1()
Specified by:
getY1 in class java.awt.geom.Line2D

getP1

public java.awt.geom.Point2D getP1()
Specified by:
getP1 in class java.awt.geom.Line2D

getNode1

public Node2D getNode1()

getX2

public double getX2()
Specified by:
getX2 in class java.awt.geom.Line2D

getY2

public double getY2()
Specified by:
getY2 in class java.awt.geom.Line2D

getP2

public java.awt.geom.Point2D getP2()
Specified by:
getP2 in class java.awt.geom.Line2D

getNode2

public Node2D getNode2()

setLine

public void setLine(double x1,
                    double y1,
                    double x2,
                    double y2)
Specified by:
setLine in class java.awt.geom.Line2D

getBounds2D

public java.awt.geom.Rectangle2D getBounds2D()

getLength

public double getLength()

getLengthSq

public double getLengthSq()

getNeighbourEdge

public Edge2D getNeighbourEdge(Node2D n)
returns the neighbour edge from this connected to node n. Returns null if the node n does not belong to this edge or if the node n is not connected with exactly two edges

Parameters:
n -
Returns:

getCoordinateSequencesFromEdges

public static java.util.ArrayList<java.util.LinkedList<java.awt.geom.Point2D>> getCoordinateSequencesFromEdges(java.util.ArrayList<Edge2D> edges)


Copyright © 1996-2010 Geotools. All Rights Reserved.