#include <scene.h>
Definition at line 73 of file scene.h.
Scene::Scene | ( | Camera * | c, | |
SurfaceIntegrator * | in, | |||
VolumeIntegrator * | vi, | |||
Sampler * | s, | |||
boost::shared_ptr< Primitive > | accel, | |||
const vector< Light * > & | lts, | |||
const vector< string > & | lg, | |||
VolumeRegion * | vr | |||
) |
Definition at line 523 of file scene.cpp.
References aggregate, bound, lux::Camera::Bounds(), camera, contribPool, CurThreadSignal, lux::Camera::film, filmOnly, lastSamples, lastTime, lightGroups, lights, LUX_MISSINGDATA, LUX_SEVERE, luxError, numberOfSamplesFromNetwork, PAUSE, preprocessDone, cimg_library::cimg::rand(), lux::Film::RequestBufferGroups(), Timer::Reset(), s_Timer, sampler, seedBase, stat_blackSamples, stat_Samples, surfaceIntegrator, suspendThreadsWhenDone, tspack, lux::Union(), volumeIntegrator, volumeRegion, and lux::VolumeRegion::WorldBound().
Scene::Scene | ( | Camera * | c | ) |
Definition at line 564 of file scene.cpp.
References camera, contribPool, CurThreadSignal, lux::Camera::film, filmOnly, lux::Film::GetGroupName(), lux::Film::GetNumBufferGroups(), lastSamples, lastTime, lightGroups, numberOfSamplesFromNetwork, PAUSE, preprocessDone, cimg_library::cimg::rand(), Timer::Reset(), s_Timer, sampler, seedBase, surfaceIntegrator, suspendThreadsWhenDone, tspack, volumeIntegrator, and volumeRegion.
Scene::~Scene | ( | ) |
Definition at line 512 of file scene.cpp.
References camera, contribPool, lights, sampler, surfaceIntegrator, volumeIntegrator, and volumeRegion.
int Scene::AddThread | ( | ) |
Definition at line 66 of file scene.cpp.
References CreateRenderThread().
Referenced by lux::Context::addThread().
int Scene::CreateRenderThread | ( | ) |
Definition at line 389 of file scene.cpp.
References camera, CurThreadSignal, EXIT, IsFilmOnly(), lux::RenderThread::render(), renderThreads, renderThreadsMutex, sampler, surfaceIntegrator, lux::RenderThread::thread, and volumeIntegrator.
Referenced by AddThread(), and Render().
int Scene::DisplayInterval | ( | ) |
Definition at line 140 of file scene.cpp.
References camera, lux::Camera::film, and lux::Film::getldrDisplayInterval().
Referenced by Statistics().
void Scene::Exit | ( | ) |
Definition at line 61 of file scene.cpp.
References EXIT, and SignalThreads().
Referenced by lux::Context::exit().
int Scene::FilmXres | ( | ) |
Definition at line 144 of file scene.cpp.
References camera, lux::Camera::film, and lux::Film::GetXPixelCount().
Referenced by Statistics().
int Scene::FilmYres | ( | ) |
Definition at line 148 of file scene.cpp.
References camera, lux::Camera::film, and lux::Film::GetYPixelCount().
Referenced by Statistics().
double Scene::GetDefaultParameterValue | ( | luxComponent | comp, | |
luxComponentParameters | param, | |||
int | index | |||
) |
Definition at line 122 of file scene.cpp.
References camera, lux::Camera::film, lux::Film::GetDefaultParameterValue(), and LUX_FILM.
Referenced by lux::Context::GetDefaultParameterValue().
string Scene::GetDefaultStringParameterValue | ( | luxComponent | comp, | |
luxComponentParameters | param, | |||
int | index | |||
) |
Definition at line 136 of file scene.cpp.
Referenced by lux::Context::GetDefaultStringParameterValue().
unsigned char * Scene::GetFramebuffer | ( | ) |
Definition at line 101 of file scene.cpp.
References camera, lux::Camera::film, and lux::Film::getFrameBuffer().
Referenced by lux::Context::framebuffer().
Definition at line 106 of file scene.cpp.
References camera, lux::Camera::film, and lux::Film::getHistogramImage().
Referenced by lux::Context::getHistogramImage().
double Scene::GetNumberOfSamples | ( | ) |
Definition at line 185 of file scene.cpp.
References lastTime, numberOfSamplesFromNetwork, renderThreads, renderThreadsMutex, s_Timer, stat_blackSamples, stat_Samples, and Timer::Time().
Referenced by Statistics_SamplesPPx(), Statistics_SamplesPSec(), and Statistics_SamplesPTotSec().
double Scene::GetParameterValue | ( | luxComponent | comp, | |
luxComponentParameters | param, | |||
int | index | |||
) |
Definition at line 116 of file scene.cpp.
References camera, lux::Camera::film, lux::Film::GetParameterValue(), and LUX_FILM.
Referenced by lux::Context::GetParameterValue().
string Scene::GetStringParameterValue | ( | luxComponent | comp, | |
luxComponentParameters | param, | |||
int | index | |||
) |
Definition at line 130 of file scene.cpp.
References camera, lux::Camera::film, lux::Film::GetStringParameterValue(), and LUX_FILM.
Referenced by lux::Context::GetStringParameterValue().
int Scene::getThreadsStatus | ( | RenderingThreadInfo * | info, | |
int | maxInfoCount | |||
) |
Definition at line 74 of file scene.cpp.
References renderThreads, renderThreadsMutex, RenderingThreadInfo::status, and RenderingThreadInfo::threadIndex.
Referenced by lux::Context::getRenderingThreadsStatus().
bool lux::Scene::Intersect | ( | const Ray & | ray, | |
Intersection * | isect | |||
) | const [inline] |
Definition at line 83 of file scene.h.
References aggregate.
Referenced by lux::PerspectiveCamera::AutoFocus(), lux::OrthoCamera::AutoFocus(), generateEyePath(), generateLightPath(), lux::BidirIntegrator::generatePath(), lux::IrradianceCache::IndirectLo(), lux::WhittedIntegrator::Li(), lux::PhotonIntegrator::Li(), lux::PathIntegrator::Li(), lux::MLTPathIntegrator::Li(), lux::IrradianceCache::Li(), lux::IGIIntegrator::Li(), lux::ExPhotonIntegrator::Li(), lux::DebugIntegrator::Li(), lux::ExPhotonIntegrator::LiDirectLightingMode(), lux::DistributedPath::LiInternal(), lux::DirectLightingIntegrator::LiInternal(), lux::ExPhotonIntegrator::LiPathMode(), lux::PhotonIntegrator::Preprocess(), lux::IGIIntegrator::Preprocess(), lux::ExPhotonIntegrator::Preprocess(), and lux::VisibilityTester::TestOcclusion().
bool lux::Scene::IntersectP | ( | const Ray & | ray | ) | const [inline] |
Definition at line 86 of file scene.h.
References aggregate.
Referenced by lux::IGIIntegrator::Li(), lux::VisibilityTester::Unoccluded(), and lux::BidirIntegrator::visible().
bool lux::Scene::IsFilmOnly | ( | ) | const [inline] |
Definition at line 105 of file scene.h.
References filmOnly.
Referenced by CreateRenderThread(), Render(), lux::RenderThread::render(), and lux::Context::statistics().
SWCSpectrum Scene::Li | ( | const RayDifferential & | ray, | |
const Sample * | sample, | |||
float * | alpha = NULL | |||
) | const |
Definition at line 595 of file scene.cpp.
Referenced by lux::WhittedIntegrator::Li(), lux::PhotonIntegrator::Li(), lux::IrradianceCache::Li(), lux::IGIIntegrator::Li(), and lux::ExPhotonIntegrator::Li().
void Scene::Pause | ( | ) |
Definition at line 57 of file scene.cpp.
References PAUSE, and SignalThreads().
Referenced by lux::Context::pause().
void Scene::RemoveRenderThread | ( | ) |
Definition at line 412 of file scene.cpp.
References EXIT, renderThreads, and renderThreadsMutex.
Referenced by RemoveThread().
void Scene::RemoveThread | ( | ) |
Definition at line 70 of file scene.cpp.
References RemoveRenderThread().
Referenced by lux::Context::removeThread().
void Scene::Render | ( | ) |
Definition at line 426 of file scene.cpp.
References lux::TsPack::arena, lux::Camera::AutoFocus(), camera, contribPool, lux::Film::CreateBuffers(), CreateRenderThread(), CurThreadSignal, EXIT, lux::Camera::film, lux::RandomGenerator::init(), IsFilmOnly(), LUX_INFO, LUX_NOERROR, luxError, lux::Context::luxSceneReady(), lux::Integrator::Preprocess(), preprocessDone, renderThreads, renderThreadsMutex, lux::TsPack::rng, RUN, s_Timer, sampler, sampPos, seedBase, lux::Sampler::SetContributionPool(), lux::Sampler::SetFilm(), lux::Film::SetScene(), lux::Sampler::SetTsPack(), Timer::Start(), surfaceIntegrator, lux::TsPack::swl, tspack, and volumeIntegrator.
Referenced by lux::Context::worldEnd().
void Scene::SaveFLM | ( | const string & | filename | ) |
Definition at line 87 of file scene.cpp.
References camera, lux::Camera::film, and lux::Film::WriteFilm().
Referenced by lux::Context::saveFLM().
void Scene::SetParameterValue | ( | luxComponent | comp, | |
luxComponentParameters | param, | |||
double | value, | |||
int | index | |||
) |
Definition at line 112 of file scene.cpp.
References camera, lux::Camera::film, LUX_FILM, and lux::Film::SetParameterValue().
Referenced by lux::Context::SetParameterValue().
void Scene::SetStringParameterValue | ( | luxComponent | comp, | |
luxComponentParameters | param, | |||
const string & | value, | |||
int | index | |||
) |
Definition at line 128 of file scene.cpp.
Referenced by lux::Context::SetStringParameterValue().
void Scene::SignalThreads | ( | ThreadSignals | signal | ) |
Definition at line 250 of file scene.cpp.
References CurThreadSignal, renderThreads, and renderThreadsMutex.
void Scene::Start | ( | ) |
Definition at line 53 of file scene.cpp.
References RUN, and SignalThreads().
Referenced by lux::Context::start().
double Scene::Statistics | ( | const string & | statName | ) |
Definition at line 153 of file scene.cpp.
References camera, DisplayInterval(), lux::Film::EV, lux::Camera::film, FilmXres(), FilmYres(), LUX_BADTOKEN, LUX_ERROR, luxError, preprocessDone, s_Timer, Statistics_Efficiency(), Statistics_SamplesPPx(), Statistics_SamplesPSec(), Statistics_SamplesPTotSec(), and Timer::Time().
Referenced by lux::Context::statistics().
double Scene::Statistics_Efficiency | ( | ) |
Definition at line 242 of file scene.cpp.
References stat_blackSamples, and stat_Samples.
Referenced by Statistics().
double Scene::Statistics_SamplesPPx | ( | ) |
Definition at line 201 of file scene.cpp.
References camera, lux::Camera::film, GetNumberOfSamples(), and lux::Film::GetSampleExtent().
Referenced by Statistics().
double Scene::Statistics_SamplesPSec | ( | ) |
Definition at line 209 of file scene.cpp.
References GetNumberOfSamples(), lastSamples, lastTime, preprocessDone, s_Timer, Timer::Time(), and cimg_library::cimg::time().
Referenced by Statistics().
double Scene::Statistics_SamplesPTotSec | ( | ) |
Definition at line 229 of file scene.cpp.
References GetNumberOfSamples(), preprocessDone, s_Timer, Timer::Time(), and cimg_library::cimg::time().
Referenced by Statistics().
void Scene::Transmittance | ( | const TsPack * | tspack, | |
const Ray & | ray, | |||
const Sample * | sample, | |||
SWCSpectrum *const | L | |||
) | const |
Definition at line 606 of file scene.cpp.
References lux::VolumeIntegrator::Transmittance(), and volumeIntegrator.
Referenced by lux::IrradianceCache::IndirectLo(), lux::PhotonIntegrator::Li(), lux::PathIntegrator::Li(), lux::MLTPathIntegrator::Li(), lux::IGIIntegrator::Li(), lux::ExPhotonIntegrator::Li(), lux::ExPhotonIntegrator::LiPathMode(), lux::PhotonIntegrator::Preprocess(), lux::IGIIntegrator::Preprocess(), lux::ExPhotonIntegrator::Preprocess(), and lux::VisibilityTester::Transmittance().
void Scene::UpdateFramebuffer | ( | ) |
Definition at line 92 of file scene.cpp.
References camera, lux::ContributionPool::CheckFilmWriteOuputInterval(), contribPool, lux::Camera::film, and lux::Film::updateFrameBuffer().
Referenced by lux::Context::updateFramebuffer().
const BBox & Scene::WorldBound | ( | ) | const |
Definition at line 591 of file scene.cpp.
References bound.
Referenced by lux::IrradianceCache::IndirectLo(), lux::SunLight::Le(), lux::SkyLight::Le(), lux::InfiniteAreaLight::Le(), lux::SunLight::Power(), lux::SkyLight::Power(), lux::InfiniteAreaLightIS::Power(), lux::InfiniteAreaLight::Power(), lux::DistantLight::Power(), lux::IrradianceCache::Preprocess(), lux::SunLight::Sample_L(), lux::SkyLight::Sample_L(), lux::InfiniteAreaLightIS::Sample_L(), lux::InfiniteAreaLight::Sample_L(), and lux::DistantLight::Sample_L().
boost::shared_ptr<Primitive> lux::Scene::aggregate |
Definition at line 140 of file scene.h.
Referenced by Intersect(), IntersectP(), and Scene().
Definition at line 148 of file scene.h.
Referenced by Scene(), and WorldBound().
Definition at line 143 of file scene.h.
Referenced by CreateRenderThread(), DisplayInterval(), FilmXres(), FilmYres(), GetDefaultParameterValue(), GetFramebuffer(), getHistogramImage(), GetParameterValue(), GetStringParameterValue(), lux::PathIntegrator::Preprocess(), lux::IGIIntegrator::Preprocess(), lux::ExPhotonIntegrator::Preprocess(), lux::DistributedPath::Preprocess(), lux::DirectLightingIntegrator::Preprocess(), lux::BidirIntegrator::Preprocess(), Render(), lux::RenderThread::render(), SaveFLM(), Scene(), lux::Context::setHaltSamplePerPixel(), SetParameterValue(), Statistics(), Statistics_SamplesPPx(), lux::Context::transmitFilm(), lux::RenderFarm::updateFilm(), UpdateFramebuffer(), lux::Context::worldEnd(), and ~Scene().
Definition at line 151 of file scene.h.
Referenced by lux::Sampler::AddSample(), lux::MetropolisSampler::AddSample(), lux::ERPTSampler::AddSample(), lux::RandomSampler::GetNextSample(), lux::LDSampler::GetNextSample(), initERPT(), initMetropolis(), Render(), Scene(), UpdateFramebuffer(), and ~Scene().
ThreadSignals lux::Scene::CurThreadSignal [private] |
Definition at line 169 of file scene.h.
Referenced by CreateRenderThread(), Render(), Scene(), and SignalThreads().
bool lux::Scene::filmOnly [private] |
Definition at line 171 of file scene.h.
Referenced by IsFilmOnly(), and Scene().
double lux::Scene::lastSamples |
Definition at line 131 of file scene.h.
Referenced by Scene(), and Statistics_SamplesPSec().
double lux::Scene::lastTime |
Definition at line 131 of file scene.h.
Referenced by GetNumberOfSamples(), Scene(), and Statistics_SamplesPSec().
vector<string> lux::Scene::lightGroups |
Definition at line 142 of file scene.h.
Referenced by lux::PathIntegrator::Li(), lux::DistributedPath::Li(), lux::DirectLightingIntegrator::Li(), lux::BidirIntegrator::Li(), lux::DirectLightingIntegrator::LiInternal(), and Scene().
vector<Light *> lux::Scene::lights |
Definition at line 141 of file scene.h.
Referenced by generateEyePath(), getDirectLight(), getEnvironmentLight(), lux::WhittedIntegrator::Li(), lux::SingleScattering::Li(), lux::PhotonIntegrator::Li(), lux::PathIntegrator::Li(), lux::MLTPathIntegrator::Li(), lux::IrradianceCache::Li(), lux::IGIIntegrator::Li(), lux::ExPhotonIntegrator::Li(), lux::BidirIntegrator::Li(), lux::ExPhotonIntegrator::LiDirectLightingMode(), lux::DistributedPath::LiInternal(), lux::DirectLightingIntegrator::LiInternal(), lux::ExPhotonIntegrator::LiPathMode(), lux::PhotonIntegrator::Preprocess(), lux::IGIIntegrator::Preprocess(), lux::ExPhotonIntegrator::Preprocess(), lux::PhotonIntegrator::RequestSamples(), lux::PathIntegrator::RequestSamples(), lux::IrradianceCache::RequestSamples(), lux::IGIIntegrator::RequestSamples(), lux::ExPhotonIntegrator::RequestSamples(), lux::DistributedPath::RequestSamples(), lux::DirectLightingIntegrator::RequestSamples(), lux::BidirIntegrator::RequestSamples(), Scene(), and ~Scene().
Definition at line 154 of file scene.h.
Referenced by GetNumberOfSamples(), Scene(), and lux::FlexImageFilm::UpdateFilm().
Definition at line 158 of file scene.h.
Referenced by Render(), lux::RenderThread::render(), Scene(), Statistics(), Statistics_SamplesPSec(), and Statistics_SamplesPTotSec().
std::vector<RenderThread*> lux::Scene::renderThreads [private] |
Definition at line 167 of file scene.h.
Referenced by CreateRenderThread(), GetNumberOfSamples(), getThreadsStatus(), RemoveRenderThread(), Render(), and SignalThreads().
boost::mutex lux::Scene::renderThreadsMutex [private] |
Definition at line 166 of file scene.h.
Referenced by CreateRenderThread(), GetNumberOfSamples(), getThreadsStatus(), RemoveRenderThread(), Render(), and SignalThreads().
Definition at line 130 of file scene.h.
Referenced by GetNumberOfSamples(), Render(), Scene(), Statistics(), Statistics_SamplesPSec(), and Statistics_SamplesPTotSec().
Definition at line 147 of file scene.h.
Referenced by CreateRenderThread(), lux::PathIntegrator::Preprocess(), lux::IGIIntegrator::Preprocess(), lux::ExPhotonIntegrator::Preprocess(), lux::DistributedPath::Preprocess(), lux::DirectLightingIntegrator::Preprocess(), lux::BidirIntegrator::Preprocess(), Render(), lux::PhotonIntegrator::RequestSamples(), lux::PathIntegrator::RequestSamples(), lux::IrradianceCache::RequestSamples(), lux::DistributedPath::RequestSamples(), lux::BidirIntegrator::RequestSamples(), Scene(), and ~Scene().
Definition at line 149 of file scene.h.
Referenced by lux::Context::RenderOptions::MakeScene(), Render(), lux::RenderThread::render(), and Scene().
Definition at line 155 of file scene.h.
Referenced by GetNumberOfSamples(), Scene(), and Statistics_Efficiency().
double lux::Scene::stat_Samples |
Definition at line 155 of file scene.h.
Referenced by GetNumberOfSamples(), Scene(), and Statistics_Efficiency().
Definition at line 161 of file scene.h.
Referenced by lux::RenderThread::render(), Scene(), and lux::Context::setHaltSamplePerPixel().
TsPack* lux::Scene::tspack [private] |
Definition at line 146 of file scene.h.
Referenced by CreateRenderThread(), lux::PathIntegrator::Li(), lux::ExPhotonIntegrator::LiDirectLightingMode(), lux::DistributedPath::LiInternal(), lux::DirectLightingIntegrator::LiInternal(), lux::ExPhotonIntegrator::LiPathMode(), Render(), Scene(), Transmittance(), and ~Scene().
Definition at line 144 of file scene.h.
Referenced by lux::SingleScattering::Li(), lux::EmissionIntegrator::Li(), Scene(), lux::SingleScattering::Transmittance(), lux::EmissionIntegrator::Transmittance(), and ~Scene().