ModelNode class final

A node in a decoded model's hierarchy.

The hierarchy exists so animation has something to target. A flattened list of surfaces with baked transforms is enough to draw a static model, but an animation track says "move node 7", and a node that moves has to carry its subtree with it — which is exactly the information flattening throws away.

TRS rather than a matrix, because that is what animation interpolates and what SceneNode stores.

Constructors

ModelNode({String? name, Vector3? translation, Quaternion? rotation, Vector3? scale, List<int>? children, List<int>? surfaces, Map<String, Object?>? extras, int? lightIndex, int? cameraIndex, List<ModelLod>? lods})

Properties

cameraIndex → int?
Index into ModelDocument.cameras, when glTF's own camera key names one on this node.
final
children → List<int>
Indices into ModelDocument.nodes.
final
extras → Map<String, Object?>?
glTF's own extras on this node, carried opaquely — fmt-19's own row. Nothing here reads a key out of it; a decoder copies the JSON object verbatim and a writer copies it back, so whatever an authoring tool put here survives a round trip even though nothing in this engine interprets it.
final
hashCode → int
The hash code for this object.
no setterinherited
lightIndex → int?
Index into ModelDocument.lights, when a KHR_lights_punctual light is attached to this node — fmt-28's own row. Null for the ordinary node, which is nearly all of them.
final
lods → List<ModelLod>
Coarser stand-ins for surfaces, each good up to its own ModelLod.maxScreenFraction — pro-eng-06's own row. Empty for the ordinary node, which is nearly all of them, and for every node in a .f3d written before this field existed: the section is absent rather than empty, and an absent section reads as no LODs for exactly that file.
final
name → String?
final
rotation → Quaternion
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scale → Vector3
final
surfaces → List<int>
Indices into ModelDocument.surfaces drawn at this node.
final
translation → Vector3
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMatrix() → Matrix4
toString() → String
A string representation of this object.
override

Operators

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