Documentation of 'georegression.struct.shapes.Polygon2D_F32' Java class
Polygon2D_F32
georegression.struct.shapes

Class Polygon2D_F32

  • All Implemented Interfaces:
    java.io.Serializable


    public class Polygon2D_F32
    extends java.lang.Object
    implements java.io.Serializable
    Describes a polygon in 2D.
    See Also:
    Serialized Form
    • Constructor Detail

      • Polygon2D_F32

        public Polygon2D_F32(int numVertexes)
      • Polygon2D_F32

        public Polygon2D_F32(float... points)
      • Polygon2D_F32

        public Polygon2D_F32()
    • Method Detail

      • set

        public void set(int index,
                        float x,
                        float y)
      • size

        public int size()
      • areaSimple

        public float areaSimple()
        Returns the area for simply polygons. Non-self intersecting convex or concave.
        Returns:
        area
      • isCCW

        public boolean isCCW()
        true if the order of vertexes is in counter clockwise order.
        Returns:
        true if ccw or false if cw
      • isConvex

        public boolean isConvex()
      • isIdentical

        public boolean isIdentical(Polygon2D_F32 a,
                                   float tol)
      • isEquivalent

        public boolean isEquivalent(Polygon2D_F32 a,
                                    float tol)
      • flip

        public void flip()
      • getLine

        public LineSegment2D_F32 getLine(int index,
                                         LineSegment2D_F32 storage)
        Returns the line/edge defined by vertex index and index+1.
        Parameters:
        index - Index of the line
        Returns:
        A new instance of the line segment.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.