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
isRenderable bool
Whether this node contributes pixels during a render pass.
no setter
isTransparent bool
Whether this node requires back-to-front alpha ordering.
no setter
localAabb Aabb
Override to provide local-space bounding box.
no setter
localMatrix → Matrix4
Local transform matrix.
no setter
name String
getter/setter pair
ownWorldAabb Aabb
Computes the AABB of this node's own geometry in world space (without descendants). Used for self-hits in raycasting and physics.
no setter
parent Node?
no setter
pointable Pointable?
getter/setter pair
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 AND all its descendants in world space. Group nodes have no geometry, so their own box would be a phantom ±0.5m cube at their position — using it for culling wrongly discarded entire subtrees. The union is cached and invalidated on any transform or hierarchy change in the subtree.
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