Public Member Functions | |
Cylinder (const Transform &o2w, bool ro, float rad, float zmin, float zmax, 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 |
Protected Attributes | |
float | radius |
float | zmin |
float | zmax |
float | phiMax |
Definition at line 27 of file cylinder.cpp.
Cylinder::Cylinder | ( | const Transform & | o2w, | |
bool | ro, | |||
float | rad, | |||
float | zmin, | |||
float | zmax, | |||
float | phiMax | |||
) |
Definition at line 53 of file cylinder.cpp.
References Clamp(), phiMax, Radians(), radius, zmax, and zmin.
Referenced by CreateShape().
BBox Cylinder::ObjectBound | ( | ) | const [virtual] |
bool Cylinder::Intersect | ( | const Ray & | ray, | |
float * | tHit, | |||
DifferentialGeometry * | dg | |||
) | const [virtual] |
Reimplemented from Shape.
Definition at line 66 of file cylinder.cpp.
References Cross(), Ray::d, Dot(), M_PI, Ray::maxt, Ray::mint, N, Normalize(), Ray::o, Shape::ObjectToWorld, phiMax, Quadratic(), radius, Shape::WorldToObject, Point::x, Vector::x, Point::y, Vector::y, Point::z, zmax, and zmin.
bool Cylinder::IntersectP | ( | const Ray & | ray | ) | const [virtual] |
float Cylinder::Area | ( | ) | const [virtual] |
Reimplemented from Shape.
Definition at line 37 of file cylinder.cpp.
References Lerp(), Normalize(), Shape::ObjectToWorld, radius, Shape::reverseOrientation, Point::x, and Point::y.
float Cylinder::radius [protected] |
Definition at line 48 of file cylinder.cpp.
Referenced by Area(), CreateShape(), Cylinder(), Intersect(), IntersectP(), ObjectBound(), and Sample().
float Cylinder::zmin [protected] |
Definition at line 49 of file cylinder.cpp.
Referenced by Area(), CreateShape(), Cylinder(), Intersect(), IntersectP(), and ObjectBound().
float Cylinder::zmax [protected] |
Definition at line 49 of file cylinder.cpp.
Referenced by Area(), CreateShape(), Cylinder(), Intersect(), IntersectP(), and ObjectBound().
float Cylinder::phiMax [protected] |
Definition at line 50 of file cylinder.cpp.
Referenced by Area(), Cylinder(), Intersect(), and IntersectP().