drawMesh

fun Canvas.drawMesh(mesh: Mesh, material: Material, x: Float, y: Float, z: Float, rotX: Float = 0.0f, rotY: Float = 0.0f, rotZ: Float = 0.0f, rotAngle: Float = 0.0f, scaleX: Float = 0.0f, scaleY: Float = 0.0f, scaleZ: Float = 0.0f)
fun Canvas.drawMesh(mesh: Mesh, material: Material, x: Int, y: Int, z: Int, rotX: Float = 0.0f, rotY: Float = 0.0f, rotZ: Float = 0.0f, rotAngle: Float = 0.0f, scaleX: Float = 1.0f, scaleY: Float = 1.0f, scaleZ: Float = 1.0f)

Draws a 3D mesh on the canvas with position, rotation, and scale.

Parameters

mesh

The mesh to draw.

material

The material to apply to the mesh.

x

The X position of the mesh.

y

The Y position of the mesh.

z

The Z position of the mesh.

rotX

The X axis of rotation.

rotY

The Y axis of rotation.

rotZ

The Z axis of rotation.

rotAngle

The angle of rotation in degrees.

scaleX

The X scale of the mesh.

scaleY

The Y scale of the mesh.

scaleZ

The Z scale of the mesh.


fun Canvas.drawMesh(mesh: Mesh, material: Material, position: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float>, rotationAxis: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float>, rotationAngle: Float, scale: ERROR CLASS: Symbol not found for Triple<kotlin/Float, kotlin/Float, kotlin/Float>)

Draws a 3D mesh on the canvas with position, rotation, and scale.

Parameters

mesh

The mesh to draw.

material

The material to apply to the mesh.

position

The position of the mesh as a Triple of floats (x, y, z).

rotationAxis

The axis of rotation as a Triple of floats (x, y, z).

rotationAngle

The angle of rotation in degrees.

scale

The scale of the mesh as a Triple of floats (sx, sy, sz).


fun Canvas.drawMesh(mesh: Mesh, material: Material, transform: Matrix4)

Draws a 3D mesh on the canvas.

Parameters

mesh

The mesh to draw.

material

The material to apply to the mesh.

transform

The transformation matrix to apply to the mesh.


fun Canvas.drawMesh(mesh: Mesh, material: Material, vararg transformations: Matrix4)

Draws multiple instances of a 3D mesh on the canvas.

Parameters

mesh

The mesh to draw.

material

The material to apply to the mesh.

transformations

The transformation matrices to apply to each instance of the mesh.


fun Canvas.drawMesh(mesh: Mesh, material: Material, transformations: List<Matrix4>)

Draws multiple instances of a 3D mesh on the canvas.

Parameters

mesh

The mesh to draw.

material

The material to apply to the mesh.

transformations

The list of transformation matrices to apply to each instance of the mesh.


fun Canvas.drawMesh(mesh: Mesh, material: Material)

Draws a 3D mesh on the canvas with identity transform (at origin).

Parameters

mesh

The mesh to draw.

material

The material to apply to the mesh.