blob: 891c3cd71e34909fcc3f155a9e4c6c7a294af4fa (
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
27
28
29
30
31
32
33
34
35
|
#pragma once
#include <gfx/sizes.h>
#include <math/fwd.h>
#include <math/aabb3.h>
typedef struct Mesh Mesh;
typedef struct SceneNode SceneNode;
typedef struct Skeleton Skeleton;
typedef struct SceneObject SceneObject;
typedef struct ObjectDesc {
size_t num_meshes;
Mesh* meshes[GFX_MAX_NUM_MESHES];
} ObjectDesc;
/// Create a new object.
SceneObject* gfx_make_object(const ObjectDesc*);
/// Destroy the object.
///
/// The object is conveniently removed from the scene graph and its parent scene
/// node is destroyed.
void gfx_destroy_object(SceneObject**);
/// Set the object's skeleton.
void gfx_set_object_skeleton(SceneObject*, const Skeleton*);
/// Gets the object's bounding box.
///
/// The object's bounding box is the bounding box of its mesh geometries.
aabb3 gfx_get_object_aabb(const SceneObject*);
|