Mesh

class Mesh(raw: ERROR CLASS: Symbol not found for CValue<ERROR CLASS: Symbol not found for raylib.internal.Mesh>)

Represents a raylib mesh.

Constructors

Link copied to clipboard
constructor(raw: ERROR CLASS: Symbol not found for CValue<ERROR CLASS: Symbol not found for raylib.internal.Mesh>)

Types

Link copied to clipboard
object Companion

Generates various standard 3D meshes.

Link copied to clipboard
data class Vertex(val x: Float, val y: Float, val z: Float, val tx: Float, val ty: Float, val tx2: Float, val ty2: Float, val nx: Float, val ny: Float, val nz: Float, val tax: Float, val tay: Float, val taz: Float, val taw: Float, val color: Color)

Represents a mesh vertex.

Properties

Link copied to clipboard
var animatedNormals: List<ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float>>

The normals of the animated vertices of the mesh after bone transformations.

Link copied to clipboard
var animatedVertices: List<ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float>>

The positions of the animated vertices of the mesh after bone transformations.

Link copied to clipboard

The number of bones in the mesh.

Link copied to clipboard

The bone transformation matrices of the mesh.

Link copied to clipboard

The bone IDs affecting each vertex of the mesh.

Link copied to clipboard

The bounding box of the mesh.

Link copied to clipboard

The tangents of the mesh.

Link copied to clipboard

Gets the transformation matrices for all bones affecting each vertex.

Link copied to clipboard

The number of triangle objects on the mesh.

Link copied to clipboard

The number of vertices on the mesh.

Link copied to clipboard

The vertices of the mesh.

Functions

Link copied to clipboard
fun addVertex(vertex: Mesh.Vertex)

Adds a vertex to the mesh.

Link copied to clipboard
fun createTangents(): ERROR CLASS: Unresolved name: memScoped

Computes the mesh tangents.

Link copied to clipboard
fun export(fileName: String)
fun export(file: File)

Exports the mesh data to a file.

Link copied to clipboard
fun exportAsCode(fileName: String)
fun exportAsCode(file: File)

Exports the mesh data as code to a C header file.

Link copied to clipboard
fun getBoneId(vertexIndex: Int, boneIndex: Int): Int
fun getBoneId(vertex: Mesh.Vertex, boneIndex: Int): Int

Gets the bone ID for a specific vertex and bone index. The ID can be used to look up the corresponding bone transformation matrix.

Link copied to clipboard
fun getTransform(vertexIndex: Int, boneIndex: Int): Matrix4?
fun getTransform(vertex: Mesh.Vertex, boneIndex: Int): Matrix4?

Gets the transformation matrix for a specific vertex and bone index.

Link copied to clipboard
fun getTransformForBone(boneIndex: Int): Matrix4?

Gets the transformation matrix for a specific bone index.

Link copied to clipboard
fun removeVertex(index: Int)

Removes a vertex from the mesh at the specified index.

Link copied to clipboard
fun transform(matrix: Matrix4)

Applies a transformation matrix to the mesh.

Link copied to clipboard
fun upload(dynamic: Boolean = true): ERROR CLASS: Unresolved name: memScoped

Uploads the mesh data to the GPU.