Michaël Lemaire
878614e13c
git-svn-id: https://subversion.assembla.com/svn/thunderk/paysages@252 b1fd45b6-86a6-48da-8261-f70d1f35bdcc
56 lines
1.5 KiB
C
56 lines
1.5 KiB
C
#ifndef _PAYSAGES_WATER_H_
|
|
#define _PAYSAGES_WATER_H_
|
|
|
|
#include "shared/types.h"
|
|
#include "renderer.h"
|
|
#include "lighting.h"
|
|
#include "noise.h"
|
|
#include <stdio.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct
|
|
{
|
|
double height;
|
|
double transparency;
|
|
double reflection;
|
|
SurfaceMaterial material;
|
|
Color depth_color;
|
|
double transparency_depth;
|
|
double lighting_depth;
|
|
NoiseGenerator* waves_noise;
|
|
double waves_noise_height;
|
|
double waves_noise_scale;
|
|
} WaterDefinition;
|
|
|
|
typedef struct
|
|
{
|
|
Vector3 location;
|
|
Color base;
|
|
Color reflected;
|
|
Color refracted;
|
|
Color final;
|
|
} WaterResult;
|
|
|
|
void waterInit();
|
|
void waterSave(FILE* f, WaterDefinition* definition);
|
|
void waterLoad(FILE* f, WaterDefinition* definition);
|
|
|
|
WaterDefinition waterCreateDefinition();
|
|
void waterDeleteDefinition(WaterDefinition* definition);
|
|
void waterCopyDefinition(WaterDefinition* source, WaterDefinition* destination);
|
|
void waterValidateDefinition(WaterDefinition* definition);
|
|
|
|
HeightInfo waterGetHeightInfo(WaterDefinition* definition);
|
|
Color waterLightFilter(WaterDefinition* definition, Renderer* renderer, Color light, Vector3 location, Vector3 light_location, Vector3 direction_to_light);
|
|
WaterResult waterGetColorDetail(WaterDefinition* definition, Renderer* renderer, Vector3 location, Vector3 look);
|
|
Color waterGetColor(WaterDefinition* definition, Renderer* renderer, Vector3 location, Vector3 look);
|
|
void waterRender(WaterDefinition* definition, Renderer* renderer);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|