lux.h File Reference

#include <cmath>
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
#include <boost/serialization/vector.hpp>
#include <boost/serialization/string.hpp>
#include <boost/serialization/split_member.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/enable_shared_from_this.hpp>
#include <malloc.h>
#include <alloca.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
#include <iostream>
#include <algorithm>
#include <assert.h>
#include "randomgen.h"
Include dependency graph for lux.h:

Go to the source code of this file.

Classes

struct  lux::TsPack

Namespaces

namespace  lux

Defines

#define _GNU_SOURCE   1
#define BC_GRID_SIZE   40
#define GRID(v)   (int((v) * BC_GRID_SIZE))
#define M_PI   3.14159265358979323846f
#define INV_PI   0.31830988618379067154f
#define INV_TWOPI   0.15915494309189533577f
#define LUX_VERSION   0.6
#define LUX_VERSION_STRING   "0.6.1"
#define COLOR_SAMPLES   3
#define LUX_PATH_SEP   ":"
#define _GNU_SOURCE   1
#define BC_GRID_SIZE   40
#define GRID(v)   (int((v) * BC_GRID_SIZE))
#define M_PI   3.14159265358979323846f
#define INV_PI   0.31830988618379067154f
#define INV_TWOPI   0.15915494309189533577f
#define LUX_VERSION   0.6
#define LUX_VERSION_STRING   "0.6.1"
#define COLOR_SAMPLES   3
#define LUX_PATH_SEP   ":"
#define _GNU_SOURCE   1
#define BC_GRID_SIZE   40
#define GRID(v)   (int((v) * BC_GRID_SIZE))
#define M_PI   3.14159265358979323846f
#define INV_PI   0.31830988618379067154f
#define INV_TWOPI   0.15915494309189533577f
#define LUX_VERSION   0.6
#define LUX_VERSION_STRING   "0.6.1"
#define COLOR_SAMPLES   3
#define LUX_PATH_SEP   ":"
#define _GNU_SOURCE   1
#define BC_GRID_SIZE   40
#define GRID(v)   (int((v) * BC_GRID_SIZE))
#define M_PI   3.14159265358979323846f
#define INV_PI   0.31830988618379067154f
#define INV_TWOPI   0.15915494309189533577f
#define LUX_VERSION   0.6
#define LUX_VERSION_STRING   "0.6.1"
#define COLOR_SAMPLES   3
#define LUX_PATH_SEP   ":"
#define _GNU_SOURCE   1
#define BC_GRID_SIZE   40
#define GRID(v)   (int((v) * BC_GRID_SIZE))
#define M_PI   3.14159265358979323846f
#define INV_PI   0.31830988618379067154f
#define INV_TWOPI   0.15915494309189533577f
#define LUX_VERSION   0.6
#define LUX_VERSION_STRING   "0.6.1"
#define COLOR_SAMPLES   3
#define LUX_PATH_SEP   ":"
#define _GNU_SOURCE   1
#define BC_GRID_SIZE   40
#define GRID(v)   (int((v) * BC_GRID_SIZE))
#define M_PI   3.14159265358979323846f
#define INV_PI   0.31830988618379067154f
#define INV_TWOPI   0.15915494309189533577f
#define LUX_VERSION   0.6
#define LUX_VERSION_STRING   "0.6.1"
#define COLOR_SAMPLES   3
#define LUX_PATH_SEP   ":"
#define _GNU_SOURCE   1
#define BC_GRID_SIZE   40
#define GRID(v)   (int((v) * BC_GRID_SIZE))
#define M_PI   3.14159265358979323846f
#define INV_PI   0.31830988618379067154f
#define INV_TWOPI   0.15915494309189533577f
#define LUX_VERSION   0.6
#define LUX_VERSION_STRING   "0.6.1"
#define COLOR_SAMPLES   3
#define LUX_PATH_SEP   ":"
#define _GNU_SOURCE   1
#define BC_GRID_SIZE   40
#define GRID(v)   (int((v) * BC_GRID_SIZE))
#define M_PI   3.14159265358979323846f
#define INV_PI   0.31830988618379067154f
#define INV_TWOPI   0.15915494309189533577f
#define LUX_VERSION   0.6
#define LUX_VERSION_STRING   "0.6.1"
#define COLOR_SAMPLES   3
#define LUX_PATH_SEP   ":"
#define _GNU_SOURCE   1
#define BC_GRID_SIZE   40
#define GRID(v)   (int((v) * BC_GRID_SIZE))
#define M_PI   3.14159265358979323846f
#define INV_PI   0.31830988618379067154f
#define INV_TWOPI   0.15915494309189533577f
#define LUX_VERSION   0.6
#define LUX_VERSION_STRING   "0.6.1"
#define COLOR_SAMPLES   3
#define LUX_PATH_SEP   ":"
#define _GNU_SOURCE   1
#define BC_GRID_SIZE   40
#define GRID(v)   (int((v) * BC_GRID_SIZE))
#define M_PI   3.14159265358979323846f
#define INV_PI   0.31830988618379067154f
#define INV_TWOPI   0.15915494309189533577f
#define LUX_VERSION   0.6
#define LUX_VERSION_STRING   "0.6.1"
#define COLOR_SAMPLES   3
#define LUX_PATH_SEP   ":"
#define _GNU_SOURCE   1
#define BC_GRID_SIZE   40
#define GRID(v)   (int((v) * BC_GRID_SIZE))
#define M_PI   3.14159265358979323846f
#define INV_PI   0.31830988618379067154f
#define INV_TWOPI   0.15915494309189533577f
#define LUX_VERSION   0.6
#define LUX_VERSION_STRING   "0.6.1"
#define COLOR_SAMPLES   3
#define LUX_PATH_SEP   ":"
#define _GNU_SOURCE   1
#define BC_GRID_SIZE   40
#define GRID(v)   (int((v) * BC_GRID_SIZE))
#define M_PI   3.14159265358979323846f
#define INV_PI   0.31830988618379067154f
#define INV_TWOPI   0.15915494309189533577f
#define LUX_VERSION   0.6
#define LUX_VERSION_STRING   "0.6.1"
#define COLOR_SAMPLES   3
#define LUX_PATH_SEP   ":"
#define _GNU_SOURCE   1
#define BC_GRID_SIZE   40
#define GRID(v)   (int((v) * BC_GRID_SIZE))
#define M_PI   3.14159265358979323846f
#define INV_PI   0.31830988618379067154f
#define INV_TWOPI   0.15915494309189533577f
#define LUX_VERSION   0.6
#define LUX_VERSION_STRING   "0.6.1"
#define COLOR_SAMPLES   3
#define LUX_PATH_SEP   ":"
#define _GNU_SOURCE   1
#define BC_GRID_SIZE   40
#define GRID(v)   (int((v) * BC_GRID_SIZE))
#define M_PI   3.14159265358979323846f
#define INV_PI   0.31830988618379067154f
#define INV_TWOPI   0.15915494309189533577f
#define LUX_VERSION   0.6
#define LUX_VERSION_STRING   "0.6.1"
#define COLOR_SAMPLES   3
#define LUX_PATH_SEP   ":"

Typedefs

typedef double StatsCounterType
typedef unsigned char u_char
typedef unsigned short u_short
typedef unsigned int u_int
typedef unsigned long u_long
typedef vector< intSampleGrid [BC_GRID_SIZE][BC_GRID_SIZE]

Functions

bool ParseFile (const char *filename)
unsigned int lux::DJBHash (const std::string &str)
bool lux::SolveLinearSystem2x2 (const float A[2][2], const float B[2], float x[2])
ImageData * lux::ReadImage (const string &name)
template<class T >
Lerp (float t, T v1, T v2)
template<class T >
Clamp (T val, T low, T high)
int Round2Int (double val)
int Round2Int (float val)
int Mod (int a, int b)
float Radians (float deg)
float Degrees (float rad)
float Log2 (float x)
int Log2Int (float v)
bool IsPowerOf2 (int v)
u_int RoundUpPow2 (u_int v)
template<class T >
int Float2Int (T val)
int Floor2Int (double val)
int Floor2Int (float val)
int Ceil2Int (double val)
int Ceil2Int (float val)
bool Quadratic (float A, float B, float C, float *t0, float *t1)
float SmoothStep (float min, float max, float value)

Define Documentation

#define _GNU_SOURCE   1
#define _GNU_SOURCE   1
#define _GNU_SOURCE   1
#define _GNU_SOURCE   1
#define _GNU_SOURCE   1
#define _GNU_SOURCE   1
#define _GNU_SOURCE   1
#define _GNU_SOURCE   1
#define _GNU_SOURCE   1
#define _GNU_SOURCE   1
#define _GNU_SOURCE   1
#define _GNU_SOURCE   1
#define _GNU_SOURCE   1
#define _GNU_SOURCE   1

Definition at line 71 of file lux.h.

#define BC_GRID_SIZE   40
#define BC_GRID_SIZE   40
#define BC_GRID_SIZE   40
#define BC_GRID_SIZE   40
#define BC_GRID_SIZE   40
#define BC_GRID_SIZE   40
#define BC_GRID_SIZE   40
#define BC_GRID_SIZE   40
#define BC_GRID_SIZE   40
#define BC_GRID_SIZE   40
#define BC_GRID_SIZE   40
#define BC_GRID_SIZE   40
#define BC_GRID_SIZE   40
#define BC_GRID_SIZE   40

Definition at line 113 of file lux.h.

#define COLOR_SAMPLES   3
#define COLOR_SAMPLES   3
#define COLOR_SAMPLES   3
#define COLOR_SAMPLES   3
#define COLOR_SAMPLES   3
#define COLOR_SAMPLES   3
#define COLOR_SAMPLES   3
#define COLOR_SAMPLES   3
#define COLOR_SAMPLES   3
#define COLOR_SAMPLES   3
#define COLOR_SAMPLES   3
#define COLOR_SAMPLES   3
#define COLOR_SAMPLES   3
#define COLOR_SAMPLES   3
#define GRID (  )     (int((v) * BC_GRID_SIZE))
#define GRID (  )     (int((v) * BC_GRID_SIZE))
#define GRID (  )     (int((v) * BC_GRID_SIZE))
#define GRID (  )     (int((v) * BC_GRID_SIZE))
#define GRID (  )     (int((v) * BC_GRID_SIZE))
#define GRID (  )     (int((v) * BC_GRID_SIZE))
#define GRID (  )     (int((v) * BC_GRID_SIZE))
#define GRID (  )     (int((v) * BC_GRID_SIZE))
#define GRID (  )     (int((v) * BC_GRID_SIZE))
#define GRID (  )     (int((v) * BC_GRID_SIZE))
#define GRID (  )     (int((v) * BC_GRID_SIZE))
#define GRID (  )     (int((v) * BC_GRID_SIZE))
#define GRID (  )     (int((v) * BC_GRID_SIZE))
#define GRID (  )     (int((v) * BC_GRID_SIZE))

Definition at line 115 of file lux.h.

#define INV_PI   0.31830988618379067154f
#define INV_PI   0.31830988618379067154f
#define INV_PI   0.31830988618379067154f
#define INV_PI   0.31830988618379067154f
#define INV_PI   0.31830988618379067154f
#define INV_PI   0.31830988618379067154f
#define INV_PI   0.31830988618379067154f
#define INV_PI   0.31830988618379067154f
#define INV_PI   0.31830988618379067154f
#define INV_PI   0.31830988618379067154f
#define INV_PI   0.31830988618379067154f
#define INV_PI   0.31830988618379067154f
#define INV_PI   0.31830988618379067154f
#define INV_PI   0.31830988618379067154f
#define INV_TWOPI   0.15915494309189533577f
#define INV_TWOPI   0.15915494309189533577f
#define INV_TWOPI   0.15915494309189533577f
#define INV_TWOPI   0.15915494309189533577f
#define INV_TWOPI   0.15915494309189533577f
#define INV_TWOPI   0.15915494309189533577f
#define INV_TWOPI   0.15915494309189533577f
#define INV_TWOPI   0.15915494309189533577f
#define INV_TWOPI   0.15915494309189533577f
#define INV_TWOPI   0.15915494309189533577f
#define INV_TWOPI   0.15915494309189533577f
#define INV_TWOPI   0.15915494309189533577f
#define INV_TWOPI   0.15915494309189533577f
#define INV_TWOPI   0.15915494309189533577f
#define LUX_PATH_SEP   ":"
#define LUX_PATH_SEP   ":"
#define LUX_PATH_SEP   ":"
#define LUX_PATH_SEP   ":"
#define LUX_PATH_SEP   ":"
#define LUX_PATH_SEP   ":"
#define LUX_PATH_SEP   ":"
#define LUX_PATH_SEP   ":"
#define LUX_PATH_SEP   ":"
#define LUX_PATH_SEP   ":"
#define LUX_PATH_SEP   ":"
#define LUX_PATH_SEP   ":"
#define LUX_PATH_SEP   ":"
#define LUX_PATH_SEP   ":"

Definition at line 228 of file lux.h.

#define LUX_VERSION   0.6
#define LUX_VERSION   0.6
#define LUX_VERSION   0.6
#define LUX_VERSION   0.6
#define LUX_VERSION   0.6
#define LUX_VERSION   0.6
#define LUX_VERSION   0.6
#define LUX_VERSION   0.6
#define LUX_VERSION   0.6
#define LUX_VERSION   0.6
#define LUX_VERSION   0.6
#define LUX_VERSION   0.6
#define LUX_VERSION   0.6
#define LUX_VERSION   0.6

Definition at line 222 of file lux.h.

Referenced by main().

#define LUX_VERSION_STRING   "0.6.1"
#define LUX_VERSION_STRING   "0.6.1"
#define LUX_VERSION_STRING   "0.6.1"
#define LUX_VERSION_STRING   "0.6.1"
#define LUX_VERSION_STRING   "0.6.1"
#define LUX_VERSION_STRING   "0.6.1"
#define LUX_VERSION_STRING   "0.6.1"
#define LUX_VERSION_STRING   "0.6.1"
#define LUX_VERSION_STRING   "0.6.1"
#define LUX_VERSION_STRING   "0.6.1"
#define LUX_VERSION_STRING   "0.6.1"
#define LUX_VERSION_STRING   "0.6.1"
#define LUX_VERSION_STRING   "0.6.1"
#define LUX_VERSION_STRING   "0.6.1"

Definition at line 223 of file lux.h.

Referenced by lux::LuxGuiApp::ProcessCommandLine().

#define M_PI   3.14159265358979323846f
#define M_PI   3.14159265358979323846f
#define M_PI   3.14159265358979323846f
#define M_PI   3.14159265358979323846f
#define M_PI   3.14159265358979323846f
#define M_PI   3.14159265358979323846f
#define M_PI   3.14159265358979323846f
#define M_PI   3.14159265358979323846f
#define M_PI   3.14159265358979323846f
#define M_PI   3.14159265358979323846f
#define M_PI   3.14159265358979323846f
#define M_PI   3.14159265358979323846f
#define M_PI   3.14159265358979323846f
#define M_PI   3.14159265358979323846f

Definition at line 215 of file lux.h.

Referenced by blender::blend(), lux::CylindricalMapping2D::cylinder(), lux::WardIsotropic::D(), Degrees(), lux::Ekernel(), lux::LightPhotonMap::EPhoton(), lux::ExPhotonIntegrator::estimateE(), lux::FresnelBlend::f(), lux::CookTorrance::f(), lux::Torus::FindIntersection(), lux::LoopSubdiv::GenerateNormals(), lux::EnvironmentCamera::GenerateRay(), lux::CarPaint::GetBSDF(), lux::EnvironmentCamera::GetSamplePosition(), lux::SkyLight::GetSkySpectralRadiance(), lux::IrradianceCache::IndirectLo(), lux::InfiniteAreaLightIS::InfiniteAreaLightIS(), lux::Sphere::Intersect(), lux::Paraboloid::Intersect(), lux::LensComponent::Intersect(), lux::Hyperboloid::Intersect(), lux::Disk::Intersect(), lux::Cylinder::Intersect(), lux::Cone::Intersect(), lux::Sphere::IntersectP(), lux::Paraboloid::IntersectP(), lux::Hyperboloid::IntersectP(), lux::Disk::IntersectP(), lux::Cylinder::IntersectP(), lux::Cone::IntersectP(), lux::SunLight::Le(), lux::SkyLight::Le(), lux::InfiniteAreaLight::Le(), lux::PhotonIntegrator::LPhoton(), lux::SkyLight::Pdf(), lux::InfiniteAreaLightIS::Pdf(), lux::InfiniteAreaLight::Pdf(), lux::Blinn::Pdf(), lux::PerspectiveCamera::PerspectiveCamera(), PhaseDifference(), lux::SunLight::Power(), lux::SpotLight::Power(), lux::SkyLight::Power(), lux::ProjectionLight::Power(), lux::PointLight::Power(), lux::AreaLight::Power(), lux::InfiniteAreaLightIS::Power(), lux::InfiniteAreaLight::Power(), lux::DistantLight::Power(), lux::IGIIntegrator::Preprocess(), Radians(), lux::BxDF::rho(), RiAngleBetween(), lux::WardIsotropic::Sample_f(), lux::Lafortune::Sample_f(), lux::Blinn::Sample_f(), lux::Beckmann::Sample_f(), lux::Anisotropic::Sample_f(), lux::SunLight::Sample_L(), lux::SkyLight::Sample_L(), lux::InfiniteAreaLightIS::Sample_L(), lux::InfiniteAreaLight::Sample_L(), lux::DistantLight::Sample_L(), lux::AreaLight::Sample_L(), lux::EnvironmentCamera::Sample_W(), lux::Anisotropic::sampleFirstQuadrant(), lux::PerspectiveCamera::SampleLens(), lux::RegularDataSpectrumTexture< T >::SetPower(), lux::IrregularDataSpectrumTexture< T >::SetPower(), lux::GaussianSpectrumTexture< T >::SetPower(), lux::FrequencySpectrumTexture< T >::SetPower(), lux::EqualEnergySpectrumTexture< T >::SetPower(), lux::ConstantRGBColorTexture< T >::SetPower(), lux::BlackBodySpectrumTexture< T >::SetPower(), lux::LanczosSincFilter::Sinc1D(), lux::SkyLight::SkyLight(), lux::SphericalPhi(), blender::tex_saw(), blender::tex_tri(), and lux::Torus::Torus().


Typedef Documentation

typedef vector<int> SampleGrid[BC_GRID_SIZE][BC_GRID_SIZE]

Definition at line 114 of file lux.h.

typedef double StatsCounterType

Definition at line 108 of file lux.h.

typedef unsigned char u_char

Definition at line 109 of file lux.h.

typedef unsigned int u_int

Definition at line 111 of file lux.h.

typedef unsigned long u_long

Definition at line 112 of file lux.h.

typedef unsigned short u_short

Definition at line 110 of file lux.h.


Function Documentation

int Ceil2Int ( float  val  )  [inline]

Definition at line 316 of file lux.h.

int Ceil2Int ( double  val  )  [inline]
template<class T >
T Clamp ( val,
low,
high 
) [inline]
float Degrees ( float  rad  )  [inline]

Definition at line 283 of file lux.h.

References M_PI.

template<class T >
int Float2Int ( val  )  [inline]
int Floor2Int ( float  val  )  [inline]

Definition at line 310 of file lux.h.

int Floor2Int ( double  val  )  [inline]
bool IsPowerOf2 ( int  v  )  [inline]
template<class T >
T Lerp ( float  t,
v1,
v2 
) [inline]
float Log2 ( float  x  )  [inline]

Definition at line 286 of file lux.h.

Referenced by Log2Int(), and lux::MIPMapImpl< T, U >::Lookup().

int Log2Int ( float  v  )  [inline]
int Mod ( int  a,
int  b 
) [inline]
bool ParseFile ( const char *  filename  ) 
bool Quadratic ( float  A,
float  B,
float  C,
float *  t0,
float *  t1 
) [inline]
float Radians ( float  deg  )  [inline]
int Round2Int ( float  val  )  [inline]

Definition at line 267 of file lux.h.

int Round2Int ( double  val  )  [inline]
u_int RoundUpPow2 ( u_int  v  )  [inline]
float SmoothStep ( float  min,
float  max,
float  value 
) [inline]

Definition at line 337 of file lux.h.

References Clamp().

Referenced by lux::IGIIntegrator::Li().

Generated by  doxygen 1.6.2-20100208