paysages : Small refactor.
git-svn-id: https://subversion.assembla.com/svn/thunderk/paysages@424 b1fd45b6-86a6-48da-8261-f70d1f35bdcc
This commit is contained in:
parent
07077845b3
commit
6cd571f92f
5 changed files with 14 additions and 14 deletions
|
@ -10,8 +10,8 @@
|
|||
#include "lighting.h"
|
||||
#include "render.h"
|
||||
#include "tools.h"
|
||||
#include "preetham.h"
|
||||
#include "rayleigh.h"
|
||||
#include "skypreetham.h"
|
||||
#include "skyrayleigh.h"
|
||||
|
||||
#define SPHERE_SIZE 1000.0
|
||||
|
||||
|
@ -245,11 +245,11 @@ Color skyGetColor(SkyDefinition* definition, Renderer* renderer, Vector3 eye, Ve
|
|||
|
||||
if (definition->model == SKY_MODEL_PREETHAM)
|
||||
{
|
||||
sky_color = preethamGetSkyColor(eye, look, sun_position, definition->model_preetham.turbidity);
|
||||
sky_color = skyPreethamGetColor(eye, look, sun_position, definition->model_preetham.turbidity);
|
||||
}
|
||||
else if (definition->model == SKY_MODEL_RAYLEIGH_MIE)
|
||||
{
|
||||
sky_color = rayleighGetSkyColor(eye, look, sun_position);
|
||||
sky_color = skyRayleighGetColor(eye, look, sun_position);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "preetham.h"
|
||||
#include "skypreetham.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
|
@ -50,7 +50,7 @@ static inline void _directionToThetaPhi(Vector3 direction, double* theta, double
|
|||
*theta = M_PI_2 - asin(direction.y);
|
||||
}
|
||||
|
||||
Color preethamGetSkyColor(Vector3 viewer, Vector3 direction, Vector3 sun_direction, double turbidity)
|
||||
Color skyPreethamGetColor(Vector3 viewer, Vector3 direction, Vector3 sun_direction, double turbidity)
|
||||
{
|
||||
double theta, phi;
|
||||
double thetaSun, phiSun;
|
||||
|
@ -130,7 +130,7 @@ Color preethamGetSkyColor(Vector3 viewer, Vector3 direction, Vector3 sun_directi
|
|||
return _xyYToRGB(x, y, Y);
|
||||
}
|
||||
|
||||
Color preethamApplyToObject(Vector3 viewer, Vector3 object_location, Vector3 sun_direction, double turbidity, Color object_color)
|
||||
Color skyPreethamApplyToObject(Vector3 viewer, Vector3 object_location, Vector3 sun_direction, double turbidity, Color object_color)
|
||||
{
|
||||
/* TODO Aerial perspective */
|
||||
return object_color;
|
|
@ -10,8 +10,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
Color preethamGetSkyColor(Vector3 viewer, Vector3 direction, Vector3 sun_direction, double turbidity);
|
||||
Color preethamApplyToObject(Vector3 viewer, Vector3 object_location, Vector3 sun_direction, double turbidity, Color object_color);
|
||||
Color skyPreethamGetColor(Vector3 viewer, Vector3 direction, Vector3 sun_direction, double turbidity);
|
||||
Color skyPreethamApplyToObject(Vector3 viewer, Vector3 object_location, Vector3 sun_direction, double turbidity, Color object_color);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
#include "rayleigh.h"
|
||||
#include "skyrayleigh.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
|
@ -71,12 +71,12 @@ static Vector3 _computeIncidentLight(Ray r)
|
|||
return 20 * (sumR * phaseR * _betaR + sumM * phaseM * _betaM);
|
||||
}*/
|
||||
|
||||
Color rayleighGetSkyColor(Vector3 viewer, Vector3 direction, Vector3 sun_direction)
|
||||
Color skyRayleighGetColor(Vector3 viewer, Vector3 direction, Vector3 sun_direction)
|
||||
{
|
||||
return COLOR_BLACK;
|
||||
}
|
||||
|
||||
Color rayleighApplyToObject(Vector3 viewer, Vector3 object_location, Vector3 sun_direction, Color object_color)
|
||||
Color skyRayleighApplyToObject(Vector3 viewer, Vector3 object_location, Vector3 sun_direction, Color object_color)
|
||||
{
|
||||
return COLOR_BLACK;
|
||||
}
|
|
@ -10,8 +10,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
Color rayleighGetSkyColor(Vector3 viewer, Vector3 direction, Vector3 sun_direction);
|
||||
Color rayleighApplyToObject(Vector3 viewer, Vector3 object_location, Vector3 sun_direction, Color object_color);
|
||||
Color skyRayleighGetColor(Vector3 viewer, Vector3 direction, Vector3 sun_direction);
|
||||
Color skyRayleighApplyToObject(Vector3 viewer, Vector3 object_location, Vector3 sun_direction, Color object_color);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
Loading…
Reference in a new issue