00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #if defined(_MSC_VER)
00025 #pragma once
00026 #endif
00027
00028 #ifndef PBRT_INTEGRATORS_SINGLE_H
00029 #define PBRT_INTEGRATORS_SINGLE_H
00030
00031
00032 #include "volume.h"
00033 #include "integrator.h"
00034
00035
00036 class SingleScatteringIntegrator : public VolumeIntegrator {
00037 public:
00038
00039 SingleScatteringIntegrator(float ss) { stepSize = ss; }
00040 Spectrum Transmittance(const Scene *, const Renderer *,
00041 const RayDifferential &ray, const Sample *sample, RNG &rng,
00042 MemoryArena &arena) const;
00043 void RequestSamples(Sampler *sampler, Sample *sample,
00044 const Scene *scene);
00045 Spectrum Li(const Scene *, const Renderer *, const RayDifferential &ray,
00046 const Sample *sample, RNG &rng, Spectrum *T, MemoryArena &arena) const;
00047 private:
00048
00049 float stepSize;
00050 int tauSampleOffset, scatterSampleOffset;
00051 };
00052
00053
00054 SingleScatteringIntegrator *CreateSingleScatteringIntegrator(const ParamSet ¶ms);
00055
00056 #endif // PBRT_INTEGRATORS_SINGLE_H