Package org.apache.lucene.geo
Class XTessellator.Triangle
java.lang.Object
org.apache.lucene.geo.XTessellator.Triangle
- Enclosing class:
- XTessellator
Triangle in the tessellated mesh
-
Constructor Summary
ModifierConstructorDescriptionprotected
Triangle
(XTessellator.Node a, boolean isABfromPolygon, XTessellator.Node b, boolean isBCfromPolygon, XTessellator.Node c, boolean isCAfromPolygon) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
containsPoint
(double lat, double lon) utility method to compute whether the point is in the triangleint
getEncodedX
(int vertex) get quantized x value for the given vertexint
getEncodedY
(int vertex) get quantized y value for the given vertexdouble
getX
(int vertex) get x value for the given vertexdouble
getY
(int vertex) get y value for the given vertexboolean
isEdgefromPolygon
(int startVertex) get if edge is shared with the polygon for the given edgetoString()
pretty print the triangle vertices
-
Constructor Details
-
Triangle
protected Triangle(XTessellator.Node a, boolean isABfromPolygon, XTessellator.Node b, boolean isBCfromPolygon, XTessellator.Node c, boolean isCAfromPolygon)
-
-
Method Details
-
getEncodedX
public int getEncodedX(int vertex) get quantized x value for the given vertex -
getEncodedY
public int getEncodedY(int vertex) get quantized y value for the given vertex -
getY
public double getY(int vertex) get y value for the given vertex -
getX
public double getX(int vertex) get x value for the given vertex -
isEdgefromPolygon
public boolean isEdgefromPolygon(int startVertex) get if edge is shared with the polygon for the given edge -
containsPoint
protected boolean containsPoint(double lat, double lon) utility method to compute whether the point is in the triangle -
toString
pretty print the triangle vertices
-