2011-12-10 13:25:22 +00:00
|
|
|
#ifndef _PAYSAGES_TYPES_H_
|
|
|
|
#define _PAYSAGES_TYPES_H_
|
|
|
|
|
2012-05-29 13:32:23 +00:00
|
|
|
#include "../euclid.h"
|
|
|
|
#include "../color.h"
|
2012-06-17 09:40:40 +00:00
|
|
|
|
2011-12-23 22:58:50 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2012-01-24 13:16:20 +00:00
|
|
|
struct Renderer;
|
2011-12-10 13:25:22 +00:00
|
|
|
|
2012-06-05 20:22:12 +00:00
|
|
|
typedef struct LightDefinition LightDefinition;
|
|
|
|
typedef struct LightStatus LightStatus;
|
|
|
|
|
2012-06-17 09:40:40 +00:00
|
|
|
typedef Color (*f_RenderFragmentCallback)(struct Renderer* renderer, Vector3 location, void* data);
|
2011-12-10 13:25:22 +00:00
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
int width;
|
|
|
|
int height;
|
2012-06-13 15:38:11 +00:00
|
|
|
int antialias;
|
|
|
|
int quality;
|
|
|
|
} RenderParams;
|
2011-12-10 13:25:22 +00:00
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
int length;
|
|
|
|
int alloc_length;
|
|
|
|
int item_size;
|
|
|
|
int dirty;
|
|
|
|
void* data;
|
|
|
|
} Array;
|
|
|
|
|
2012-01-24 13:16:20 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
Color base;
|
2012-06-17 09:40:40 +00:00
|
|
|
double reflection;
|
|
|
|
double shininess;
|
2012-01-24 13:16:20 +00:00
|
|
|
} SurfaceMaterial;
|
|
|
|
|
2012-01-29 21:45:58 +00:00
|
|
|
typedef void (*RenderCallbackStart)(int width, int height, Color background);
|
|
|
|
typedef void (*RenderCallbackDraw)(int x, int y, Color col);
|
2012-06-17 09:40:40 +00:00
|
|
|
typedef void (*RenderCallbackUpdate)(double progress);
|
2012-01-29 21:45:58 +00:00
|
|
|
|
|
|
|
typedef struct RenderArea RenderArea;
|
2011-12-10 13:25:22 +00:00
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
int hit;
|
|
|
|
Color hit_color;
|
|
|
|
Vector3 hit_location;
|
|
|
|
} RayCastingResult;
|
|
|
|
typedef RayCastingResult (*RayCastingFunction)(Vector3 start, Vector3 direction);
|
|
|
|
|
2012-01-29 17:53:12 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
2012-06-17 09:40:40 +00:00
|
|
|
double min_height;
|
|
|
|
double max_height;
|
|
|
|
double base_height;
|
2012-01-29 17:53:12 +00:00
|
|
|
} HeightInfo;
|
|
|
|
|
2012-01-31 11:20:52 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
Vector3 location;
|
2012-06-17 09:40:40 +00:00
|
|
|
double yaw;
|
|
|
|
double pitch;
|
|
|
|
double roll;
|
2012-01-31 11:20:52 +00:00
|
|
|
|
|
|
|
Vector3 target;
|
|
|
|
Vector3 forward;
|
|
|
|
Vector3 right;
|
|
|
|
Vector3 up;
|
|
|
|
|
2012-06-17 09:40:40 +00:00
|
|
|
double width;
|
|
|
|
double height;
|
|
|
|
double yfov;
|
|
|
|
double xratio;
|
|
|
|
double znear;
|
|
|
|
double zfar;
|
2012-01-31 11:20:52 +00:00
|
|
|
|
|
|
|
Matrix4 project;
|
|
|
|
Matrix4 unproject;
|
|
|
|
} CameraDefinition;
|
|
|
|
|
2011-12-23 22:58:50 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2011-12-10 13:25:22 +00:00
|
|
|
#endif
|