diff options
Diffstat (limited to 'gfx/include/gfx/scene/README.md')
-rw-r--r-- | gfx/include/gfx/scene/README.md | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gfx/include/gfx/scene/README.md b/gfx/include/gfx/scene/README.md new file mode 100644 index 0000000..916596b --- /dev/null +++ b/gfx/include/gfx/scene/README.md | |||
@@ -0,0 +1,27 @@ | |||
1 | # Scene Graph | ||
2 | |||
3 | A scene graph implementation that includes: | ||
4 | |||
5 | - Camera | ||
6 | - Light | ||
7 | - Material | ||
8 | - Mesh | ||
9 | - Node | ||
10 | - Object | ||
11 | - Scene | ||
12 | |||
13 | ## Hierarchy and parenting | ||
14 | |||
15 | Scene graphs typically expose functions on nodes to add/remove objects, cameras, | ||
16 | lights, etc. This implementation forces the hierarchy to be a strict tree and | ||
17 | not a more general DAG. Given this, and to avoid confusion, we instead expose | ||
18 | functions to set the parent node of an object/camera/light. If we exposed the | ||
19 | former, the API could create the illusion that the hierarchy can be a DAG. | ||
20 | |||
21 | The strict tree hierarchy should not be that restrictive in practice. Even the | ||
22 | glTF 2.0 spec [enforces this](https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#nodes-and-hierarchy): | ||
23 | |||
24 | *For Version 2.0 conformance, the glTF node hierarchy is not a directed acyclic | ||
25 | graph (DAG) or scene graph, but a disjoint union of strict trees. That is, no | ||
26 | node may be a direct descendant of more than one node. This restriction is meant | ||
27 | to simplify implementation and facilitate conformance.* | ||