Blender V4.3
sky_model.cpp File Reference
#include "sky_model.h"
#include "sky_model_data.h"
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>

Go to the source code of this file.

Macros

#define MATH_PI   3.141592653589793
 
#define MATH_DEG_TO_RAD   (MATH_PI / 180.0)
 
#define DEGREES   *MATH_DEG_TO_RAD
 
#define TERRESTRIAL_SOLAR_RADIUS   ((0.51 DEGREES) / 2.0)
 
#define ALLOC(_struct)   ((_struct *)malloc(sizeof(_struct)))
 

Typedefs

typedef unsigned int uint
 
typedef const doubleArHosekSkyModel_Dataset
 
typedef const doubleArHosekSkyModel_Radiance_Dataset
 

Functions

static void ArHosekSkyModel_CookConfiguration (ArHosekSkyModel_Dataset dataset, SKY_ArHosekSkyModelConfiguration config, double turbidity, double albedo, double solar_elevation)
 
static double ArHosekSkyModel_CookRadianceConfiguration (ArHosekSkyModel_Radiance_Dataset dataset, double turbidity, double albedo, double solar_elevation)
 
static double ArHosekSkyModel_GetRadianceInternal (const SKY_ArHosekSkyModelConfiguration configuration, const double theta, const double gamma)
 
void SKY_arhosekskymodelstate_free (SKY_ArHosekSkyModelState *state)
 
double SKY_arhosekskymodel_radiance (SKY_ArHosekSkyModelState *state, double theta, double gamma, double wavelength)
 
SKY_ArHosekSkyModelStateSKY_arhosek_xyz_skymodelstate_alloc_init (const double turbidity, const double albedo, const double elevation)
 

Macro Definition Documentation

◆ ALLOC

#define ALLOC ( _struct)    ((_struct *)malloc(sizeof(_struct)))

Definition at line 106 of file sky_model.cpp.

Referenced by SKY_arhosek_xyz_skymodelstate_alloc_init().

◆ DEGREES

#define DEGREES   *MATH_DEG_TO_RAD

Definition at line 98 of file sky_model.cpp.

◆ MATH_DEG_TO_RAD

#define MATH_DEG_TO_RAD   (MATH_PI / 180.0)

Definition at line 94 of file sky_model.cpp.

◆ MATH_PI

#define MATH_PI   3.141592653589793

◆ TERRESTRIAL_SOLAR_RADIUS

#define TERRESTRIAL_SOLAR_RADIUS   ((0.51 DEGREES) / 2.0)

Definition at line 102 of file sky_model.cpp.

Referenced by SKY_arhosek_xyz_skymodelstate_alloc_init().

Typedef Documentation

◆ ArHosekSkyModel_Dataset

Definition at line 114 of file sky_model.cpp.

◆ ArHosekSkyModel_Radiance_Dataset

Definition at line 115 of file sky_model.cpp.

◆ uint

typedef unsigned int uint

Definition at line 110 of file sky_model.cpp.

Function Documentation

◆ ArHosekSkyModel_CookConfiguration()

static void ArHosekSkyModel_CookConfiguration ( ArHosekSkyModel_Dataset dataset,
SKY_ArHosekSkyModelConfiguration config,
double turbidity,
double albedo,
double solar_elevation )
static

Definition at line 119 of file sky_model.cpp.

References double(), int, MATH_PI, and pow().

Referenced by SKY_arhosek_xyz_skymodelstate_alloc_init().

◆ ArHosekSkyModel_CookRadianceConfiguration()

static double ArHosekSkyModel_CookRadianceConfiguration ( ArHosekSkyModel_Radiance_Dataset dataset,
double turbidity,
double albedo,
double solar_elevation )
static

Definition at line 195 of file sky_model.cpp.

References double(), int, MATH_PI, and pow().

Referenced by SKY_arhosek_xyz_skymodelstate_alloc_init().

◆ ArHosekSkyModel_GetRadianceInternal()

static double ArHosekSkyModel_GetRadianceInternal ( const SKY_ArHosekSkyModelConfiguration configuration,
const double theta,
const double gamma )
static

Definition at line 256 of file sky_model.cpp.

References cos(), exp(), pow(), and sqrt().

Referenced by SKY_arhosekskymodel_radiance().

◆ SKY_arhosek_xyz_skymodelstate_alloc_init()

◆ SKY_arhosekskymodel_radiance()

double SKY_arhosekskymodel_radiance ( SKY_ArHosekSkyModelState * state,
double theta,
double gamma,
double wavelength )

Definition at line 276 of file sky_model.cpp.

References ArHosekSkyModel_GetRadianceInternal(), e, fmod(), int, interp(), result, and state.

◆ SKY_arhosekskymodelstate_free()

void SKY_arhosekskymodelstate_free ( SKY_ArHosekSkyModelState * state)