40 * Initializes a scene graph. |
40 * Initializes a scene graph. |
41 * |
41 * |
42 * @param scene the scene graph |
42 * @param scene the scene graph |
43 * @param camera_params initial camera parameters |
43 * @param camera_params initial camera parameters |
44 */ |
44 */ |
45 __attribute__((__nonnull__)) |
|
46 void asc_scene_init_(AscScene *scene, struct asc_camera_init_args camera_params); |
45 void asc_scene_init_(AscScene *scene, struct asc_camera_init_args camera_params); |
47 |
46 |
48 /** |
47 /** |
49 * Initializes a scene graph. |
48 * Initializes a scene graph. |
50 * |
49 * |
58 * |
57 * |
59 * Does nothing when the scene was not initialized. |
58 * Does nothing when the scene was not initialized. |
60 * |
59 * |
61 * @param scene the scene graph |
60 * @param scene the scene graph |
62 */ |
61 */ |
63 __attribute__((__nonnull__)) |
|
64 void asc_scene_destroy(AscScene *scene); |
62 void asc_scene_destroy(AscScene *scene); |
65 |
63 |
66 /** |
64 /** |
67 * Returns a pointer to the scene's camera. |
65 * Returns a pointer to the scene's camera. |
68 * |
66 * |
69 * @param scene the scene graph |
67 * @param scene the scene graph |
70 */ |
68 */ |
71 __attribute__((__nonnull__)) |
|
72 static inline AscCamera *asc_scene_camera(AscScene *scene) { |
69 static inline AscCamera *asc_scene_camera(AscScene *scene) { |
73 return &scene->camera; |
70 return &scene->camera; |
74 } |
71 } |
75 |
72 |
76 void asc_scene_execute_behaviors(AscScene *scene); |
73 void asc_scene_execute_behaviors(AscScene *scene); |
80 * |
77 * |
81 * If @p scene is not initialized, drawing is skipped. |
78 * If @p scene is not initialized, drawing is skipped. |
82 * |
79 * |
83 * @param scene the scene graph |
80 * @param scene the scene graph |
84 */ |
81 */ |
85 __attribute__((__nonnull__)) |
|
86 void asc_scene_draw(AscScene *scene); |
82 void asc_scene_draw(AscScene *scene); |
87 |
83 |
88 __attribute__((__nonnull__)) |
|
89 void asc_scene_add_node(AscScene *scene, AscSceneNode *node); |
84 void asc_scene_add_node(AscScene *scene, AscSceneNode *node); |
90 |
85 |
91 #endif // ASCENSION_SCENE_H |
86 #endif // ASCENSION_SCENE_H |
92 |
87 |