Cylinder Class Reference

Inheritance diagram for Cylinder:

Shape ReferenceCounted

List of all members.

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


Detailed Description

Definition at line 27 of file cylinder.cpp.


Constructor & Destructor Documentation

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().


Member Function Documentation

BBox Cylinder::ObjectBound (  )  const [virtual]

Implements Shape.

Definition at line 61 of file cylinder.cpp.

References radius, zmax, and zmin.

bool Cylinder::Intersect ( const Ray ray,
float *  tHit,
DifferentialGeometry dg 
) const [virtual]

bool Cylinder::IntersectP ( const Ray ray  )  const [virtual]

Reimplemented from Shape.

Definition at line 140 of file cylinder.cpp.

References Ray::d, M_PI, Ray::maxt, Ray::mint, Ray::o, phiMax, Quadratic(), radius, Shape::WorldToObject, Point::x, Vector::x, Point::y, Vector::y, Point::z, zmax, and zmin.

float Cylinder::Area (  )  const [virtual]

Reimplemented from Shape.

Definition at line 180 of file cylinder.cpp.

References phiMax, radius, zmax, and zmin.

Point Cylinder::Sample ( float  u1,
float  u2,
Normal Ns 
) const [inline, 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.


Member Data Documentation

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().


The documentation for this class was generated from the following file:

Generated on Mon Jul 20 17:31:54 2009 for pbrt by  doxygen 1.5.6