aboutsummaryrefslogtreecommitdiff
path: root/src/scene/object_impl.h
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2025-06-27 10:18:39 -0700
committer3gg <3gg@shellblade.net>2025-06-27 10:18:39 -0700
commitbd57f345ed9dbed1d81683e48199626de2ea9044 (patch)
tree4221f2f2a7ad2244d2e93052bd68187ec91b8ea9 /src/scene/object_impl.h
parent9a82ce0083437a4f9f58108b2c23b957d2249ad8 (diff)
Restructure projectHEADmain
Diffstat (limited to 'src/scene/object_impl.h')
-rw-r--r--src/scene/object_impl.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/scene/object_impl.h b/src/scene/object_impl.h
new file mode 100644
index 0000000..88f8e31
--- /dev/null
+++ b/src/scene/object_impl.h
@@ -0,0 +1,26 @@
1#pragma once
2
3#include <gfx/scene/object.h>
4
5#include "types.h"
6
7#include <math/mat4.h>
8
9typedef struct MeshLink {
10 mesh_idx mesh;
11 mesh_link_idx next; // Next MeshLink in the list.
12} MeshLink;
13
14/// Scene object.
15///
16/// A SceneObject does not own its Meshes, and they are instead shared for
17/// re-use. The SceneObject consequently embeds a list of MeshLinks as opposed
18/// to a list of Meshes. The MeshLinks define a list of Meshes, which can be
19/// different for each SceneObject. Each SceneObject may then have a unique list
20/// of Meshes, and the Meshes are re-used.
21typedef struct SceneObject {
22 mesh_link_idx mesh_link; /// First MeshLink in the list.
23 skeleton_idx skeleton; /// 0 for static objects.
24 node_idx parent; /// Parent SceneNode.
25 aabb3 box;
26} SceneObject;