2011-12-17 10:55:37 +00:00
|
|
|
#ifndef _PAYSAGES_SKY_H_
|
|
|
|
#define _PAYSAGES_SKY_H_
|
|
|
|
|
|
|
|
#include "shared/types.h"
|
2012-03-08 15:10:25 +00:00
|
|
|
#include "color.h"
|
2012-01-22 22:06:11 +00:00
|
|
|
#include "lighting.h"
|
2011-12-17 10:55:37 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
2011-12-23 22:58:50 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2011-12-17 10:55:37 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
double daytime;
|
2012-03-08 15:10:25 +00:00
|
|
|
ColorGradation* sun_color;
|
2011-12-17 10:55:37 +00:00
|
|
|
double sun_radius;
|
2012-03-08 15:10:25 +00:00
|
|
|
ColorGradation* zenith_color;
|
|
|
|
ColorGradation* haze_color;
|
2011-12-17 10:55:37 +00:00
|
|
|
double haze_height;
|
|
|
|
double haze_smoothing;
|
2012-03-08 15:10:25 +00:00
|
|
|
ColorGradation* _sky_gradation;
|
2011-12-17 10:55:37 +00:00
|
|
|
} SkyDefinition;
|
|
|
|
|
|
|
|
void skyInit();
|
2012-02-12 16:57:29 +00:00
|
|
|
void skyQuit();
|
2012-01-23 23:45:33 +00:00
|
|
|
void skySave(FILE* f, SkyDefinition* definition);
|
|
|
|
void skyLoad(FILE* f, SkyDefinition* definition);
|
2011-12-17 10:55:37 +00:00
|
|
|
|
|
|
|
SkyDefinition skyCreateDefinition();
|
2012-01-23 23:45:33 +00:00
|
|
|
void skyDeleteDefinition(SkyDefinition* definition);
|
|
|
|
void skyCopyDefinition(SkyDefinition* source, SkyDefinition* destination);
|
2011-12-17 10:55:37 +00:00
|
|
|
void skyValidateDefinition(SkyDefinition* definition);
|
|
|
|
|
2012-01-23 23:45:33 +00:00
|
|
|
int skyGetLights(SkyDefinition* sky, LightDefinition* lights, int max_lights);
|
|
|
|
Color skyGetColor(SkyDefinition* definition, Renderer* renderer, Vector3 eye, Vector3 look);
|
2012-01-29 21:45:58 +00:00
|
|
|
void skyRender(SkyDefinition* definition, Renderer* renderer);
|
2011-12-17 10:55:37 +00:00
|
|
|
|
2011-12-23 22:58:50 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2011-12-17 10:55:37 +00:00
|
|
|
#endif
|