[orx-mesh] Add generated and verified documentation

This commit is contained in:
Edwin Jakobs
2025-01-24 20:48:21 +01:00
parent 3073e88875
commit 023b52a4fc
12 changed files with 405 additions and 65 deletions

View File

@@ -30,7 +30,11 @@ private fun ByteBuffer.getColorRGBa(): ColorRGBa {
}
/**
Convert vertex buffer contents to a list of [Polygon] instances
* Converts the vertex buffer into a list of polygons based on the provided vertex count.
* Each polygon is formed by grouping vertices into triangles.
*
* @param vertexCount The number of vertices to process from the vertex buffer. Defaults to the total number of vertices in the buffer.
* @return A list of polygons, where each polygon contains the vertex positions, texture coordinates, colors, and normals.
*/
fun VertexBuffer.toPolygons(vertexCount: Int = this.vertexCount): List<Polygon> {
require(vertexFormat == objVertexFormat)