Scene Graph
 
 
 

3ds Max scenes are organized internally as trees (directed acyclic graphs with single parents) of INodes. Every element of the scene corresponds to one or more node in the graph. Graph nodes are represented by INode objects. The root of the graph can be retrieved via the method Interface::GetRootNode(). The children of each node can be accessed using INode::NumberOfChildren() and INode::GetChildNode().

Scene Graph Evaluation

The scene graph is evaluated by 3ds Max by calling INode::EvalWorldState() on each of its nodes within a viewport area that needs to be redrawn and if they are invalid. Nodes that are not visible in the viewport are not evaluated at all.

Note: INode::EvalWorldState() should not be called from within post-load-callbacks.

Displaying the Scene Graph

The scene graph is displayed in the viewport using a technique of minimal culling, based on the 2d viewport rectangle. In order to maintain the frame per second rate during animation an adaptive degradation rendering system is used. Bounding boxes and gizmos are drawn after the scene nodes are drawn.

Iterating over the Scene Graph

The preferred way to iterate over the nodes in a scene is to use IScene::EnumTree(). A pointer to the IScene can be retrieved using the method Interface7::GetScene(). The method IScene::EnumTree() takes a callback object as a parameter, that inherits from ITreeEnumProc.