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
ConstructorsConstructorDescriptionSyShapePolygon(List<com.io7m.jtensors.core.parameterized.vectors.PVector2I<T>> points) A convex polygon. -
Method Summary
Modifier and TypeMethodDescriptioncom.io7m.jregions.core.parameterized.areas.PAreaI<T> final booleanIndicates whether some other object is "equal to" this one.final inthashCode()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.points()Returns the value of thepointsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SyShapePolygon
-
-
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
- Specified by:
boundingAreain interfaceSyShapeType<T extends SySpaceType>- Returns:
- The size of the shape
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
points
-