MutablePolygon

class MutablePolygon(val positions: MutableList<Vector3> = mutableListOf(), val textureCoords: MutableList<Vector2> = mutableListOf(), val colors: MutableList<ColorRGBa> = mutableListOf(), val normals: MutableList<Vector3> = mutableListOf(), val tangents: MutableList<Vector3> = mutableListOf(), val bitangents: MutableList<Vector3> = mutableListOf()) : IPolygon(source)

A mutable implementation of the IPolygon interface that represents a polygon in 3D space. This class allows modification of the polygon's attributes such as vertex positions, texture coordinates, colors, normals, tangents, and bitangents.

Constructors

Link copied to clipboard
constructor(positions: MutableList<Vector3> = mutableListOf(), textureCoords: MutableList<Vector2> = mutableListOf(), colors: MutableList<ColorRGBa> = mutableListOf(), normals: MutableList<Vector3> = mutableListOf(), tangents: MutableList<Vector3> = mutableListOf(), bitangents: MutableList<Vector3> = mutableListOf())

Creates a mutable polygon with optional initial values for positions, texture coordinates, colors, normals, tangents, and bitangents. If no initial values are provided, empty mutable lists are used.

Properties

Link copied to clipboard
open override val bitangents: MutableList<Vector3>

The mutable list of bitangent vectors for the polygon vertices, represented as Vector3.

Link copied to clipboard
open override val colors: MutableList<ColorRGBa>

The mutable list of color values for the polygon vertices, represented as ColorRGBa.

Link copied to clipboard
open override val normals: MutableList<Vector3>

The mutable list of normal vectors for the polygon vertices, represented as Vector3.

Link copied to clipboard
open override val positions: MutableList<Vector3>

The mutable list of 3D positions of the polygon vertices, represented as Vector3.

Link copied to clipboard
open override val tangents: MutableList<Vector3>

The mutable list of tangent vectors for the polygon vertices, represented as Vector3.

Link copied to clipboard
open override val textureCoords: MutableList<Vector2>

The mutable list of 2D texture coordinates for the polygon vertices, represented as Vector2.

Functions

Link copied to clipboard
open override fun transform(t: Matrix44): MutablePolygon

Transforms the polygon using a given 4x4 transformation matrix.