StlLoader class final

Decodes STL, binary or ASCII.

A triangle soup, and the decoded mesh stays one. STL vertices are not shared between facets — each of a file's triangles is thirty-six bytes (or three vertex lines) with no index into anything — so there is nothing to deduplicate and no smooth-normal question the way OBJ has one: a facet's normal is exactly the one number the format gives it. layout's texcoord/tangent/color slots, when requested, get MeshBuilder's own neutral values, since the format carries none of the three.

Implemented types

Constructors

StlLoader({VertexLayout layout = VertexLayout.standard, StlNormals normals = StlNormals.fromFile})

Properties

hashCode → int
The hash code for this object.
no setterinherited
layout → VertexLayout
final
normals → StlNormals
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

decode(Uint8List bytes, ModelLoadRequest request, AssetUriResolver resolveUri) → Future<ModelDocument>
Reads bytes into a document.
override
handles(String fileName, Uint8List bytes) → bool
Whether this decoder wants the file. fileName may be empty; bytes is the whole file, so a decoder with no useful suffix can sniff its magic.
override
load(Uint8List bytes) → Future<ModelDocument>
Reads bytes, choosing the dialect the same way isBinaryStl does.
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