96 struct scene_audio_emitter;
98 struct scene_hit_sphere;
scene_node_attachment_type
Definition: core_resource_types.h:14
This file contains global type definitions which are used throughout the entire engine and applicatio...
#define KAPI
Import/export qualifier.
Definition: defines.h:205
unsigned int u32
Unsigned 32-bit integer.
Definition: defines.h:25
_Bool b8
8-bit boolean type
Definition: defines.h:58
float f32
32-bit floating point number
Definition: defines.h:47
unsigned long long u64
Unsigned 64-bit integer.
Definition: defines.h:28
A global handle system for Kohi. Handles are used to obtain various resources using a unique handle i...
u64 kname
A kname is a string hash made for quick comparisons versus traditional string comparisons.
Definition: kname.h:36
Contains various math types required for the engine.
struct scene_static_mesh_metadata scene_static_mesh_metadata
KAPI b8 scene_node_exists(const scene *s, kname name)
struct scene_water_plane_metadata scene_water_plane_metadata
KAPI b8 scene_node_local_matrix_get_by_name(const scene *scene, kname name, mat4 *out_matrix)
KAPI b8 scene_node_xform_get_by_name(const scene *scene, kname name, khandle *out_xform_handle)
struct scene_skybox_metadata scene_skybox_metadata
KAPI b8 scene_node_local_matrix_get(const scene *scene, khandle node_handle, mat4 *out_matrix)
struct scene_attachment scene_attachment
KAPI b8 scene_initialize(scene *scene)
Performs initialization routines on the scene, including processing configuration (if provided) and s...
KAPI b8 scene_node_child_name_get_by_index(const scene *s, kname name, u32 index, kname *out_child_name)
u32 scene_flags
Definition: scene.h:65
KAPI b8 scene_create(kasset_scene *config, scene_flags flags, scene *out_scene)
Creates a new scene with the given config with default values. No resources are allocated....
KAPI b8 scene_node_child_count_get(const scene *s, kname name, u32 *out_child_count)
KAPI void scene_destroy(scene *s)
Destroys the scene, releasing any remaining resources held by it. Automatically triggers unload if sc...
struct scene_terrain_metadata scene_terrain_metadata
KAPI b8 scene_terrain_render_data_query_from_line(const scene *scene, vec3 direction, vec3 center, f32 radius, struct frame_data *p_frame_data, u32 *out_count, struct geometry_render_data **out_geometries)
KAPI b8 scene_mesh_render_data_query(const scene *scene, const frustum *f, vec3 center, struct frame_data *p_frame_data, u32 *out_count, struct geometry_render_data **out_geometries)
KAPI void scene_update_lod_from_view_position(scene *scene, const struct frame_data *p_frame_data, vec3 view_position, f32 near_clip, f32 far_clip)
Updates LODs of items in the scene based on the given position and clipping distances.
KAPI void scene_render_frame_prepare(scene *scene, const struct frame_data *p_frame_data)
KAPI b8 scene_load(scene *scene)
Performs loading routines and resource allocation on the given scene.
struct scene_node_metadata scene_node_metadata
KAPI b8 scene_mesh_render_data_query_from_line(const scene *scene, vec3 direction, vec3 center, f32 radius, struct frame_data *p_frame_data, u32 *out_count, struct geometry_render_data **out_geometries)
scene_flag
Definition: scene.h:55
@ SCENE_FLAG_READONLY
Definition: scene.h:61
@ SCENE_FLAG_NONE
Definition: scene.h:56
KAPI b8 scene_node_xform_get(const scene *scene, khandle node_handle, khandle *out_xform_handle)
KAPI b8 scene_debug_render_data_query(scene *scene, u32 *data_count, struct geometry_render_data **debug_geometries)
KAPI b8 scene_unload(scene *scene, b8 immediate)
Performs unloading routines and resource de-allocation on the given scene. A scene is also destroyed ...
KAPI b8 scene_save(scene *s)
KAPI b8 scene_terrain_render_data_query(const scene *scene, const frustum *f, vec3 center, struct frame_data *p_frame_data, u32 *out_count, struct geometry_render_data **out_terrain_geometries)
scene_state
Definition: scene.h:29
@ SCENE_STATE_LOADING
In the process of loading the hierarchy.
Definition: scene.h:35
@ SCENE_STATE_INITIALIZED
Configuration parsed, not yet loaded hierarchy setup.
Definition: scene.h:33
@ SCENE_STATE_LOADED
Everything is loaded, ready to play.
Definition: scene.h:37
@ SCENE_STATE_UNLOADING
In the process of unloading, not ready to play.
Definition: scene.h:39
@ SCENE_STATE_UNINITIALIZED
created, but nothing more.
Definition: scene.h:31
@ SCENE_STATE_UNLOADED
Unloaded and ready to be destroyed.
Definition: scene.h:41
KAPI b8 scene_update(scene *scene, const struct frame_data *p_frame_data)
Performs any required scene updates for the given frame.
KAPI b8 scene_raycast(scene *scene, const struct ray *r, struct raycast_result *out_result)
KAPI b8 scene_water_plane_query(const scene *scene, const frustum *f, vec3 center, struct frame_data *p_frame_data, u32 *out_count, struct water_plane ***out_water_planes)
Represents a camera that can be used for a variety of things, especially rendering....
Definition: camera.h:21
Definition: debug_grid.h:20
A directional light, typically used to emulate sun/moon light.
Definition: light_system.h:33
Engine-level current frame-specific data.
Definition: frame_data.h:11
Definition: math_types.h:272
Definition: renderer_types.h:35
Definition: hierarchy_graph.h:50
Definition: kasset_types.h:321
A handle is a unique identifier used a system in the engine to avoid using raw pointers where possibl...
Definition: khandle.h:25
Represents an instance of a static mesh. This is to be used in the world. Material instances are obta...
Definition: static_mesh_system.h:14
A point light, the most common light source, which radiates out from the given position.
Definition: light_system.h:64
Represents a line which starts at an origin and proceed infinitely in the given direction....
Definition: geometry_3d.h:9
Definition: geometry_3d.h:28
kname * tags
Definition: scene.h:52
scene_node_attachment_type attachment_type
Definition: scene.h:45
khandle hierarchy_node_handle
Definition: scene.h:47
u32 tag_count
Definition: scene.h:51
khandle resource_handle
Definition: scene.h:49
scene_flags flags
Definition: scene.h:102
scene_state state
Definition: scene.h:104
struct terrain * terrains
Definition: scene.h:133
struct point_light * point_lights
Definition: scene.h:116
debug_grid grid
Definition: scene.h:164
scene_attachment * water_plane_attachments
Definition: scene.h:149
scene_water_plane_metadata * water_plane_metadata
Definition: scene.h:151
scene_attachment * directional_light_attachments
Definition: scene.h:113
kname name
Definition: scene.h:107
hierarchy_graph hierarchy
Definition: scene.h:169
struct scene_volume * volumes
Definition: scene.h:154
scene_attachment * point_light_attachments
Definition: scene.h:118
scene_attachment * terrain_attachments
Definition: scene.h:135
scene_static_mesh_metadata * mesh_metadata
Definition: scene.h:130
u32 id
Definition: scene.h:101
char * description
Definition: scene.h:108
scene_terrain_metadata * terrain_metadata
Definition: scene.h:137
struct scene_hit_sphere * hit_spheres
Definition: scene.h:159
scene_attachment * skybox_attachments
Definition: scene.h:142
struct skybox * skyboxes
Definition: scene.h:140
struct water_plane * water_planes
Definition: scene.h:147
struct directional_light * dir_lights
Definition: scene.h:111
scene_attachment * mesh_attachments
Definition: scene.h:128
kstatic_mesh_instance * static_meshes
Definition: scene.h:126
scene_attachment * hit_sphere_attachments
Definition: scene.h:161
kasset_scene * config
Definition: scene.h:167
b8 enabled
Definition: scene.h:105
struct scene_audio_emitter * audio_emitters
Definition: scene.h:121
scene_attachment * audio_emitter_attachments
Definition: scene.h:123
scene_attachment * volume_attachments
Definition: scene.h:156
scene_skybox_metadata * skybox_metadata
Definition: scene.h:144
scene_node_metadata * node_metadata
Definition: scene.h:174
u32 node_metadata_count
Definition: scene.h:177
Definition: water_plane.h:13
a 4x4 matrix, typically used to represent object transformations.
Definition: math_types.h:195
A 3-element vector.
Definition: math_types.h:49