Node class
A node in the node hierarchy.
When the node contains skin
, all mesh.primitives
MUST contain
JOINTS_0
and WEIGHTS_0
attributes.
A node MAY have either a matrix
or any combination of
translation
/rotation
/scale
(TRS) properties.
TRS properties are converted to matrices and postmultiplied in the
T * R * S
order to compose the transformation matrix;
first the scale is applied to the vertices, then the rotation, and then the
translation.
If none are provided, the transform is the identity.
When a node is targeted for animation (referenced by an
animation.channel.target), matrix
MUST NOT be present.
Constructors
-
Node.new({required GltfRoot root, required GltfRef<
Camera> ? camera, required List<GltfRef< children, required List<Node> >GltfRef< skeletons, required GltfRef<Node> >Skin> ? skin, required String? jointName, required Matrix4? matrix, required GltfRef<Mesh> ? mesh, required Quaternion? rotation, required Vector3? scale, required Vector3? translation, required List<double> ? weights, required String? name}) -
Node.parse(GltfRoot root, Map<
String, Object?> map)
Properties
-
camera
→ GltfRef<
Camera> ? -
The reference to the camera referenced by this node.
final
-
children
→ List<
GltfRef< Node> > -
The references to this node's children.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- jointName → String?
-
Name used when this node is a joint in a skin.
final
- matrix → Matrix4?
-
A floating-point 4x4 transformation matrix stored in column-major order.
final
-
mesh
→ GltfRef<
Mesh> ? -
The reference to the mesh in this node.
final
- name → String?
-
final
- root → GltfRoot
-
finalinherited
- rotation → Quaternion?
-
The node's unit quaternion rotation in the order (x, y, z, w),
where w is the scalar.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scale → Vector3?
-
The node's non-uniform scale, given as the scaling factors along
the x, y, and z axes.
final
-
skeletons
→ List<
GltfRef< Node> > -
The reference to skeleton nodes.
final
-
skin
→ GltfRef<
Skin> ? -
The reference to the skin referenced by this node.
When a skin is referenced by a node within a scene, all joints used by
the skin MUST belong to the same scene.
When defined,
mesh
MUST also be defined.final - transform → Matrix4
-
no setter
- translation → Vector3?
-
The node's translation along the x, y, and z axes.".
final
-
weights
→ List<
double> ? -
The weights of the instantiated morph target.
The number of array elements MUST match the number of morph targets
of the referenced mesh.
When defined,
mesh
MUST also be defined.final
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