ModelDocument class abstract base

A decoded model, whatever format it came from.

The seam between decoders and the rest of the engine: glTF and OBJ both produce one of these, so uploading, instancing and material conversion are written once instead of per format.

Implementers

Constructors

ModelDocument()
A const constructor for the documents that extend this one.
const

Properties

animations → List<AnimationClip>
Clips that drive nodes. Empty for formats that carry no animation.
no setter
asset → DocumentAsset?
What the source file said about itself. Null for a format that carries no such block, or a document nobody has set one on.
no setter
cameras → List<ModelCamera>
Cameras a node in nodes may point at, by ModelNode.cameraIndex. Empty for formats that carry none — OBJ and .f3d among them.
no setter
hashCode → int
The hash code for this object.
no setterinherited
images → List<EncodedImage>
The encoded images the materials' texture bindings refer to by index.
no setter
lights → List<ModelLight>
Punctual lights a node in nodes may point at, by ModelNode.lightIndex — fmt-28's own row. Empty for formats that carry no light, which is every one of them except glTF's own KHR_lights_punctual.
no setter
materials → List<SurfaceMaterial>
The materials surfaces refer to by index.
no setter
nodes → List<ModelNode>
The model's node hierarchy.
no setter
roots → List<int>
Indices into nodes with no parent.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
skins → List<ModelSkin>
Skeletons. Empty for formats that carry no skinning.
no setter
splats → List<ModelSplat>
Gaussian splat clouds, each with the node that carries it — C1. Empty for every format except glTF with KHR_gaussian_splatting; a PLY capture is read by parseSplatPly into a bare SplatCloud instead, since it has no nodes to attach one to.
no setter
surfaces → List<ModelSurface>
Every drawable piece of the model: a mesh, its material index and its transform.
no setter
triangleCount → int
Count of triangles across every surface's mesh.
no setter
variants → List<String>
Names of the material variants a surface may switch to — KHR_materials_variants. A surface's own ModelSurface.variantMaterials says which material it wears in each, by index into this list. Empty for the models that come in one look, which is nearly all of them and every format but glTF and .f3d.
no setter
vertexCount → int
Count of vertices across every surface's mesh.
no setter
warnings → List<String>
Non-fatal findings from decoding: ignored extensions, skipped primitives, unresolved references. Surfaced rather than logged so callers can decide whether to care.
no setter

Methods

computeBounds() → Aabb3
Bounds in the model's own space.
maskUnder(String name) → AnimationMask
The joints at and under the node called name, as a mask a layer takes.
maskUnderIndex(int root) → AnimationMask
The same, from an index into nodes.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited