Module fyrox::scene::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§

Structs§

  • See module docs.
  • Graph performance statistics. Allows you to find out “hot” parts of the scene graph, which parts takes the most time to update.
  • A set of switches that allows you to disable a particular step of graph update pipeline.
  • 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 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 put nodes back into graph when user decide to re-do command. Sub-graph allows you to do this without invalidating handles to nodes.

Type Aliases§

  • A helper type alias for node pool.