#include <disk.h>
Public Member Functions | |
Disk (const Transform &o2w, bool ro, float height, float radius, float innerRadius, float phiMax) | |
BBox | ObjectBound () const |
bool | Intersect (const Ray &ray, float *tHit, DifferentialGeometry *dg) const |
bool | IntersectP (const Ray &ray) const |
float | Area () const |
Point | Sample (float u1, float u2, Normal *Ns) const |
Static Public Member Functions | |
static Shape * | CreateShape (const Transform &o2w, bool reverseOrientation, const ParamSet ¶ms) |
Private Attributes | |
float | height |
float | radius |
float | innerRadius |
float | phiMax |
Definition at line 30 of file disk.h.
Disk::Disk | ( | const Transform & | o2w, | |
bool | ro, | |||
float | height, | |||
float | radius, | |||
float | innerRadius, | |||
float | phiMax | |||
) |
Definition at line 30 of file disk.cpp.
References Clamp(), height, innerRadius, phiMax, Radians(), and radius.
Referenced by CreateShape().
float Disk::Area | ( | ) | const [virtual] |
Reimplemented from lux::Shape.
Definition at line 105 of file disk.cpp.
References innerRadius, phiMax, and radius.
Shape * Disk::CreateShape | ( | const Transform & | o2w, | |
bool | reverseOrientation, | |||
const ParamSet & | params | |||
) | [static] |
Definition at line 109 of file disk.cpp.
References Disk(), lux::ParamSet::FindOneFloat(), height, and radius.
Referenced by lux::MakeShape(), and lux::PerspectiveCamera::PerspectiveCamera().
bool Disk::Intersect | ( | const Ray & | ray, | |
float * | tHit, | |||
DifferentialGeometry * | dg | |||
) | const [virtual] |
Reimplemented from lux::Shape.
Definition at line 42 of file disk.cpp.
References lux::Ray::d, height, if(), innerRadius, INV_TWOPI, M_PI, lux::Ray::maxt, lux::Ray::o, lux::Shape::ObjectToWorld, phiMax, radius, lux::Shape::WorldToObject, lux::Point::x, lux::Point::y, lux::Point::z, and lux::Vector::z.
bool Disk::IntersectP | ( | const Ray & | ray | ) | const [virtual] |
Reimplemented from lux::Shape.
Definition at line 83 of file disk.cpp.
References lux::Ray::d, height, if(), innerRadius, M_PI, lux::Ray::maxt, lux::Ray::o, phiMax, radius, lux::Shape::WorldToObject, lux::Point::x, lux::Point::y, lux::Point::z, and lux::Vector::z.
BBox Disk::ObjectBound | ( | ) | const [virtual] |
Reimplemented from lux::Shape.
Definition at line 40 of file disk.h.
References lux::ConcentricSampleDisk(), lux::Normalize(), lux::Shape::ObjectToWorld, blender::p, lux::Shape::reverseOrientation, lux::Point::x, lux::Point::y, and lux::Point::z.
float lux::Disk::height [private] |
Definition at line 54 of file disk.h.
Referenced by CreateShape(), Disk(), Intersect(), IntersectP(), and ObjectBound().
float lux::Disk::innerRadius [private] |
float lux::Disk::phiMax [private] |
float lux::Disk::radius [private] |
Definition at line 54 of file disk.h.
Referenced by Area(), CreateShape(), Disk(), Intersect(), IntersectP(), and ObjectBound().