shengine pre-release
shengine by mrsinho
Loading...
Searching...
No Matches
shScene.h
Go to the documentation of this file.
1/**
2 * @file shScene.h
3 * @brief Handling scenes in the `shengine` framework.
4 *
5 * The shScene.h file contains structures and functions related to handling scenes in the `shengine` framework.
6 */
7
8#ifndef SH_SCENE_HANDLE_H
9#define SH_SCENE_HANDLE_H
10
11#ifdef __cplusplus
12extern "C" {
13#endif//__cplusplus
14
15#include <stdint.h>
16
17
18
19typedef struct ShEngine ShEngine;
20typedef struct ShIdentity ShIdentity;
21typedef struct ShCamera ShCamera;
22typedef struct ShTransform ShTransform;
25
26
27
28/**
29 * @brief Initializes the scene in the `shengine` framework.
30 *
31 * @param p_engine Pointer to a valid @ref ShEngine structure.
32 * @return 1 on success, 0 on failure.
33 */
34extern uint8_t shSceneInit(
35 ShEngine* p_engine
36);
37
38/**
39 * @brief Updates the transform in the `shengine` framework.
40 *
41 * @param p_transform Pointer to a valid @ref ShTransform structure.
42 * @return 1 on success, 0 on failure.
43 */
44extern uint8_t shUpdateTransform(
45 ShTransform* p_transform
46);
47
48/**
49 * @brief Updates the camera in the `shengine` framework.
50 *
51 * @param p_engine Pointer to a valid @ref ShEngine structure.
52 * @param p_transform Pointer to a valid @ref ShTransform structure.
53 * @param p_camera Pointer to a valid @ref ShCamera structure.
54 * @return 1 on success, 0 on failure.
55 */
56extern uint8_t shUpdateCamera(
57 ShEngine* p_engine,
58 ShTransform* p_transform,
59 ShCamera* p_camera
60);
61
62/**
63 * @brief Updates the scene in the `shengine` framework.
64 *
65 * @param p_engine Pointer to a valid @ref ShEngine structure.
66 * @return 1 on success, 0 on failure.
67 */
68extern uint8_t shSceneUpdate(
69 ShEngine* p_engine
70);
71
72/**
73 * @brief Ends the scene in the `shengine` framework.
74 *
75 * @param p_engine Pointer to a valid @ref ShEngine structure.
76 * @return 1 on success, 0 on failure.
77 */
78extern uint8_t shEndScene(
79 ShEngine* p_engine
80);
81
82
83
84#ifdef __cplusplus
85}
86#endif//__cplusplus
87
88#endif//SH_SCENE_HANDLE_H
uint8_t shSceneUpdate(ShEngine *p_engine)
Updates the scene in the shengine framework.
Definition shScene.c:133
uint8_t shUpdateCamera(ShEngine *p_engine, ShTransform *p_transform, ShCamera *p_camera)
Updates the camera in the shengine framework.
Definition shScene.c:71
uint8_t shEndScene(ShEngine *p_engine)
Ends the scene in the shengine framework.
Definition shScene.c:159
uint8_t shSceneInit(ShEngine *p_engine)
Initializes the scene in the shengine framework.
Definition shScene.c:16
uint8_t shUpdateTransform(ShTransform *p_transform)
Updates the transform in the shengine framework.
Definition shScene.c:41
struct ShHostMemoryLinker ShHostMemoryLinker
Definition shScene.h:23
Represents a camera component in scene.
Definition shCamera.h:23
Represents the ShEngine structure, which is the main instance of the engine.
Definition shEngine.h:78
Represents an identity component in scene.
Definition shIdentity.h:28
Structure representing properties related to the scene.
Definition shEnvironment.h:164
Represents a transformation in the engine.
Definition shTransform.h:21