#include <scene.h>
Definition at line 69 of file scene.h.
Scene::Scene | ( | Camera * | c, | |
SurfaceIntegrator * | in, | |||
VolumeIntegrator * | vi, | |||
Sampler * | s, | |||
Primitive * | accel, | |||
const vector< Light * > & | lts, | |||
VolumeRegion * | vr | |||
) |
Definition at line 402 of file scene.cpp.
References aggregate, bound, camera, lastSamples, lastTime, lights, LUX_MISSINGDATA, LUX_SEVERE, luxError, numberOfSamplesFromNetwork, preprocessDone, cimg_library::cimg::rand(), Timer::Reset(), s_Timer, sampler, seedBase, surfaceIntegrator, lux::Union(), volumeIntegrator, volumeRegion, lux::VolumeRegion::WorldBound(), and lux::Primitive::WorldBound().
Scene::~Scene | ( | ) |
Definition at line 391 of file scene.cpp.
References aggregate, camera, lights, sampler, surfaceIntegrator, volumeIntegrator, and volumeRegion.
int Scene::AddThread | ( | ) |
Definition at line 69 of file scene.cpp.
References CreateRenderThread().
Referenced by lux::Context::addThread().
int Scene::CreateRenderThread | ( | ) |
Definition at line 314 of file scene.cpp.
References camera, lux::Sampler::clone(), CurThreadSignal, lux::RenderThread::render(), renderThreads, renderThreadsMutex, sampler, surfaceIntegrator, lux::RenderThread::thread, and volumeIntegrator.
Referenced by AddThread(), and Render().
int Scene::DisplayInterval | ( | ) |
Definition at line 86 of file scene.cpp.
References camera, lux::Camera::film, and lux::Film::getldrDisplayInterval().
Referenced by Statistics().
void Scene::Exit | ( | ) |
Definition at line 64 of file scene.cpp.
References lux::RenderThread::SIG_EXIT, and SignalThreads().
Referenced by lux::Context::exit().
int Scene::FilmXres | ( | ) |
Definition at line 90 of file scene.cpp.
References camera, lux::Camera::film, and lux::Film::xResolution.
Referenced by Statistics().
int Scene::FilmYres | ( | ) |
Definition at line 94 of file scene.cpp.
References camera, lux::Camera::film, and lux::Film::yResolution.
Referenced by Statistics().
unsigned char * Scene::GetFramebuffer | ( | ) |
Definition at line 82 of file scene.cpp.
References camera, lux::Camera::film, and lux::Film::getFrameBuffer().
Referenced by lux::Context::framebuffer().
double Scene::GetNumberOfSamples | ( | ) |
Definition at line 129 of file scene.cpp.
References numberOfSamplesFromNetwork, renderThreads, and renderThreadsMutex.
Referenced by Statistics_SamplesPPx(), Statistics_SamplesPSec(), and Statistics_SamplesPTotSec().
bool lux::Scene::Intersect | ( | const Ray & | ray, | |
Intersection * | isect | |||
) | const [inline] |
Definition at line 78 of file scene.h.
References aggregate, and lux::Primitive::Intersect().
Referenced by lux::PerspectiveCamera::AutoFocus(), lux::OrthoCamera::AutoFocus(), lux::EstimateDirect(), generateLightPath(), lux::BidirIntegrator::generatePath(), lux::IrradianceCache::IndirectLo(), lux::PerspectiveCamera::IsVisibleFromEyes(), lux::WhittedIntegrator::Li(), lux::PhotonIntegrator::Li(), lux::Path2Integrator::Li(), lux::PathIntegrator::Li(), lux::ParticleTracingIntegrator::Li(), lux::MLTPathIntegrator::Li(), lux::IrradianceCache::Li(), lux::IGIIntegrator::Li(), lux::DebugIntegrator::Li(), lux::ExPhotonIntegrator::LiInternal(), lux::DirectLighting::LiInternal(), 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 81 of file scene.h.
References aggregate, and lux::Primitive::IntersectP().
Referenced by lux::OrthoCamera::IsVisibleFromEyes(), lux::EnvironmentCamera::IsVisibleFromEyes(), lux::IGIIntegrator::Li(), lux::VisibilityTester::Unoccluded(), and lux::BidirIntegrator::visible().
SWCSpectrum Scene::Li | ( | const RayDifferential & | ray, | |
const Sample * | sample, | |||
float * | alpha = NULL | |||
) | const |
Definition at line 435 of file scene.cpp.
Referenced by lux::WhittedIntegrator::Li(), lux::PhotonIntegrator::Li(), lux::IrradianceCache::Li(), and lux::IGIIntegrator::Li().
void Scene::Pause | ( | ) |
Definition at line 59 of file scene.cpp.
References s_Timer, lux::RenderThread::SIG_PAUSE, SignalThreads(), and Timer::Stop().
Referenced by lux::Context::pause().
void Scene::RemoveRenderThread | ( | ) |
Definition at line 331 of file scene.cpp.
References renderThreads, renderThreadsMutex, and lux::RenderThread::SIG_EXIT.
Referenced by RemoveThread().
void Scene::RemoveThread | ( | ) |
Definition at line 73 of file scene.cpp.
References RemoveRenderThread().
Referenced by lux::Context::removeThread().
void Scene::Render | ( | ) |
Definition at line 340 of file scene.cpp.
References lux::BSDF::arena, lux::Camera::AutoFocus(), camera, CreateRenderThread(), CurThreadSignal, lux::Camera::film, lux::IMAGE_FILEOUTPUT, lux::IMAGE_FRAMEBUFFER, lux::random::init(), LUX_INFO, LUX_NOERROR, luxError, lux::Integrator::Preprocess(), preprocessDone, renderThreads, s_Timer, sampler, sampPos, seedBase, lux::Sampler::SetFilm(), lux::Film::SetScene(), lux::RenderThread::SIG_RUN, Timer::Start(), surfaceIntegrator, thread_wavelengths, volumeIntegrator, and lux::Film::WriteImage().
Referenced by lux::Context::worldEnd().
void Scene::SignalThreads | ( | int | signal | ) |
Definition at line 202 of file scene.cpp.
References CurThreadSignal, renderThreads, and renderThreadsMutex.
void Scene::Start | ( | ) |
Definition at line 54 of file scene.cpp.
References s_Timer, lux::RenderThread::SIG_RUN, SignalThreads(), and Timer::Start().
Referenced by lux::Context::start().
double Scene::Statistics | ( | const string & | statName | ) |
Definition at line 99 of file scene.cpp.
References DisplayInterval(), 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 181 of file scene.cpp.
References renderThreads, and renderThreadsMutex.
Referenced by Statistics().
double Scene::Statistics_SamplesPPx | ( | ) |
Definition at line 143 of file scene.cpp.
References camera, lux::Camera::film, GetNumberOfSamples(), and lux::Film::GetSampleExtent().
Referenced by Statistics().
double Scene::Statistics_SamplesPSec | ( | ) |
Definition at line 150 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 169 of file scene.cpp.
References GetNumberOfSamples(), preprocessDone, s_Timer, Timer::Time(), and cimg_library::cimg::time().
Referenced by Statistics().
SWCSpectrum Scene::Transmittance | ( | const Ray & | ray | ) | const |
Definition at line 446 of file scene.cpp.
References lux::VolumeIntegrator::Transmittance(), and volumeIntegrator.
Referenced by lux::EstimateDirect(), lux::IrradianceCache::IndirectLo(), lux::PhotonIntegrator::Li(), lux::Path2Integrator::Li(), lux::PathIntegrator::Li(), lux::MLTPathIntegrator::Li(), lux::IGIIntegrator::Li(), lux::ExPhotonIntegrator::LiInternal(), lux::PhotonIntegrator::Preprocess(), lux::IGIIntegrator::Preprocess(), lux::ExPhotonIntegrator::Preprocess(), and lux::VisibilityTester::Transmittance().
void Scene::UpdateFramebuffer | ( | ) |
Definition at line 78 of file scene.cpp.
References camera, lux::Camera::film, and lux::Film::updateFrameBuffer().
Referenced by lux::Context::updateFramebuffer().
const BBox & Scene::WorldBound | ( | ) | const |
Definition at line 431 of file scene.cpp.
References bound.
Referenced by lux::IrradianceCache::IndirectLo(), lux::SunLight::Le(), lux::SkyLight::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().
Definition at line 117 of file scene.h.
Referenced by Intersect(), IntersectP(), Scene(), and ~Scene().
Definition at line 124 of file scene.h.
Referenced by Scene(), and WorldBound().
Definition at line 119 of file scene.h.
Referenced by CreateRenderThread(), DisplayInterval(), FilmXres(), FilmYres(), GetFramebuffer(), lux::Path2Integrator::Li(), lux::ParticleTracingIntegrator::Li(), lux::ParticleTracingIntegrator::Preprocess(), Render(), Scene(), Statistics_SamplesPPx(), lux::Context::transmitFilm(), lux::RenderFarm::updateFilm(), UpdateFramebuffer(), lux::FlexImageFilm::WriteImage(), and ~Scene().
int lux::Scene::CurThreadSignal [private] |
Definition at line 139 of file scene.h.
Referenced by CreateRenderThread(), Render(), and SignalThreads().
double lux::Scene::lastSamples |
Definition at line 108 of file scene.h.
Referenced by Scene(), and Statistics_SamplesPSec().
double lux::Scene::lastTime |
Definition at line 108 of file scene.h.
Referenced by Scene(), and Statistics_SamplesPSec().
vector<Light *> lux::Scene::lights |
Definition at line 118 of file scene.h.
Referenced by lux::WhittedIntegrator::Li(), lux::SingleScattering::Li(), lux::PhotonIntegrator::Li(), lux::Path2Integrator::Li(), lux::PathIntegrator::Li(), lux::ParticleTracingIntegrator::Li(), lux::MLTPathIntegrator::Li(), lux::IrradianceCache::Li(), lux::IGIIntegrator::Li(), lux::BidirIntegrator::Li(), lux::ExPhotonIntegrator::LiInternal(), lux::DirectLighting::LiInternal(), lux::PhotonIntegrator::Preprocess(), lux::ParticleTracingIntegrator::Preprocess(), lux::IGIIntegrator::Preprocess(), lux::ExPhotonIntegrator::Preprocess(), lux::PhotonIntegrator::RequestSamples(), lux::Path2Integrator::RequestSamples(), lux::PathIntegrator::RequestSamples(), lux::IrradianceCache::RequestSamples(), lux::IGIIntegrator::RequestSamples(), lux::ExPhotonIntegrator::RequestSamples(), lux::DirectLighting::RequestSamples(), lux::BidirIntegrator::RequestSamples(), Scene(), and ~Scene().
Definition at line 128 of file scene.h.
Referenced by GetNumberOfSamples(), Scene(), and lux::FlexImageFilm::UpdateFilm().
Definition at line 131 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 137 of file scene.h.
Referenced by CreateRenderThread(), GetNumberOfSamples(), RemoveRenderThread(), Render(), SignalThreads(), and Statistics_Efficiency().
boost::mutex lux::Scene::renderThreadsMutex [private] |
Definition at line 136 of file scene.h.
Referenced by CreateRenderThread(), GetNumberOfSamples(), RemoveRenderThread(), SignalThreads(), and Statistics_Efficiency().
Definition at line 107 of file scene.h.
Referenced by Pause(), Render(), Scene(), Start(), Statistics(), Statistics_SamplesPSec(), and Statistics_SamplesPTotSec().
Definition at line 123 of file scene.h.
Referenced by CreateRenderThread(), Render(), lux::PhotonIntegrator::RequestSamples(), lux::IrradianceCache::RequestSamples(), lux::IGIIntegrator::RequestSamples(), Scene(), and ~Scene().
Definition at line 125 of file scene.h.
Referenced by lux::Context::RenderOptions::MakeScene(), Render(), lux::RenderThread::render(), and Scene().
Definition at line 121 of file scene.h.
Referenced by CreateRenderThread(), Render(), Scene(), lux::FlexImageFilm::WriteImage(), and ~Scene().
Definition at line 122 of file scene.h.
Referenced by CreateRenderThread(), lux::Path2Integrator::Li(), lux::PathIntegrator::Li(), lux::ExPhotonIntegrator::LiInternal(), lux::DirectLighting::LiInternal(), Render(), Scene(), Transmittance(), and ~Scene().
Definition at line 120 of file scene.h.
Referenced by lux::SingleScattering::Li(), lux::EmissionIntegrator::Li(), Scene(), lux::SingleScattering::Transmittance(), lux::EmissionIntegrator::Transmittance(), and ~Scene().