MeshDataBuilder

class MeshDataBuilder

A builder for MeshData.

Constructors

MeshDataBuilder
Link copied to clipboard
common
fun MeshDataBuilder()

Types

Companion
Link copied to clipboard
common
object Companion
FaceVertex
Link copied to clipboard
common
data class FaceVertex(positionIndex: Int, texCoordIndex: Int, normalIndex: Int)
Indices for a single face vertex.

Functions

addFace
Link copied to clipboard
common
fun addFace(indices: List<MeshDataBuilder.FaceVertex>): MeshDataBuilder
Adds another face to the mesh.
addNormal
Link copied to clipboard
common
fun addNormal(normal: Vec3): MeshDataBuilder
Adds another normal vector to the mesh.
fun addNormal(coordinates: List<Float>): MeshDataBuilder
Adds another normal vector to the mesh.
addTextureCoordinates
Link copied to clipboard
common
fun addTextureCoordinates(coordinates: Vec2): MeshDataBuilder
Adds another texture coordinates to the mesh.
fun addTextureCoordinates(coordinates: List<Float>): MeshDataBuilder
Adds another texture coordinates to the mesh.
addVertex
Link copied to clipboard
common
fun addVertex(vertexPos: Vec3): MeshDataBuilder
Adds another vertex position to the mesh.
fun addVertex(coordinates: List<Float>): MeshDataBuilder
Adds another vertex position to the mesh.
buildArrayMeshData
Link copied to clipboard
common
fun buildArrayMeshData(): ArrayMeshData
Builds a container for the array buffers data related to a single mesh, without indices.