Mesh

@Serializable
data class Mesh(var name: String? = null, val primitives: List<GLTF2.Primitive> = emptyList(), val weights: FloatArray? = null, val extensions: JsonElement? = null, val extras: JsonElement? = null) : GLTFProperty

Constructors

Link copied to clipboard
constructor(name: String? = null, primitives: List<GLTF2.Primitive> = emptyList(), weights: FloatArray? = null, extensions: JsonElement? = null, extras: JsonElement? = null)

Properties

Link copied to clipboard
open override val extensions: JsonElement? = null

JSON object with extension-specific objects.

Link copied to clipboard
open override val extras: JsonElement? = null

Although extras MAY have any type, it is common for applications to store and access custom data as key/value pairs. Therefore, extras SHOULD be a JSON object rather than a primitive value for best portability.

Link copied to clipboard
open override var name: String?
Link copied to clipboard

An array of primitives, each defining geometry to be rendered.

Link copied to clipboard
val weights: FloatArray? = null

Array of weights to be applied to the morph targets. The number of array elements MUST match the number of morph targets.

Link copied to clipboard
@Transient
val weightsVector: Vector4

Functions

Link copied to clipboard
fun getBounds(gltf: GLTF2): AABB3D