Node class

Base node in the scene graph with parent-child hierarchy. All spatial objects inherit from Node.

Implementers

Constructors

Node({String name = '', Transform3D? transform})

Properties

childCount int
no setter
children List<Node>
no setter
hashCode int
The hash code for this object.
no setterinherited
localAabb Aabb
Override to provide local-space bounding box.
no setter
localMatrix → Matrix4
Local transform matrix.
no setter
name String
getter/setter pair
parent Node?
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
transform Transform3D
final
visible bool
getter/setter pair
worldAabb Aabb
Computes the AABB of this node in world space.
no setter
worldMatrix → Matrix4
World transform matrix (accumulated from root).
no setter
worldPosition → Vector3
World position extracted from world matrix.
no setter

Methods

addChild(Node child) → void
collectVisible() List<Node>
Collects all visible nodes in the tree.
findChild(String name) Node?
Finds a child by name recursively.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onRender(Canvas canvas, Matrix4 viewProjection) → void
Override for custom rendering.
onTransformChanged() → void
Called when any transform property changes.
onUpdate(double dt) → void
Override for custom per-frame logic.
removeChild(Node child) → void
removeFromParent() → void
render(Canvas canvas, Matrix4 viewProjection) → void
Renders this node and children to the canvas.
toString() String
A string representation of this object.
override
traverse(void visitor(Node child)) → void
Traverses the tree depth-first, calling visitor for each node.
update(double dt) → void
Called once per frame before rendering.

Operators

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