UpAxis enum
document as a project of imported objects, which is what opening a glTF becomes.
Every mesh arrives as ImportedGeometry and stays that way. Building half-edge topology for it is what makes a mesh editable, and it costs a pass over every triangle plus the welding decisions that come with it: two vertices at the same position with different normals are one vertex to a modeller and two to a renderer, and which one the file meant is a question only the person opening it can answer. So it is an import option rather than something done behind somebody's back — an object is drawn, moved and exported as it arrived until somebody asks for it to be editable.
The node hierarchy is the transform, and the surface matrix is ignored. A surface carries the world matrix its node composes to, so reading both would place every child by its ancestry twice over. Local TRS per node is also what a modeller then edits: dragging the shoulder has to take the hand with it.
A node drawing several surfaces — one glTF mesh with a primitive per material — keeps the first as its own geometry and gets the rest as children at identity, so they draw exactly where they did and each can be given its own material later. The alternative, an empty object with every primitive under it, would double the outliner for the ordinary one-mesh node and break the round trip for every document this file writes.
The materials and images come across as tables and the surfaces keep their indices into them, so a file whose nine bolts share one steel opens as nine objects holding one slot number, and darkening the steel is one edit. A surface naming no material gets no slot rather than slot zero: "unpainted" and "painted with the first material in the file" are different things, and only one of them is what the file said.
Which way is up in the file being imported.
Values
- y → const UpAxis
-
glTF's own convention, and this project's: no adjustment.
- z → const UpAxis
-
Common in CAD and DCC exports (and STL, which specifies no convention at all but is Z-up in practice more often than not). The root is rotated −90° about X, which is the rotation that takes a Z-up model's "up" to Y.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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