About to refator tools... again
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user