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 <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 <boost/shared_ptr.hpp>
#include <boost/enable_shared_from_this.hpp>

Go to the source code of this file.

Namespaces

namespace  lux

Defines

#define BOOST_NO_INTRINSIC_INT64_T
#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 INFINITY   HUGE_VAL
#define LUX_VERSION   0.5
#define LUX_VERSION_STRING   "0.5 (CVS)"
#define RAY_EPSILON   1e-3f
#define COLOR_SAMPLES   3
#define LUX_PATH_SEP   ":"
#define _doublemagicroundeps   (.5-1.4e-11)
#define _doublemagicroundeps   (.5-1.4e-11)
#define BOOST_NO_INTRINSIC_INT64_T
#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 INFINITY   HUGE_VAL
#define LUX_VERSION   0.5
#define LUX_VERSION_STRING   "0.5 (CVS)"
#define RAY_EPSILON   1e-3f
#define COLOR_SAMPLES   3
#define LUX_PATH_SEP   ":"
#define _doublemagicroundeps   (.5-1.4e-11)
#define _doublemagicroundeps   (.5-1.4e-11)
#define BOOST_NO_INTRINSIC_INT64_T
#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 INFINITY   HUGE_VAL
#define LUX_VERSION   0.5
#define LUX_VERSION_STRING   "0.5 (CVS)"
#define RAY_EPSILON   1e-3f
#define COLOR_SAMPLES   3
#define LUX_PATH_SEP   ":"
#define _doublemagicroundeps   (.5-1.4e-11)
#define _doublemagicroundeps   (.5-1.4e-11)

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< int > SampleGrid [BC_GRID_SIZE][BC_GRID_SIZE]

Functions

void luxInit ()
void luxCleanup ()
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])
ImageDatalux::ReadImage (const string &name)
void lux::WriteRGBAImage (const string &name, float *pixels, float *alpha, int xRes, int yRes, int totalXRes, int totalYRes, int xOffset, int yOffset)
void lux::WriteRGBAImageFloat (const string &name, float *pixels, float *alpha, int xRes, int yRes, int totalXRes, int totalYRes, int xOffset, int yOffset)
void lux::WriteIgiImage (const string &name, float *pixels, float *alpha, int xRes, int yRes, int totalXRes, int totalYRes, int xOffset, int yOffset)
template<class T >
Lerp (float t, T v1, T v2)
template<class T >
Clamp (T val, T low, T high)
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)
int Round2Int (double val)
template<class T >
int Float2Int (T val)
template<class T >
int Floor2Int (T val)
template<class T >
int Ceil2Int (T val)
bool Quadratic (float A, float B, float C, float *t0, float *t1)
float SmoothStep (float min, float max, float value)


Define Documentation

#define _doublemagicroundeps   (.5-1.4e-11)

#define _doublemagicroundeps   (.5-1.4e-11)

#define _doublemagicroundeps   (.5-1.4e-11)

#define _doublemagicroundeps   (.5-1.4e-11)

#define _doublemagicroundeps   (.5-1.4e-11)

Definition at line 375 of file luxlex.l.

#define _doublemagicroundeps   (.5-1.4e-11)

Definition at line 375 of file luxlex.l.

Referenced by Ceil2Int(), Float2Int(), Floor2Int(), Log2Int(), and Round2Int().

#define _GNU_SOURCE   1

#define _GNU_SOURCE   1

#define _GNU_SOURCE   1

Definition at line 70 of file luxlex.l.

#define BC_GRID_SIZE   40

#define BC_GRID_SIZE   40

#define BC_GRID_SIZE   40

Definition at line 126 of file luxlex.l.

Referenced by BestCandidate2D(), main(), and Redistribute2D().

#define BOOST_NO_INTRINSIC_INT64_T

#define BOOST_NO_INTRINSIC_INT64_T

#define BOOST_NO_INTRINSIC_INT64_T

Definition at line 34 of file luxlex.l.

#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))

Definition at line 128 of file luxlex.l.

Referenced by addSampleToGrid(), BestCandidate2D(), main(), and Redistribute2D().

#define INFINITY   HUGE_VAL

#define INFINITY   HUGE_VAL

#define INFINITY   HUGE_VAL

#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 LUX_PATH_SEP   ":"

#define LUX_PATH_SEP   ":"

#define LUX_PATH_SEP   ":"

Definition at line 226 of file luxlex.l.

#define LUX_VERSION   0.5

#define LUX_VERSION   0.5

#define LUX_VERSION   0.5

Definition at line 219 of file luxlex.l.

Referenced by main().

#define LUX_VERSION_STRING   "0.5 (CVS)"

#define LUX_VERSION_STRING   "0.5 (CVS)"

#define LUX_VERSION_STRING   "0.5 (CVS)"

Definition at line 220 of file luxlex.l.

Referenced by main(), and lux::LuxGuiApp::ProcessCommandLine().

#define M_PI   3.14159265358979323846f

#define M_PI   3.14159265358979323846f

#define M_PI   3.14159265358979323846f

Definition at line 212 of file luxlex.l.

Referenced by blender::blend(), lux::ConcentricSampleDisk(), lux::CylindricalMapping2D::cylinder(), lux::WardIsotropic::D(), Degrees(), lux::Ekernel(), lux::ExPhotonIntegrator::estimateE(), lux::FresnelBlend::f(), lux::CookTorrance::f(), lux::LoopSubdiv::GenerateNormals(), lux::EnvironmentCamera::GenerateRay(), lux::EnvironmentCamera::GenerateSample(), lux::CarPaint::GetBSDF(), lux::EnvironmentCamera::GetFlux2RadianceFactors(), 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::Lanczos(), lux::SunLight::Le(), lux::SkyLight::Le(), lux::PhotonIntegrator::LPhoton(), lux::SkyLight::Pdf(), lux::InfiniteAreaLightIS::Pdf(), lux::InfiniteAreaLight::Pdf(), lux::Blinn::Pdf(), lux::PerspectiveCamera::PerspectiveCamera(), lux::PhaseHG(), lux::PhaseIsotropic(), lux::PhaseMieHazy(), lux::PhaseMieMurky(), lux::PhaseRayleigh(), lux::PhaseSchlick(), 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::GonioPhotometricLight::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::Anisotropic::sampleFirstQuadrant(), lux::SampleHG(), lux::LanczosSincFilter::Sinc1D(), lux::SkyLight::SkyLight(), lux::SphericalPhi(), lux::SunLight::SunLight(), blender::tex_saw(), blender::tex_tri(), lux::UniformConePdf(), lux::UniformSampleCone(), lux::UniformSampleDisk(), lux::UniformSampleHemisphere(), lux::UniformSampleSphere(), and lux::UniformSpherePdf().

#define RAY_EPSILON   1e-3f

#define RAY_EPSILON   1e-3f

#define RAY_EPSILON   1e-3f


Typedef Documentation

typedef vector< int > SampleGrid

Definition at line 127 of file lux.h.

typedef double StatsCounterType

Definition at line 121 of file lux.h.

typedef unsigned char u_char

Definition at line 122 of file lux.h.

typedef unsigned int u_int

Definition at line 124 of file lux.h.

typedef unsigned long u_long

Definition at line 125 of file lux.h.

typedef unsigned short u_short

Definition at line 123 of file lux.h.


Function Documentation

template<class T >
int Ceil2Int ( val  )  [inline]

template<class T >
T Clamp ( val,
low,
high 
) [inline]

float Degrees ( float  rad  )  [inline]

Definition at line 346 of file lux.h.

References M_PI.

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

template<class T >
int Floor2Int ( 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 349 of file lux.h.

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

int Log2Int ( float  v  )  [inline]

void luxCleanup (  ) 

Definition at line 84 of file api.cpp.

References luxCleanup().

Referenced by exit_cb(), luxCleanup(), main(), lux::LuxGui::OnExit(), and lux::NetworkRenderServerThread::run().

void luxInit (  ) 

Definition at line 403 of file api.cpp.

References initialized, LUX_ERROR, LUX_ILLSTATE, and luxError.

Referenced by main(), and lux::LuxGuiApp::OnInit().

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 ( double  val  )  [inline]

u_int RoundUpPow2 ( u_int  v  )  [inline]

float SmoothStep ( float  min,
float  max,
float  value 
) [inline]

Definition at line 424 of file lux.h.

References Clamp().

Referenced by lux::FBm(), lux::IGIIntegrator::Li(), and lux::Turbulence().


Generated on Fri Jul 24 11:51:59 2009 for lux by  doxygen 1.5.9