summaryrefslogtreecommitdiff
path: root/gfx/include/gfx/scene/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/include/gfx/scene/README.md')
-rw-r--r--gfx/include/gfx/scene/README.md27
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
3A 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
15Scene graphs typically expose functions on nodes to add/remove objects, cameras,
16lights, etc. This implementation forces the hierarchy to be a strict tree and
17not a more general DAG. Given this, and to avoid confusion, we instead expose
18functions to set the parent node of an object/camera/light. If we exposed the
19former, the API could create the illusion that the hierarchy can be a DAG.
20
21The strict tree hierarchy should not be that restrictive in practice. Even the
22glTF 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
25graph (DAG) or scene graph, but a disjoint union of strict trees. That is, no
26node may be a direct descendant of more than one node. This restriction is meant
27to simplify implementation and facilitate conformance.*