2011-12-17 10:55:37 +00:00
|
|
|
#ifndef _PAYSAGES_SKY_H_
|
|
|
|
#define _PAYSAGES_SKY_H_
|
|
|
|
|
|
|
|
#include "shared/types.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;
|
|
|
|
ColorGradation sun_color;
|
|
|
|
double sun_radius;
|
|
|
|
ColorGradation zenith_color;
|
|
|
|
ColorGradation haze_color;
|
|
|
|
double haze_height;
|
|
|
|
double haze_smoothing;
|
|
|
|
ColorGradation _sky_gradation;
|
|
|
|
} SkyDefinition;
|
|
|
|
|
|
|
|
void skyInit();
|
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
|