#include <lenscomponent.h>
Public Member Functions | |
LensComponent (const Transform &o2w, bool ro, float rad, float zmin, float zmax, float phiMax, float aperture) | |
virtual | ~LensComponent () |
virtual BBox | ObjectBound () const |
virtual bool | Intersect (const Ray &ray, float *tHit, DifferentialGeometry *dg) const |
virtual bool | IntersectP (const Ray &ray) const |
virtual float | Area () const |
virtual Point | Sample (float u1, float u2, float u3, Normal *n) const |
Static Public Member Functions | |
static Shape * | CreateShape (const Transform &o2w, bool reverseOrientation, const ParamSet ¶ms) |
Private Attributes | |
float | apRadius |
float | radius |
float | phiMax |
float | zmin |
float | zmax |
float | thetaMin |
float | thetaMax |
Definition at line 28 of file lenscomponent.h.
LensComponent::LensComponent | ( | const Transform & | o2w, | |
bool | ro, | |||
float | rad, | |||
float | zmin, | |||
float | zmax, | |||
float | phiMax, | |||
float | aperture | |||
) |
Definition at line 37 of file lenscomponent.cpp.
References apRadius, Clamp(), cimg_library::cimg::max(), cimg_library::cimg::min(), phiMax, Radians(), radius, thetaMax, thetaMin, zmax, and zmin.
Referenced by CreateShape().
virtual lux::LensComponent::~LensComponent | ( | ) | [inline, virtual] |
Definition at line 32 of file lenscomponent.h.
float LensComponent::Area | ( | ) | const [virtual] |
Returns the area of this primitive.
Reimplemented from lux::Primitive.
Definition at line 184 of file lenscomponent.cpp.
Shape * LensComponent::CreateShape | ( | const Transform & | o2w, | |
bool | reverseOrientation, | |||
const ParamSet & | params | |||
) | [static] |
Definition at line 188 of file lenscomponent.cpp.
References lux::ParamSet::FindOneFloat(), LensComponent(), radius, zmax, and zmin.
bool LensComponent::Intersect | ( | const Ray & | ray, | |
float * | tHit, | |||
DifferentialGeometry * | dg | |||
) | const [virtual] |
Reimplemented from lux::Shape.
Definition at line 59 of file lenscomponent.cpp.
References apRadius, lux::Ray::d, M_PI, lux::Ray::maxt, lux::Ray::mint, lux::Ray::o, lux::Shape::ObjectToWorld, phiMax, Quadratic(), radius, thetaMax, thetaMin, lux::Shape::WorldToObject, lux::Point::x, lux::Vector::x, lux::Point::y, lux::Vector::y, lux::Point::z, and lux::Vector::z.
bool LensComponent::IntersectP | ( | const Ray & | r | ) | const [virtual] |
Tests for intersection of this primitive with the given ray.
r | The ray to intersect with this primitive. |
Reimplemented from lux::Primitive.
Definition at line 138 of file lenscomponent.cpp.
References apRadius, lux::Ray::d, lux::Ray::maxt, lux::Ray::mint, lux::Ray::o, Quadratic(), radius, lux::Shape::WorldToObject, lux::Point::x, lux::Vector::x, lux::Point::y, lux::Vector::y, lux::Point::z, and lux::Vector::z.
BBox LensComponent::ObjectBound | ( | ) | const [virtual] |
Reimplemented from lux::Shape.
Definition at line 55 of file lenscomponent.cpp.
Reimplemented from lux::Shape.
Definition at line 48 of file lenscomponent.cpp.
References lux::ConcentricSampleDisk(), lux::Shape::ObjectToWorld, and radius.
float lux::LensComponent::apRadius [private] |
Definition at line 47 of file lenscomponent.h.
Referenced by Intersect(), IntersectP(), and LensComponent().
float lux::LensComponent::phiMax [private] |
Definition at line 49 of file lenscomponent.h.
Referenced by Area(), Intersect(), and LensComponent().
float lux::LensComponent::radius [private] |
Definition at line 48 of file lenscomponent.h.
Referenced by Area(), CreateShape(), Intersect(), IntersectP(), LensComponent(), ObjectBound(), and Sample().
float lux::LensComponent::thetaMax [private] |
Definition at line 51 of file lenscomponent.h.
Referenced by Intersect(), and LensComponent().
float lux::LensComponent::thetaMin [private] |
Definition at line 51 of file lenscomponent.h.
Referenced by Intersect(), and LensComponent().
float lux::LensComponent::zmax [private] |
Definition at line 50 of file lenscomponent.h.
Referenced by Area(), CreateShape(), LensComponent(), and ObjectBound().
float lux::LensComponent::zmin [private] |
Definition at line 50 of file lenscomponent.h.
Referenced by Area(), CreateShape(), LensComponent(), and ObjectBound().