00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef PBRT_SCENE_H
00025 #define PBRT_SCENE_H
00026
00027 #include "pbrt.h"
00028 #include "primitive.h"
00029 #include "transport.h"
00030
00031 class COREDLL Scene {
00032 public:
00033
00034 void Render();
00035 Scene(Camera *c, SurfaceIntegrator *in,
00036 VolumeIntegrator *vi, Sampler *s,
00037 Primitive *accel, const vector<Light *> <s,
00038 VolumeRegion *vr);
00039 ~Scene();
00040 bool Intersect(const Ray &ray, Intersection *isect) const {
00041 return aggregate->Intersect(ray, isect);
00042 }
00043 bool IntersectP(const Ray &ray) const {
00044 return aggregate->IntersectP(ray);
00045 }
00046 const BBox &WorldBound() const;
00047 Spectrum Li(const RayDifferential &ray, const Sample *sample,
00048 float *alpha = NULL) const;
00049 Spectrum Transmittance(const Ray &ray) const;
00050
00051 Primitive *aggregate;
00052 vector<Light *> lights;
00053 Camera *camera;
00054 VolumeRegion *volumeRegion;
00055 SurfaceIntegrator *surfaceIntegrator;
00056 VolumeIntegrator *volumeIntegrator;
00057 Sampler *sampler;
00058 BBox bound;
00059 };
00060 #endif // PBRT_SCENE_H