Sphere Class Reference

Inheritance diagram for Sphere:

Shape ReferenceCounted

List of all members.

Public Member Functions

 Sphere (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
Point Sample (const Point &p, float u1, float u2, Normal *ns) const
float Pdf (const Point &p, const Vector &wi) const

Private Attributes

float radius
float phiMax
float zmin
float zmax
float thetaMin
float thetaMax


Detailed Description

Definition at line 28 of file sphere.cpp.


Constructor & Destructor Documentation

Sphere::Sphere ( const Transform o2w,
bool  ro,
float  rad,
float  zmin,
float  zmax,
float  phiMax 
)

Definition at line 90 of file sphere.cpp.

References Clamp(), phiMax, Radians(), radius, thetaMax, thetaMin, zmax, and zmin.

Referenced by CreateShape().


Member Function Documentation

BBox Sphere::ObjectBound (  )  const [virtual]

Implements Shape.

Definition at line 100 of file sphere.cpp.

References radius, zmax, and zmin.

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

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

float Sphere::Area (  )  const [virtual]

Reimplemented from Shape.

Definition at line 251 of file sphere.cpp.

References phiMax, radius, zmax, and zmin.

Point Sphere::Sample ( float  u1,
float  u2,
Normal ns 
) const [inline, virtual]

Reimplemented from Shape.

Definition at line 38 of file sphere.cpp.

References Normalize(), Shape::ObjectToWorld, radius, Shape::reverseOrientation, UniformSampleSphere(), Point::x, Point::y, and Point::z.

Referenced by Sample().

Point Sphere::Sample ( const Point p,
float  u1,
float  u2,
Normal ns 
) const [inline, virtual]

float Sphere::Pdf ( const Point p,
const Vector wi 
) const [inline, virtual]

Reimplemented from Shape.

Definition at line 72 of file sphere.cpp.

References DistanceSquared(), Shape::ObjectToWorld, Shape::Pdf(), radius, and UniformConePdf().


Member Data Documentation

float Sphere::radius [private]

Definition at line 84 of file sphere.cpp.

Referenced by Area(), CreateShape(), Intersect(), IntersectP(), ObjectBound(), Pdf(), Sample(), and Sphere().

float Sphere::phiMax [private]

Definition at line 85 of file sphere.cpp.

Referenced by Area(), Intersect(), IntersectP(), and Sphere().

float Sphere::zmin [private]

Definition at line 86 of file sphere.cpp.

Referenced by Area(), CreateShape(), Intersect(), IntersectP(), ObjectBound(), and Sphere().

float Sphere::zmax [private]

Definition at line 86 of file sphere.cpp.

Referenced by Area(), CreateShape(), Intersect(), IntersectP(), ObjectBound(), and Sphere().

float Sphere::thetaMin [private]

Definition at line 87 of file sphere.cpp.

Referenced by Intersect(), and Sphere().

float Sphere::thetaMax [private]

Definition at line 87 of file sphere.cpp.

Referenced by Intersect(), and Sphere().


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

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