Class GaiaTessellator
java.lang.Object
com.gaia3d.basic.geometry.tessellator.GaiaTessellator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
calculateFastNormal3D
(List<org.joml.Vector3d> polygon, org.joml.Vector3d resultNormal) void
calculateNormal3D
(List<org.joml.Vector3d> polygon, org.joml.Vector3d resultNormal) getCleanPoints2DTessArray
(List<Point2DTess> points2DArray, List<Point2DTess> ResultPoints2DArray, double error) int
getNextIdx
(int idx, int pointsCount) void
getPointsIdxSortedByDistToPoint
(Point2DTess point, List<Point2DTess> points, List<Integer> resultIndices) int
getPrevIdx
(int idx, int pointsCount) void
tessellate2D
(Polygon2DTess polygon2D, List<Polygon2DTess> resultConvexPolygons) void
tessellate3D
(List<org.joml.Vector3d> points3dArray, List<Integer> resultTrianglesIndices) void
tessellate3D
(List<org.joml.Vector3d> points3dArray, List<List<org.joml.Vector3d>> interiorPolygons, List<org.joml.Vector3d> resultPolygonPoints, List<Integer> resultTrianglesIndices) tessellateHoles
(Polygon2DTess exteriorPolygon, List<Polygon2DTess> interiorPolygons, List<Integer> resultIndices) void
tessellateHoles2D
(List<org.joml.Vector2d> exteriorPoints, List<List<org.joml.Vector2d>> interiorPoints, List<org.joml.Vector2d> resultPositions, List<Integer> resultIndices)
-
Constructor Details
-
GaiaTessellator
public GaiaTessellator()
-
-
Method Details
-
tessellate3D
-
tessellate3D
-
getCleanPoints2DTessArray
public List<Point2DTess> getCleanPoints2DTessArray(List<Point2DTess> points2DArray, List<Point2DTess> ResultPoints2DArray, double error) -
tessellateHoles2D
-
tessellateHoles
public Polygon2DTess tessellateHoles(Polygon2DTess exteriorPolygon, List<Polygon2DTess> interiorPolygons, List<Integer> resultIndices) -
getPointsIdxSortedByDistToPoint
public void getPointsIdxSortedByDistToPoint(Point2DTess point, List<Point2DTess> points, List<Integer> resultIndices) -
tessellate2D
-
getNextIdx
public int getNextIdx(int idx, int pointsCount) -
getPrevIdx
public int getPrevIdx(int idx, int pointsCount) -
calculateFastNormal3D
-
calculateNormal3D
-