IIndexedPolygon

Represents an indexed polygon in 3D space. The polygon is defined using indices referencing the various attributes (e.g., position, texture coordinates, normals) provided in an external vertex data.

Inheritors

Properties

Link copied to clipboard
abstract val bitangents: List<Int>

Bitangents, optional

Link copied to clipboard
abstract val colors: List<Int>

Color indices, optional

Link copied to clipboard
abstract val normals: List<Int>

Normal indices, optional

Link copied to clipboard
abstract val positions: List<Int>

Position indices

Link copied to clipboard
abstract val tangents: List<Int>

Tangents, optional

Link copied to clipboard
abstract val textureCoords: List<Int>

Texture coordinate indices, optional

Functions

Link copied to clipboard
open fun base(vertexData: IVertexData): Matrix44
Link copied to clipboard
open fun isConvex(vertexData: IVertexData): Boolean

Determines if the polygon defined by the given vertex data is convex.

Link copied to clipboard
open fun isPlanar(vertexData: IVertexData, eps: Double = 0.01): Boolean

Checks if the polygon defined by the given vertex data is planar.

Link copied to clipboard
open fun normal(vertexData: IVertexData): Vector3

Computes the normal vector of the polygon based on the given vertex data.

Link copied to clipboard
fun IIndexedPolygon.point(vertexData: IVertexData, barycentric: Vector3): Point

Computes a Point by interpolating vertex attributes from a 3D polygon using barycentric coordinates.

Link copied to clipboard
fun IIndexedPolygon.position(vertexData: IVertexData, barycentric: Vector3): Vector3

Computes the 3D position of a point in a polygon using barycentric coordinates.

Link copied to clipboard
abstract fun toPolygon(vertexData: IVertexData): IPolygon

Converts the provided vertex data into a polygon representation.