MeshDataBuilder

class MeshDataBuilder

A builder for MeshData.

Constructors

Link copied to clipboard
fun MeshDataBuilder()

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class FaceVertex(    val positionIndex: Int,     val texCoordIndex: Int,     val normalIndex: Int)

Indices for a single face vertex.

Functions

Link copied to clipboard
fun addFace(indices: List<MeshDataBuilder.FaceVertex>): MeshDataBuilder

Adds another face to the mesh.

Link copied to clipboard
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.

Link copied to clipboard
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.

Link copied to clipboard
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.

Link copied to clipboard
fun buildArrayMeshData(): ArrayMeshData

Builds a container for the array buffers data related to a single mesh, without indices.