#include <disk.h>
Public Member Functions | |
| Disk (const Transform &o2w, bool ro, float height, float radius, float innerRadius, float phiMax) | |
| virtual | ~Disk () |
| 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 *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 31 of file disk.cpp.
References Clamp(), height, innerRadius, phiMax, Radians(), and radius.
Referenced by CreateShape().
| float Disk::Area | ( | ) | const [virtual] |
Returns the area of this primitive.
Reimplemented from lux::Primitive.
Definition at line 106 of file disk.cpp.
References innerRadius, phiMax, and radius.
| bool Disk::Intersect | ( | const Ray & | ray, | |
| float * | tHit, | |||
| DifferentialGeometry * | dg | |||
| ) | const [virtual] |
Reimplemented from lux::Shape.
Definition at line 43 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 & | 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 84 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.
| virtual Point lux::Disk::Sample | ( | float | u1, | |
| float | u2, | |||
| float | u3, | |||
| Normal * | Ns | |||
| ) | const [inline, virtual] |
Reimplemented from lux::Shape.
Definition at line 41 of file disk.h.
References lux::ConcentricSampleDisk(), lux::Normalize(), lux::Shape::ObjectToWorld, p, lux::Shape::reverseOrientation, lux::Point::x, lux::Point::y, and lux::Point::z.
float lux::Disk::height [private] |
Definition at line 55 of file disk.h.
Referenced by CreateShape(), Disk(), Intersect(), IntersectP(), and ObjectBound().
float lux::Disk::innerRadius [private] |
Definition at line 55 of file disk.h.
Referenced by Area(), Disk(), Intersect(), and IntersectP().
float lux::Disk::phiMax [private] |
Definition at line 55 of file disk.h.
Referenced by Area(), Disk(), Intersect(), and IntersectP().
float lux::Disk::radius [private] |
Definition at line 55 of file disk.h.
Referenced by Area(), CreateShape(), Disk(), Intersect(), IntersectP(), and ObjectBound().
1.6.2-20100208