# Record Class SyShapePolygon<T extends SySpaceType>

java.lang.Object
java.lang.Record
com.io7m.jsycamore.api.rendering.SyShapePolygon<T>

Type Parameters:
  `T` - The coordinate space type
Record Components:
  `points` - The points

All Implemented Interfaces:
  `SyShapeType<T>`

public record SyShapePolygon<T extends SySpaceType>(List<com.io7m.jtensors.core.parameterized.vectors.PVector2I<T extends SySpaceType>> points) extends Record implements SyShapeType<T>
A convex polygon.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SyShapePolygon(List<com.io7m.jtensors.core.parameterized.vectors.PVector2I<T>> points)`
  A convex polygon.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `com.io7m.jregions.core.parameterized.areas.PAreaI<T>`
  `boundingArea()`
  `final boolean`
  `equals(Object o)`
  Indicates whether some other object is "equal to" this one.
  `final int`
  `hashCode()`
  Returns a hash code value for this object.
  `static <T extends SySpaceType>
  SyShapePolygon<T>`
  `of(com.io7m.jtensors.core.parameterized.vectors.PVector2I<T>... points)`
  Create a polygon from the given array of points.
  `List<com.io7m.jtensors.core.parameterized.vectors.PVector2I<T>>`
  `points()`
  Returns the value of the `points` record component.
  `final String`
  `toString()`
  Returns a string representation of this record class.

  ### Methods inherited from class Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### SyShapePolygon

    public SyShapePolygon(List<com.io7m.jtensors.core.parameterized.vectors.PVector2I<T>> points)
    A convex polygon.
    Parameters:
      `points` - The points

- ## Method Details

  - ### of

    public static <T extends SySpaceType> SyShapePolygon<T> of(com.io7m.jtensors.core.parameterized.vectors.PVector2I<T>... points)
    Create a polygon from the given array of points.
    Type Parameters:
      `T` - The coordinate space type
    Parameters:
      `points` - The points
    Returns:
      A convex polygon

  - ### boundingArea

    public com.io7m.jregions.core.parameterized.areas.PAreaI<T> boundingArea()
    Specified by:
      `boundingArea` in interface `SyShapeType<T extends SySpaceType>`
    Returns:
      The size of the shape

  - ### toString

    public final String toString()
    Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
    Specified by:
      `toString` in class `Record`
    Returns:
      a string representation of this object

  - ### hashCode

    public final int hashCode()
    Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
    Specified by:
      `hashCode` in class `Record`
    Returns:
      a hash code value for this object

  - ### equals

    public final boolean equals(Object o)
    Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with `Objects::equals(Object,Object)`.
    Specified by:
      `equals` in class `Record`
    Parameters:
      `o` - the object with which to compare
    Returns:
      `true` if this object is the same as the `o` argument; `false` otherwise.

  - ### points

    public List<com.io7m.jtensors.core.parameterized.vectors.PVector2I<T>> points()
    Returns the value of the `points` record component.
    Returns:
      the value of the `points` record component