Class Quadrilateral_F32

java.lang.Object
georegression.struct.shapes.Quadrilateral_F32
All Implemented Interfaces:
Serializable

@Generated("georegression.struct.shapes.Quadrilateral_F64") public class Quadrilateral_F32 extends Object implements Serializable
A polygon with 4 vertices, a,b,c, and d. The vertices are in order sequential order of a,b,c,d.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • zero

      public void zero()
      Sets the value of all vertexes to be zero
    • area

      public float area()
      Returns the area of this quadrilateral
      Returns:
      area
    • get

      public Point2D_F32 get(int index)
    • getLine

      public LineSegment2D_F32 getLine(int which, LineSegment2D_F32 storage)
    • getSideLength

      public float getSideLength(int which)
    • getSideLength2

      public float getSideLength2(int which)
    • setTo

      public void setTo(Quadrilateral_F32 quad)
    • convert

      public List<Point2D_F32> convert(@Nullable @Nullable List<Point2D_F32> storage, boolean copy)
      Converts the polygon into a list.
      Parameters:
      storage - (Optional) storage to put the vertexes into
      copy - If points will be copied otherwise a reference of points will be returned
      Returns:
      List of vertexes
    • setTo

      public void setTo(List<Point2D_F32> list)
      Sets the polygon to be the same as the list. A true copy is created and no references to points in the list are saved.
      Parameters:
      list - List which the polygon will be set to
    • copy

      public Quadrilateral_F32 copy()
    • isEquals

      public boolean isEquals(Quadrilateral_F32 quad, float tol)
      Returns true if the two quadrilaterals are equal to each other to within tolerance. Equality is defined by seeing if the distance between two equivalent vertexes is within tolerance.
      Parameters:
      quad - The second quadrilateral
      tol - Maximum allowed distance between vertexes.
      Returns:
      true if equals or false if not
    • toString

      public String toString()
      Overrides:
      toString in class Object