About to refator tools... again

This commit is contained in:
2025-09-01 17:22:33 -05:00
parent 3ce1566a2e
commit 4541d5219b
14 changed files with 468 additions and 43 deletions

View File

@@ -12,14 +12,27 @@
#define CAMERA_COUNT_MAX 4
typedef enum {
CAMERA_TYPE_PERSPECTIVE,
CAMERA_TYPE_ORTHOGRAPHIC
CAMERA_PROJECTION_TYPE_PERSPECTIVE,
CAMERA_PROJECTION_TYPE_ORTHOGRAPHIC
} cameraprojectiontype_t;
typedef struct {
cameraprojectiontype_t type;
typedef enum {
CAMERA_VIEW_TYPE_MATRIX,
CAMERA_VIEW_TYPE_LOOKAT
} cameraviewtype_t;
mat4 transform;
typedef struct {
cameraprojectiontype_t projType;
cameraviewtype_t viewType;
union {
mat4 view;
struct {
float_t position[3];
float_t target[3];
float_t up[3];
} lookat;
};
union {
struct {
@@ -38,9 +51,6 @@ typedef struct {
float_t farClip;
} camera_t;
extern camera_t CAMERA_DATA[CAMERA_COUNT_MAX];
extern camera_t *CAMERA_MAIN;
/**
* Initializes a camera to default values.
*/