ModelData class final

A model, ready for the GPU: meshes as interleaved vertices and indices, materials, encoded images, the node tree and its lights. In the file's own axes (glTF: +Y up); the renderer corrects axes once, at the root.

Plain data with no GPU objects, so it can be built in a background isolate and sent back.

Constructors

ModelData({required String name, required List<MeshData> meshes, required List<MaterialData> materials, required List<TextureData> textures, required List<ImageData> images, required List<NodeData> nodes, required List<int> roots, required List<LightData> lights, required Aabb3 bounds, List<SkinData> skins = const [], List<AnimationData> animations = const [], List<String> warnings = const []})
A model.

Properties

animations → List<AnimationData>
Animations, by glTF animation index.
final
bounds → Aabb3
Bounds of every mesh instance in the scene, in model space (skinned meshes in their bind pose).
final
hashCode → int
The hash code for this object.
no setterinherited
images → List<ImageData>
Images (still encoded), by glTF image index.
final
lights → List<LightData>
Lights (KHR_lights_punctual), by index.
final
materials → List<MaterialData>
Materials, by glTF material index.
final
meshes → List<MeshData>
Meshes, by glTF mesh index.
final
name → String
Where it came from.
final
nodes → List<NodeData>
Nodes, by glTF node index.
final
roots → List<int>
The nodes of the scene shown, with no parent.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
skins → List<SkinData>
Skins, by glTF skin index.
final
textures → List<TextureData>
Textures, by glTF texture index.
final
warnings → List<String>
Things the loader skipped or approximated, for the editor to show.
final

Methods

forEachNode(void visit(int node, Matrix4 modelFromNode)) → void
Calls visit for every node of the shown scene, parents first, with its transform relative to the model's root.
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