ObjDocument class final

The decoded contents of an OBJ file.

A ModelDocument, so it shares materials, images and surfaces with the glTF decoder and can be uploaded by the same code.

Inheritance

Constructors

ObjDocument({required List<ModelSurface> surfaces, required List<SurfaceMaterial> materials, required List<EncodedImage> images, required List<String> warnings, List<String> materialNames = const <String>[]})
const

Properties

animations → List<AnimationClip>
Clips that drive nodes. Empty for formats that carry no animation.
no setterinherited
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 setterinherited
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 setterinherited
hashCode → int
The hash code for this object.
no setterinherited
images → List<EncodedImage>
final
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 setterinherited
materialNames → List<String>
Names parallel to materials, preserving what usemtl referred to.
final
materials → List<SurfaceMaterial>
final
nodes → List<ModelNode>
The model's node hierarchy.
no setterinherited
roots → List<int>
Indices into nodes with no parent.
no setterinherited
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 setterinherited
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 setterinherited
surfaces → List<ModelSurface>
final
triangleCount → int
no setterinherited
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 setterinherited
vertexCount → int
no setterinherited
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.
final

Methods

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

Operators

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