diff options
| author | tech kaczynski <tk@techkaczynski.dev> | 2026-10-19 01:47:08 +1000 |
|---|---|---|
| committer | tech kaczynski <tk@techkaczynski.dev> | 2026-10-19 01:47:08 +1000 |
| commit | edc50a43a0ab064472aa7fde90f14cf456d92076 (patch) | |
| tree | c0281123898ddfa2d94683cbcd4cd85dd0d6ad6b /editor.h | |
| parent | cc4ba95edf2927eda63af1aeb79a503bc6fe6182 (diff) | |
lots of editor work. Improved editor camera controls.
Diffstat (limited to 'editor.h')
| -rw-r--r-- | editor.h | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -3,6 +3,7 @@ #include "common.h" #include "ent.h" +#include "cam.h" typedef enum { ED_ACTION_TRANSFORM, @@ -10,6 +11,7 @@ typedef enum { ED_ACTION_DELETE, ED_ACTION_RENAME, ED_ACTION_MODEL, + ED_ACTION_PHYSICS, } EditorActionTag; typedef union { @@ -29,6 +31,7 @@ typedef union { } rename; ModelCmp model; + PhysicsCmp physics; } EditorActionData; typedef struct { @@ -53,9 +56,26 @@ typedef enum { ED_PNL_TYPE_PROPERTIES, ED_PNL_TYPE_SPACE, ED_PNL_TYPE_MODEL_PICKER, + ED_PNL_TYPE_PHYSICS_ELEMENTS, + ED_PNL_TYPE_PHYSICS_PROPERTIES, ED_PNL_TYPE_CMD, } EditorPanelType; +typedef enum { + ED_MODE_SCENE, + ED_MODE_ENTITY, + ED_MODE_PHYSICS, +} EditorModeTag; + +typedef enum { + ED_INTERACT_NONE, + ED_INTERACT_SELECT, + ED_INTERACT_MOVE, + ED_INTERACT_ROTATE, + ED_INTERACT_SCALE, + ED_INTERACT_CAMERA, +} EditorInteraction; + typedef struct { Vec3 sel_point; Quaternion sel_rot; @@ -63,6 +83,14 @@ typedef struct { f32 grid_sz; + u64 physics_pid; + int physics_body, physics_shape; + Vec2 physics_scroll; + CameraInfo scene_cam; + bool draw_physics; + + EditorModeTag mode, prev_mode; + EditorInteraction interact; EditorPanelContainer focus; bool focus_captured; struct { |
