Sphere Class Reference

#include <sphere.h>

Inheritance diagram for Sphere:
Shape ReferenceCounted

List of all members.

Public Member Functions

 Sphere (const Transform *o2w, const Transform *w2o, bool ro, float rad, float zmin, float zmax, float phiMax)
BBox ObjectBound () const
bool Intersect (const Ray &ray, float *tHit, float *rayEpsilon, 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 35 of file sphere.h.


Constructor & Destructor Documentation

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

Definition at line 32 of file sphere.cpp.

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


Member Function Documentation

float Sphere::Area (  )  const [virtual]

Reimplemented from Shape.

Definition at line 204 of file sphere.cpp.

References phiMax, radius, zmax, and zmin.

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

Reimplemented from Shape.

Definition at line 152 of file sphere.cpp.

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

BBox Sphere::ObjectBound (  )  const [virtual]

Implements Shape.

Definition at line 44 of file sphere.cpp.

References radius, zmax, and zmin.

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

Reimplemented from Shape.

Definition at line 256 of file sphere.cpp.

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

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

Reimplemented from Shape.

Definition at line 220 of file sphere.cpp.

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

Referenced by Sample().


Member Data Documentation

float Sphere::phiMax [private]

Definition at line 51 of file sphere.h.

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

float Sphere::radius [private]

Definition at line 50 of file sphere.h.

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

float Sphere::thetaMax [private]

Definition at line 53 of file sphere.h.

Referenced by Intersect(), and Sphere().

float Sphere::thetaMin [private]

Definition at line 53 of file sphere.h.

Referenced by Intersect(), and Sphere().

float Sphere::zmax [private]

Definition at line 52 of file sphere.h.

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

float Sphere::zmin [private]

Definition at line 52 of file sphere.h.

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


The documentation for this class was generated from the following files:
Generated on Sat Aug 28 20:00:15 2010 for pbrt by  doxygen 1.6.3