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_CAMERAS_PERSPECTIVE_H
00029 #define PBRT_CAMERAS_PERSPECTIVE_H
00030
00031
00032 #include "pbrt.h"
00033 #include "camera.h"
00034 #include "film.h"
00035
00036
00037 class PerspectiveCamera : public ProjectiveCamera {
00038 public:
00039
00040 PerspectiveCamera(const AnimatedTransform &cam2world,
00041 const float screenWindow[4], float sopen, float sclose,
00042 float lensr, float focald, float fov, Film *film);
00043 float GenerateRay(const CameraSample &sample, Ray *) const;
00044 float GenerateRayDifferential(const CameraSample &sample,
00045 RayDifferential *ray) const;
00046 private:
00047
00048 Vector dxCamera, dyCamera;
00049 };
00050
00051
00052 PerspectiveCamera *CreatePerspectiveCamera(const ParamSet ¶ms,
00053 const AnimatedTransform &cam2world, Film *film);
00054
00055 #endif // PBRT_CAMERAS_PERSPECTIVE_H