public class SceneNode
Object in a scene graph. One parent per node; cycles are forbidden. Local transforms are immutable matrices. Meshes/materials can be shared. Example: node = SceneNode("robot", mesh, material); scene.root.add(node)
| Modifier and Type | Member | Description |
|---|---|---|
| public readonly property | childCountchildCount as Int |
Number of children, O(1). |
| public property | isVisibleisVisible as Boolean = true |
Hides this entire subtree when false. |
| public property | materialmaterial as Material |
Immutable material. |
| public property | meshmesh as Mesh |
Optional geometry. |
| public property | namename as String |
Name for selection/debugging. |
| public readonly property | parentparent as SceneNode |
Parent, or null for roots. |
| public property | transform | Local-to-parent transform. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | SceneNode | Creates an object or grouping node. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | addadd(child as SceneNode) as Void |
Attaches a detached node; rejects null, cycles and multiple parents. |
| public | bounds | Computes visible world bounds, O(nodes), using cached mesh bounds. |
| public | childAt | Returns child i in O(1). |
| public | cloneclone() as SceneNode |
Deep-copies the node hierarchy, sharing immutable meshes/materials. |
| public | remove | Detaches a child, returning whether it belonged to this node. |