CompoundMeshData

class CompoundMeshData(val vertexData: VertexData, val compounds: Map<String, MeshData>) : ICompoundMeshData(source)

Represents a compound mesh data structure containing multiple named sub-meshes and their associated shared vertex data. This class allows manipulation of grouped meshes as a single entity and provides methods for operations like triangulation and converting the meshes to a single data structure.

Constructors

Link copied to clipboard
constructor(vertexData: VertexData, compounds: Map<String, MeshData>)

Properties

Link copied to clipboard
open override val compounds: Map<String, MeshData>

A map of named sub-meshes where the key represents the compound name and the value represents the corresponding mesh data.

Link copied to clipboard
open override val vertexData: VertexData

The shared vertex data associated with the compound meshes.

Functions

Link copied to clipboard
open override fun toMeshData(): MeshData
Link copied to clipboard

Converts the compound mesh data into a map of polygons grouped by their compound names.

Link copied to clipboard
fun ICompoundMeshData.toVertexBuffer(): VertexBuffer

Converts the compound mesh data into a single VertexBuffer for rendering.

Link copied to clipboard
open override fun triangulate(): CompoundMeshData
Link copied to clipboard

Generates a wireframe representation of the compound mesh data.