Logo Mibo

ModelPart Type

One drawable slice of a content-pipeline Model: a zero-copy wrap of the part's shared vertex/index buffers plus everything a slice draw needs — the part's buffer offsets, its absolute parent-bone transform, and its material.

The content pipeline packs a whole model into shared buffers and stores vertices bone-local, so a part can only be drawn by slice (Draw.meshSlice / Draw.instancedSlice with ModelPart.VertexOffset and ModelPart.StartIndex) and its bone must be folded in front of every world/instance transform — stock ModelMesh.Draw does both internally. Resolve with ModelParts.ofModel.

Static models only. The instanced draw path carries no bone palette, so skinned parts (baked with SkinnedEffect) render in their bind pose. Use Draw.animatedModelInstanced for skinned models.

Record fields

Record Field Description

Bone

Full Usage: Bone

Field type: Matrix

The part's absolute parent-bone transform (CopyAbsoluteBoneTransformsTo). Multiply it in front of every instance world transform; the stored vertices are bone-local. Matrix.Identity when the model has no bones.

Field type: Matrix

Material

Full Usage: Material

Field type: Material3D

Material read from the part's baked pipeline effect (Material3D.fromModelMeshPart).

Field type: Material3D

Mesh

Full Usage: Mesh

Field type: PrimitiveMesh

Zero-copy wrap of the model's shared buffers. PrimitiveCount is the part's triangle count and Bounds the mesh's bounding sphere — both live in the same bone-local space as the stored vertices, so the record is sized for slice draws and shadow-pass culling without re-derivation.

Field type: PrimitiveMesh

StartIndex

Full Usage: StartIndex

Field type: int

The part's first index in the shared index buffer — pass as the startIndex of the slice draw.

Field type: int

VertexOffset

Full Usage: VertexOffset

Field type: int

The part's first vertex in the shared vertex buffer — pass as the vertexOffset (baseVertex) of the slice draw.

Field type: int

Type something to start searching.