blob: 91e14273c7591f9a8301a489ba4b4d667cb6b274 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#pragma once
#include <gfx/scene/object.h>
#include "types.h"
#include <math/mat4.h>
typedef struct MeshLink {
mesh_idx mesh;
mesh_link_idx next; // Next MeshLink in the list.
} MeshLink;
/// Scene object.
///
/// A SceneObject does not own its Meshes, and they are instead shared for
/// re-use. The SceneObject consequently embeds a list of MeshLinks as opposed
/// to a list of Meshes. The MeshLinks define a list of Meshes, which can be
/// different for each SceneObject. Each SceneObject may then have a unique list
/// of Meshes, and the Meshes are re-used.
typedef struct SceneObject {
mesh_link_idx mesh_link; /// First MeshLink in the list.
skeleton_idx skeleton;
node_idx parent; /// Parent SceneNode.
aabb3 box;
} SceneObject;
|