| java.lang.Object com.vividsolutions.jump.warp.Triangle
Constructor Summary | |
public | Triangle(Coordinate p1, Coordinate p2, Coordinate p3) Creates a Triangle. |
Method Summary | |
public boolean | contains(Coordinate p) | public boolean | equals(Object o) | public double | getArea() Returns the area of the triangle. | public Envelope | getEnvelope() Returns the bounds of this Triangle. | public double | getMaxSideLength() Returns the length of this Triangle's longest side. | public double | getMinHeight() Returns the smallest of this Triangle's three heights (as measured
perpendicularly from each side). | public Coordinate | getP1() Returns the first vertex. | public Coordinate | getP2() Returns the second vertex. | public Coordinate | getP3() Returns the third vertex. | public boolean | hasVertex(Coordinate v) Returns whether v is one of this Triangle's vertices. | public int | hashCode() | protected Coordinate | min(Coordinate a, Coordinate b) | public List | subTriangles(Coordinate newVertex) Returns the three triangles that result from splitting this triangle at
a given point. | public Coordinate | toEuclideanCoordinate(Coordinate simplicialCoordinate) Converts from a simplicial coordinate to a Euclidean coordinate. | public LinearRing | toLinearRing() Converts this Triangle to a JTS Geometry. | public Coordinate | toSimplicialCoordinate(Coordinate euclideanCoordinate) Converts from a Euclidean coordinate to a simplicial coordinate. | public String | toString() |
Triangle | public Triangle(Coordinate p1, Coordinate p2, Coordinate p3)(Code) | | Creates a Triangle.
Parameters: p1 - one vertex Parameters: p2 - another vertex Parameters: p3 - another vertex |
contains | public boolean contains(Coordinate p)(Code) | | Returns whether this Triangle contains the given coordinate
Parameters: p - the point to test for containment whether this Triangle contains the given coordinate |
equals | public boolean equals(Object o)(Code) | | Returns whether this Triangle has the same vertices as the given Triangle
Parameters: o - another Triangle; otherwise, equals will return false true if o is a Triangle and has the same vertices (though notnecessarily in the same order) |
getArea | public double getArea()(Code) | | Returns the area of the triangle.
See http://www.mathcs.emory.edu/~rudolf/math108/summ1-2-3/node7.html
the area of the triangle |
getEnvelope | public Envelope getEnvelope()(Code) | | Returns the bounds of this Triangle.
the smallest Envelope enclosing this Triangle |
getMaxSideLength | public double getMaxSideLength()(Code) | | Returns the length of this Triangle's longest side.
the length of this Triangle's longest side |
getMinHeight | public double getMinHeight()(Code) | | Returns the smallest of this Triangle's three heights (as measured
perpendicularly from each side).
the smallest of this Triangle's three altitudes |
getP1 | public Coordinate getP1()(Code) | | Returns the first vertex.
the first vertex |
getP2 | public Coordinate getP2()(Code) | | Returns the second vertex.
the second vertex |
getP3 | public Coordinate getP3()(Code) | | Returns the third vertex.
the third vertex |
hasVertex | public boolean hasVertex(Coordinate v)(Code) | | Returns whether v is one of this Triangle's vertices.
Parameters: v - the candidate point whether v is equal to one of the vertices of this Triangle |
hashCode | public int hashCode()(Code) | | |
min | protected Coordinate min(Coordinate a, Coordinate b)(Code) | | |
subTriangles | public List subTriangles(Coordinate newVertex)(Code) | | Returns the three triangles that result from splitting this triangle at
a given point.
Parameters: newVertex - the split point, which must be inside triangle three Triangles resulting from splitting this triangle at thegiven Coordinate |
toEuclideanCoordinate | public Coordinate toEuclideanCoordinate(Coordinate simplicialCoordinate)(Code) | | Converts from a simplicial coordinate to a Euclidean coordinate.
Parameters: simplicialCoordinate - the simplicial coordinate, which uses x, y, and z a new Coordinate with the corresponding Euclidean values |
toLinearRing | public LinearRing toLinearRing()(Code) | | Converts this Triangle to a JTS Geometry.
a LinearRing with the same vertices as this Triangle |
toSimplicialCoordinate | public Coordinate toSimplicialCoordinate(Coordinate euclideanCoordinate)(Code) | | Converts from a Euclidean coordinate to a simplicial coordinate.
Parameters: euclideanCoordinate - the Euclidean coordinate a new 3D Coordinate with the corresponding simplicial values |
|
|