Package org.oscim.utils
Class Tessellator
java.lang.Object
org.oscim.utils.Tessellator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic inttessellate(float[] points, int ppos, int numPoints, int[] index, int ipos, int numRings, int vertexOffset, VertexData outTris) Special version for ExtrusionLayer to match indices with vertex positions.static inttessellate(GeometryBuffer geom, GeometryBuffer outMesh) Tessellates aGeometryBufferto a triangular/mesh GeometryBuffer.
-
Constructor Details
-
Tessellator
public Tessellator()
-
-
Method Details
-
tessellate
public static int tessellate(float[] points, int ppos, int numPoints, int[] index, int ipos, int numRings, int vertexOffset, VertexData outTris) Special version for ExtrusionLayer to match indices with vertex positions. Tessellates polygon in tris elements.- Parameters:
points- theGeometryBuffer.pointsppos- the start point inGeometryBuffer.points(not needed)numPoints- the points array sizeGeometryBuffer.pointNextPosindex- theGeometryBuffer.indexipos- theGeometryBuffer.indexCurrentPosnumRings- the number of ring polygonsvertexOffset- shift outTris index with offsetoutTris- the tessellated polygon as triangularVertexData- Returns:
- number of indices of outTris
-
tessellate
Tessellates aGeometryBufferto a triangular/mesh GeometryBuffer. The points array remains the same.- Parameters:
geom- the input GeometryBuffer as POLY or LINEoutMesh- the out GeometryBuffer as MESH, but has 2D point coordinates.- Returns:
- number of indices of out3D (0 if tessellation failed)
-