Package org.apache.lucene.geo
Class Tessellator.Triangle
- java.lang.Object
-
- org.apache.lucene.geo.Tessellator.Triangle
-
- Enclosing class:
- Tessellator
public static final class Tessellator.Triangle extends java.lang.ObjectTriangle in the tessellated mesh
-
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean[]edgeFromPolygon(package private) Tessellator.Node[]vertex
-
Constructor Summary
Constructors Modifier Constructor Description protectedTriangle(Tessellator.Node a, boolean isABfromPolygon, Tessellator.Node b, boolean isBCfromPolygon, Tessellator.Node c, boolean isCAfromPolygon)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancontainsPoint(double lat, double lon)utility method to compute whether the point is in the triangleintgetEncodedX(int vertex)get quantized x value for the given vertexintgetEncodedY(int vertex)get quantized y value for the given vertexdoublegetX(int vertex)get x value for the given vertexdoublegetY(int vertex)get y value for the given vertexbooleanisEdgefromPolygon(int startVertex)get if edge is shared with the polygon for the given edgejava.lang.StringtoString()pretty print the triangle vertices
-
-
-
Field Detail
-
vertex
Tessellator.Node[] vertex
-
edgeFromPolygon
boolean[] edgeFromPolygon
-
-
Constructor Detail
-
Triangle
protected Triangle(Tessellator.Node a, boolean isABfromPolygon, Tessellator.Node b, boolean isBCfromPolygon, Tessellator.Node c, boolean isCAfromPolygon)
-
-
Method Detail
-
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
public java.lang.String toString()
pretty print the triangle vertices- Overrides:
toStringin classjava.lang.Object
-
-