Module graph

Module graph 

Source
Expand description

Contains all methods and structures to create and manage scene graphs.

Scene graph is the foundation of the engine. Graph is a hierarchical data structure where each element called node. Each node can have zero to one parent node, and any children nodes. Node with no parent node called root, with no children nodes - leaf. Graphical representation can be something like this:

    Root____
      |    |
      D    A___
      |    |  |
      E    C  B
    ............

This picture clearly shows relations between nodes. Such structure allows us to create scenes of any complexity by just linking nodes with each other. Connections between nodes are used to traverse tree, to calculate global transforms, global visibility and many other things. Most interesting here - is global transform calculation - it allows you to produce complex movements just by linking nodes to each other. Good example of this is skeleton which is used in skinning (animating 3d model by set of bones).

Modules§

event
Graph event broadcaster allows you to receive graph events such as node deletion or addition. Check GraphEventBroadcaster::subscribe for examples.
physics
Scene physics module.

Structs§

Graph
See module docs.
GraphPerformanceStatistics
Graph performance statistics. Allows you to find out “hot” parts of the scene graph, which parts takes the most time to update.
GraphUpdateSwitches
A set of switches that allows you to disable a particular step of graph update pipeline.
SubGraph
Sub-graph is a piece of graph that was extracted from a graph. It has ownership over its nodes. It is used to temporarily take ownership of a sub-graph. This could be used if you’re making a scene editor with a command stack - once you reverted a command, that created a complex nodes hierarchy (for example you loaded a model) you must store all added nodes somewhere to be able to put nodes back into graph when user decide to re-do command. Sub-graph allows you to do this without invalidating handles to nodes.

Functions§

isometric_global_transform
Calculates global transform of a scene node without scaling.
isometric_local_transform
Calculates local transform of a scene node without scaling.

Type Aliases§

NodePool
A helper type alias for node pool.