u32 ktransform
Definition: core_resource_types.h:6
This file contains global type definitions which are used throughout the entire engine and applicatio...
#define KAPI
Import/export qualifier.
Definition: defines.h:209
unsigned int u32
Unsigned 32-bit integer.
Definition: defines.h:27
_Bool b8
8-bit boolean type
Definition: defines.h:60
float f32
32-bit floating point number
Definition: defines.h:49
unsigned char u8
Unsigned 8-bit integer.
Definition: defines.h:21
KAPI b8 editor_gizmo_create(editor_gizmo *out_gizmo)
KAPI b8 editor_gizmo_unload(editor_gizmo *gizmo)
KAPI editor_gizmo_orientation editor_gizmo_orientation_get(editor_gizmo *gizmo)
KAPI void editor_gizmo_selected_transform_set(editor_gizmo *gizmo, ktransform ktransform_handle)
struct editor_gizmo editor_gizmo
KAPI mat4 editor_gizmo_model_get(editor_gizmo *gizmo)
KAPI void editor_gizmo_orientation_set(editor_gizmo *gizmo, editor_gizmo_orientation orientation)
KAPI void editor_gizmo_update(editor_gizmo *gizmo, kcamera camera)
KAPI void editor_gizmo_refresh(editor_gizmo *gizmo)
editor_gizmo_mode
Definition: editor_gizmo.h:27
@ EDITOR_GIZMO_MODE_ROTATE
Definition: editor_gizmo.h:30
@ EDITOR_GIZMO_MODE_NONE
Definition: editor_gizmo.h:28
@ EDITOR_GIZMO_MODE_SCALE
Definition: editor_gizmo.h:31
@ EDITOR_GIZMO_MODE_MOVE
Definition: editor_gizmo.h:29
@ EDITOR_GIZMO_MODE_MAX
Definition: editor_gizmo.h:32
editor_gizmo_axis
Definition: editor_gizmo.h:17
@ EDITOR_GIZMO_AXIS_Z
Definition: editor_gizmo.h:20
@ EDITOR_GIZMO_AXIS_Y
Definition: editor_gizmo.h:19
@ EDITOR_GIZMO_AXIS_XYZ
Definition: editor_gizmo.h:24
@ EDITOR_GIZMO_AXIS_XZ
Definition: editor_gizmo.h:22
@ EDITOR_GIZMO_AXIS_X
Definition: editor_gizmo.h:18
@ EDITOR_GIZMO_AXIS_XY
Definition: editor_gizmo.h:21
@ EDITOR_GIZMO_AXIS_YZ
Definition: editor_gizmo.h:23
KAPI void editor_gizmo_handle_interaction(editor_gizmo *gizmo, kcamera camera, struct ray *r, editor_gizmo_interaction_type interaction_type)
KAPI b8 editor_gizmo_initialize(editor_gizmo *gizmo)
editor_gizmo_interaction_type
Definition: editor_gizmo.h:35
@ EDITOR_GIZMO_INTERACTION_TYPE_MOUSE_HOVER
Definition: editor_gizmo.h:37
@ EDITOR_GIZMO_INTERACTION_TYPE_NONE
Definition: editor_gizmo.h:36
@ EDITOR_GIZMO_INTERACTION_TYPE_MOUSE_DRAG
Definition: editor_gizmo.h:39
@ EDITOR_GIZMO_INTERACTION_TYPE_MOUSE_DOWN
Definition: editor_gizmo.h:38
@ EDITOR_GIZMO_INTERACTION_TYPE_CANCEL
Definition: editor_gizmo.h:41
@ EDITOR_GIZMO_INTERACTION_TYPE_MOUSE_UP
Definition: editor_gizmo.h:40
KAPI void editor_gizmo_interaction_begin(editor_gizmo *gizmo, kcamera camera, struct ray *r, editor_gizmo_interaction_type interaction_type)
KAPI void editor_gizmo_interaction_end(editor_gizmo *gizmo)
struct editor_gizmo_mode_data editor_gizmo_mode_data
KAPI void editor_gizmo_mode_set(editor_gizmo *gizmo, editor_gizmo_mode mode)
KAPI void editor_gizmo_destroy(editor_gizmo *gizmo)
KAPI void editor_gizmo_render_frame_prepare(editor_gizmo *gizmo, const struct frame_data *p_frame_data)
editor_gizmo_orientation
Definition: editor_gizmo.h:65
@ EDITOR_GIZMO_ORIENTATION_MAX
The gizmo's transform operations are relative to the current view.
Definition: editor_gizmo.h:72
@ EDITOR_GIZMO_ORIENTATION_GLOBAL
The gizmo's transform operations are relative to global transform.
Definition: editor_gizmo.h:67
@ EDITOR_GIZMO_ORIENTATION_LOCAL
The gizmo's transform operations are relative to local transform.
Definition: editor_gizmo.h:69
KAPI b8 editor_gizmo_load(editor_gizmo *gizmo)
u8 kcamera
Definition: kcamera_system.h:28
Contains various math types required for the engine.
Represents a single vertex in 3D space with position and colour data only.
Definition: math_types.h:477
Definition: debug_line3d.h:8
Definition: editor_gizmo.h:44
vec3 last_interaction_pos
Definition: editor_gizmo.h:61
plane_3d interaction_plane
Definition: editor_gizmo.h:57
u32 * indices
Definition: editor_gizmo.h:49
colour_vertex_3d * vertices
Definition: editor_gizmo.h:46
u32 index_count
Definition: editor_gizmo.h:48
kgeometry geo
Definition: editor_gizmo.h:51
u32 vertex_count
Definition: editor_gizmo.h:45
vec3 interaction_start_pos
Definition: editor_gizmo.h:60
extents_3d * mode_extents
Definition: editor_gizmo.h:54
plane_3d interaction_plane_back
Definition: editor_gizmo.h:58
u32 extents_count
Definition: editor_gizmo.h:53
u8 current_axis_index
Definition: editor_gizmo.h:56
Definition: editor_gizmo.h:75
editor_gizmo_orientation orientation
Indicates the editor transform operaton orientation.
Definition: editor_gizmo.h:91
vec3 initial_scale
Definition: editor_gizmo.h:84
ktransform selected_transform
A handle to the currently selected object's transform. Invalid handle if nothing is selected.
Definition: editor_gizmo.h:79
editor_gizmo_interaction_type interaction
Definition: editor_gizmo.h:96
f32 world_scale
Definition: editor_gizmo.h:102
editor_gizmo_mode mode
The current mode of the gizmo.
Definition: editor_gizmo.h:81
ktransform ktransform_handle
The transform of the gizmo.
Definition: editor_gizmo.h:77
mat4 render_model
Definition: editor_gizmo.h:101
vec3 initial_position
Definition: editor_gizmo.h:83
quat initial_rotation
Definition: editor_gizmo.h:85
editor_gizmo_mode_data mode_data[EDITOR_GIZMO_MODE_MAX+1]
The data for each mode of the gizmo.
Definition: editor_gizmo.h:94
mat4 render_projection
Definition: editor_gizmo.h:104
b8 is_dirty
Definition: editor_gizmo.h:98
f32 scale_scalar
Used to keep the gizmo a consistent size on the screen despite camera distance.
Definition: editor_gizmo.h:88
Represents the extents of a 3d object.
Definition: math_types.h:401
Engine-level current frame-specific data.
Definition: frame_data.h:15
Represents geometry to be used for various purposes (rendering objects in the world,...
Definition: geometry.h:41
Definition: math_types.h:484
Represents a line which starts at an origin and proceed infinitely in the given direction....
Definition: math_types.h:638
a 4x4 matrix, typically used to represent object transformations.
Definition: math_types.h:383
A 3-element vector.
Definition: math_types.h:117
A 4-element vector.
Definition: math_types.h:229