GraphicsModelAsset class final

The engine's view of a model loaded by just_graphics_engine: its bounds and triangles in engine axes (+Y down), for picking and mesh colliders.

Inheritance

Constructors

GraphicsModelAsset(String path, GraphicsModels models)
The model at path, loaded through models.

Properties

bounds → Aabb3
The model's bounds in its own space, after any axis correction made on import; empty until loaded.
no setteroverride
hashCode → int
The hash code for this object.
no setterinherited
isLoaded → bool
Get load status
no setterinherited
manager → AssetManager?
The manager loading this asset — set before load runs — or null for an asset loaded on its own. An asset that loads others (an atlas its JSON and page images) loads them through it.
no setterinherited
meshNames → List<String>
The names of its meshes, in a stable order.
no setteroverride
models → GraphicsModels
Where it is loaded.
final
path → String
Asset identifier/path
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → AssetType
Asset type
finalinherited

Methods

geometryOf(String meshName) → ModelGeometry?
The triangles of the mesh called meshName in model space, or null when it has none or keeps them only on the GPU.
override
getMemoryUsage() → int
Get memory usage in bytes
override
load() → Future<void>
Load the asset
override
markAsLoaded() → void
Mark the asset as successfully loaded.
inherited
markAsUnloaded() → void
Mark the asset as unloaded. Call this from unload in such subclasses.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reload() → Future<void>
Reads the model again — after GraphicsModels.reload — so its bounds, mesh names and triangles are the new file's.
toString() → String
A string representation of this object.
inherited
unload() → void
Unload the asset and free resources
override

Operators

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

Static Methods

trianglesOf(ModelData data, {int? mesh}) → ModelGeometry?
The triangles of data in engine axes (+Y down), placed by its nodes in its rest pose: of mesh mesh alone, or of every mesh when null. Null when there are none.