On top of all basic 3d graphics classes sits the scene graph, which combines features from different modules, like 3d graphics, sound and physics.
Because the scene graph is implemented in a separated module, one does not need to use it if one prefers to manage all graphics entities himself. This may be very useful for some applications dealing with large amounts of data and which need a specially tailored culling system.
The scene graph module currently has implemented the following features:
- High Resolution Locales. In order to enable designers to build large worlds with small details, Magnum uses one or more so called high resolution locales that contain a subgraph of the complete scene graph. But while all other nodes internally work with 32bit floats for best performance, the high resolution locales have a 64bit double floating point position in the universe. This would allow to build solar systems with two planets, thousands of kilometers away from each other, but on each planet can live tiny animals like ants - without any precision problem.
- Model Entities. A 3d model can be inserted multiple times into the scene graph at different positions without duplicating the underlaying geometry. This saves valuale memory on the graphics card and helps to improve overall performance.
- Mesh Entities. A single mesh or a group of meshes can also be inserted multiple times into the scene graph at different locations without duplication the geometry itself.
- 3D Sound Entities. 3D sounds can be inserted into the scene graph for an immersive experience.
- Behaviour Entities. So called behaviour nodes contain code blocks that form the logic of the world. Behaviour nodes can have bounding volumes used for culling, so only those nodes nearby the observer will get executed.
- Efficient View Frustum Culling. The complete scene graph uses three separated octrees (one for audio, one for graphics and one for behaviour) for efficient culling, so only the visible nodes get drawn, and only the audio and behaviour nodes nearby the observer get executed.
- Efficient Picking. The scene graph also supports efficient picking as needed by 3d graphics applications that allow mouse interactions with the scene.
- Custom Traversers. The scene graph module offers two types of traversers: One type for traversing the logical tree structure of the graph and one that does geometric culling of nodes. Each traverser can be easily modified for application specific behaviour.