#include <perspective.h>

Public Member Functions | |
| PerspectiveCamera (const Transform &world2cam, const float Screen[4], float hither, float yon, float sopen, float sclose, float lensr, float focald, bool autofocus, float fov, Film *film) | |
| float | GenerateRay (const Sample &sample, Ray *) const |
| SWCSpectrum | Sample_W (const Scene *scene, float u1, float u2, BSDF **bsdf, float *pdf) const |
| SWCSpectrum | Sample_W (const Scene *scene, const Point &p, const Normal &n, float u1, float u2, BSDF **bsdf, float *pdf, float *pdfDirect, VisibilityTester *visibility) const |
| float | Pdf (const Point &p, const Normal &n, const Vector &wi) const |
| void | GetSamplePosition (const Point &p, const Vector &wi, float *x, float *y) const |
| bool | IsVisibleFromEyes (const Scene *scene, const Point &lenP, const Point &worldP, Sample *sample_gen, Ray *ray_gen) const |
| float | GetConnectingFactor (const Point &lenP, const Point &worldP, const Vector &wo, const Normal &n) const |
| void | GetFlux2RadianceFactors (Film *film, float *factors, int xPixelCount, int yPixelCount) const |
| bool | IsDelta () const |
| bool | Intersect (const Ray &ray, Intersection *isect) const |
| void | SamplePosition (float u1, float u2, Point *p, float *pdf) const |
| float | EvalPositionPdf () const |
| void | AutoFocus (Scene *scene) |
Static Public Member Functions | |
| static Camera * | CreateCamera (const ParamSet ¶ms, const Transform &world2cam, Film *film) |
Private Attributes | |
| Point | pos |
| Normal | normal |
| float | fov |
| float | posPdf |
| float | screen [4] |
| float | R |
| float | xWidth |
| float | yHeight |
| float | xPixelWidth |
| float | yPixelHeight |
| float | Apixel |
| bool | autoFocus |
| boost::shared_ptr< Shape > | lens |
Definition at line 33 of file perspective.h.
| PerspectiveCamera::PerspectiveCamera | ( | const Transform & | world2cam, | |
| const float | Screen[4], | |||
| float | hither, | |||
| float | yon, | |||
| float | sopen, | |||
| float | sclose, | |||
| float | lensr, | |||
| float | focald, | |||
| bool | autofocus, | |||
| float | fov, | |||
| Film * | film | |||
| ) |
Definition at line 83 of file perspective.cpp.
References lux::ParamSet::AddFloat(), Apixel, lux::Camera::CameraToWorld, lux::Disk::CreateShape(), fov, lens, lux::ProjectiveCamera::LensRadius, M_PI, normal, pos, posPdf, R, Radians(), cimg_library::tan(), xPixelWidth, xWidth, yHeight, and yPixelHeight.
Referenced by CreateCamera().
| void PerspectiveCamera::AutoFocus | ( | Scene * | scene | ) | [virtual] |
Reimplemented from lux::Camera.
Definition at line 130 of file perspective.cpp.
References autoFocus, lux::Camera::CameraToWorld, lux::Camera::ClipHither, lux::Camera::ClipYon, lux::Ray::d, lux::Camera::film, lux::ProjectiveCamera::FocalDistance, lux::Film::GetSampleExtent(), lux::Scene::Intersect(), LUX_INFO, LUX_NOERROR, LUX_WARNING, luxError, lux::Ray::maxt, lux::Ray::mint, lux::Normalize(), lux::Ray::o, lux::ProjectiveCamera::RasterToCamera, lux::Ray::time, lux::Point::x, lux::Point::y, lux::Vector::z, and lux::Point::z.
| Camera * PerspectiveCamera::CreateCamera | ( | const ParamSet & | params, | |
| const Transform & | world2cam, | |||
| Film * | film | |||
| ) | [static] |
Definition at line 370 of file perspective.cpp.
References lux::ParamSet::FindFloat(), lux::ParamSet::FindOneBool(), lux::ParamSet::FindOneFloat(), fov, cimg_library::cimg::max(), memcpy(), cimg_library::cimg::min(), PerspectiveCamera(), screen, lux::Film::xResolution, and lux::Film::yResolution.
Referenced by lux::MakeCamera().
| float PerspectiveCamera::EvalPositionPdf | ( | ) | const [virtual] |
Reimplemented from lux::Camera.
Definition at line 349 of file perspective.cpp.
References lux::ProjectiveCamera::LensRadius, and posPdf.
Implements lux::Camera.
Definition at line 177 of file perspective.cpp.
References lux::Camera::CameraToWorld, lux::Camera::ClipHither, lux::Camera::ClipYon, lux::Ray::d, lux::ProjectiveCamera::FocalDistance, lux::Sample::imageX, lux::Sample::imageY, lux::ProjectiveCamera::LensRadius, lux::Sample::lensU, lux::Sample::lensV, Lerp(), lux::Ray::maxt, lux::Ray::mint, lux::Normalize(), lux::Ray::o, lux::ProjectiveCamera::RasterToCamera, SamplePosition(), lux::Camera::ShutterClose, lux::Camera::ShutterOpen, lux::Sample::time, lux::Ray::time, lux::Camera::WorldToCamera, lux::Point::x, lux::Point::y, lux::Vector::z, and lux::Point::z.
Referenced by IsVisibleFromEyes().
| float PerspectiveCamera::GetConnectingFactor | ( | const Point & | lenP, | |
| const Point & | worldP, | |||
| const Vector & | wo, | |||
| const Normal & | n | |||
| ) | const [virtual] |
Reimplemented from lux::Camera.
Definition at line 308 of file perspective.cpp.
References lux::AbsDot(), lux::DistanceSquared(), and normal.
| void PerspectiveCamera::GetFlux2RadianceFactors | ( | Film * | film, | |
| float * | factors, | |||
| int | xPixelCount, | |||
| int | yPixelCount | |||
| ) | const [virtual] |
Reimplemented from lux::Camera.
Definition at line 313 of file perspective.cpp.
References Apixel, R, xPixelWidth, xWidth, yHeight, and yPixelHeight.
| void PerspectiveCamera::GetSamplePosition | ( | const Point & | p, | |
| const Vector & | wi, | |||
| float * | x, | |||
| float * | y | |||
| ) | const [virtual] |
Reimplemented from lux::Camera.
Definition at line 247 of file perspective.cpp.
References lux::Camera::CameraToWorld, lux::Dot(), lux::ProjectiveCamera::FocalDistance, lux::ProjectiveCamera::LensRadius, lux::ProjectiveCamera::WorldToRaster, lux::Point::x, and lux::Point::y.
| bool PerspectiveCamera::Intersect | ( | const Ray & | ray, | |
| Intersection * | isect | |||
| ) | const [virtual] |
Reimplemented from lux::Camera.
Definition at line 354 of file perspective.cpp.
References lux::Ray::d, lux::Intersection::dg, lens, lux::Ray::maxt, lux::Intersection::primitive, lux::Camera::WorldToCamera, and lux::Intersection::WorldToObject.
| bool lux::PerspectiveCamera::IsDelta | ( | ) | const [inline, virtual] |
Reimplemented from lux::Camera.
Definition at line 49 of file perspective.h.
References lux::ProjectiveCamera::LensRadius.
| bool PerspectiveCamera::IsVisibleFromEyes | ( | const Scene * | scene, | |
| const Point & | lenP, | |||
| const Point & | worldP, | |||
| Sample * | sample_gen, | |||
| Ray * | ray_gen | |||
| ) | const [virtual] |
Reimplemented from lux::Camera.
Definition at line 267 of file perspective.cpp.
References lux::Camera::CameraToWorld, lux::Camera::ClipYon, lux::Ray::d, lux::Intersection::dg, lux::ProjectiveCamera::FocalDistance, GenerateRay(), lux::ProjectiveCamera::GenerateSample(), lux::Scene::Intersect(), lux::ProjectiveCamera::LensRadius, lux::DifferentialGeometry::p, RAY_EPSILON, lux::Camera::WorldToCamera, and lux::Vector::z.
| SWCSpectrum PerspectiveCamera::Sample_W | ( | const Scene * | scene, | |
| const Point & | p, | |||
| const Normal & | n, | |||
| float | u1, | |||
| float | u2, | |||
| BSDF ** | bsdf, | |||
| float * | pdf, | |||
| float * | pdfDirect, | |||
| VisibilityTester * | visibility | |||
| ) | const [virtual] |
Reimplemented from lux::Camera.
Definition at line 227 of file perspective.cpp.
References BSDF_ALLOC, lux::Camera::CameraToWorld, lux::ConcentricSampleDisk(), lux::ProjectiveCamera::FocalDistance, fov, lux::ProjectiveCamera::LensRadius, posPdf, lux::ProjectiveCamera::RasterToCamera, lux::VisibilityTester::SetSegment(), lux::Point::x, xPixelWidth, lux::Point::y, and yPixelHeight.
| SWCSpectrum PerspectiveCamera::Sample_W | ( | const Scene * | scene, | |
| float | u1, | |||
| float | u2, | |||
| BSDF ** | bsdf, | |||
| float * | ||||
| ) | const [virtual] |
Reimplemented from lux::Camera.
Definition at line 213 of file perspective.cpp.
References BSDF_ALLOC, lux::Camera::CameraToWorld, lux::ConcentricSampleDisk(), lux::ProjectiveCamera::FocalDistance, fov, lux::ProjectiveCamera::LensRadius, posPdf, lux::ProjectiveCamera::RasterToCamera, lux::Point::x, xPixelWidth, lux::Point::y, and yPixelHeight.
| void PerspectiveCamera::SamplePosition | ( | float | u1, | |
| float | u2, | |||
| Point * | p, | |||
| float * | ||||
| ) | const [virtual] |
Reimplemented from lux::Camera.
Definition at line 334 of file perspective.cpp.
References lux::Camera::CameraToWorld, lux::ConcentricSampleDisk(), lux::ProjectiveCamera::LensRadius, pos, posPdf, lux::Point::x, lux::Point::y, and lux::Point::z.
Referenced by GenerateRay().
float lux::PerspectiveCamera::Apixel [private] |
Definition at line 97 of file perspective.h.
Referenced by GetFlux2RadianceFactors(), and PerspectiveCamera().
bool lux::PerspectiveCamera::autoFocus [private] |
float lux::PerspectiveCamera::fov [private] |
Definition at line 94 of file perspective.h.
Referenced by CreateCamera(), PerspectiveCamera(), and Sample_W().
boost::shared_ptr<Shape> lux::PerspectiveCamera::lens [private] |
Normal lux::PerspectiveCamera::normal [private] |
Definition at line 93 of file perspective.h.
Referenced by GetConnectingFactor(), and PerspectiveCamera().
Point lux::PerspectiveCamera::pos [private] |
Definition at line 92 of file perspective.h.
Referenced by PerspectiveCamera(), and SamplePosition().
float lux::PerspectiveCamera::posPdf [private] |
Definition at line 95 of file perspective.h.
Referenced by EvalPositionPdf(), Pdf(), PerspectiveCamera(), Sample_W(), and SamplePosition().
float lux::PerspectiveCamera::R [private] |
Definition at line 97 of file perspective.h.
Referenced by GetFlux2RadianceFactors(), and PerspectiveCamera().
float lux::PerspectiveCamera::screen[4] [private] |
float lux::PerspectiveCamera::xPixelWidth [private] |
Definition at line 97 of file perspective.h.
Referenced by GetFlux2RadianceFactors(), PerspectiveCamera(), and Sample_W().
float lux::PerspectiveCamera::xWidth [private] |
Definition at line 97 of file perspective.h.
Referenced by GetFlux2RadianceFactors(), and PerspectiveCamera().
float lux::PerspectiveCamera::yHeight [private] |
Definition at line 97 of file perspective.h.
Referenced by GetFlux2RadianceFactors(), and PerspectiveCamera().
float lux::PerspectiveCamera::yPixelHeight [private] |
Definition at line 97 of file perspective.h.
Referenced by GetFlux2RadianceFactors(), PerspectiveCamera(), and Sample_W().
1.5.9