Polygon
class Polygon(val positions: List<Vector3> = emptyList(), val textureCoords: List<Vector2> = emptyList(), val colors: List<ColorRGBa> = emptyList(), val normals: List<Vector3> = emptyList(), val tangents: List<Vector3> = emptyList(), val bitangents: List<Vector3> = emptyList()) : IPolygon(source)
Represents a polygon in 3D space with immutable attributes such as positions, texture coordinates, colors, normals, tangents, and bitangents. Provides methods to transform the polygon and convert it to a mutable version.
Parameters
positions
The list of 3D positions of the polygon vertices.
textureCoords
The list of 2D texture coordinates for the polygon vertices.
colors
The list of color values for the polygon vertices.
normals
The list of normal vectors for the polygon vertices.
tangents
The list of tangent vectors for the polygon vertices.
bitangents
The list of bitangent vectors for the polygon vertices.