com.supermap.ar.areffect.preset

Class PolygonUtils

  • java.lang.Object
    • com.supermap.ar.areffect.preset.PolygonUtils


  • public class PolygonUtils
    extends java.lang.Object
    Polygon tools & mathematical calculations
    • Constructor Summary

      Constructors 
      Constructor and Description
      PolygonUtils() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.util.List<Point3D> genArcPoints(java.util.List<Point3D> points, float radius, int edgeNum)
      According to the radius of the corner and the number of arc segments, the inflection point is replaced by the continuous point on the arc segment at the inflection point
      static java.util.List<Point3D> genTrianglePoints(java.util.List<Point3D> sourceList)
      Using the set of points, using a Mode.TRIANGLES can be used to draw a polygon
      static boolean isInLine_XOY(Point3D test, Point3D p1, Point3D p2, float tolerance) 
      static boolean isInPolygon_XOY(Point3D test, java.util.List<Point3D> points)
      Is the point in a polygon (a polygon formed by a set of projection points on the XOY plane)
      static boolean PointOnLine(Point3D p1, Point3D p2, Point3D q, float tolerance) 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PolygonUtils

        public PolygonUtils()
    • Method Detail

      • genArcPoints

        public static java.util.List<Point3D> genArcPoints(java.util.List<Point3D> points,
                                                           float radius,
                                                           int edgeNum)
        According to the radius of the corner and the number of arc segments, the inflection point is replaced by the continuous point on the arc segment at the inflection point
        Parameters:
        points -
        radius -
        edgeNum -
        Returns:
      • genTrianglePoints

        public static java.util.List<Point3D> genTrianglePoints(java.util.List<Point3D> sourceList)
        Using the set of points, using a Mode.TRIANGLES can be used to draw a polygon
        Parameters:
        sourceList -
        Returns:
      • isInPolygon_XOY

        public static boolean isInPolygon_XOY(Point3D test,
                                              java.util.List<Point3D> points)
        Is the point in a polygon (a polygon formed by a set of projection points on the XOY plane)
        Parameters:
        test -
        points -
        Returns:
      • PointOnLine

        public static boolean PointOnLine(Point3D p1,
                                          Point3D p2,
                                          Point3D q,
                                          float tolerance)
      • isInLine_XOY

        public static boolean isInLine_XOY(Point3D test,
                                           Point3D p1,
                                           Point3D p2,
                                           float tolerance)