techkaczynski.dev / code

summaryrefslogtreecommitdiff
path: root/editor.h
diff options
context:
space:
mode:
Diffstat (limited to 'editor.h')
-rw-r--r--editor.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/editor.h b/editor.h
index 07ad48d..808a1ee 100644
--- a/editor.h
+++ b/editor.h
@@ -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 {