#include <sphere.h>
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 |
Definition at line 35 of file sphere.h.
float Sphere::Area | ( | ) | const [virtual] |
bool Sphere::Intersect | ( | const Ray & | ray, | |
float * | tHit, | |||
float * | rayEpsilon, | |||
DifferentialGeometry * | dg | |||
) | const [virtual] |
Reimplemented from Shape.
Definition at line 50 of file sphere.cpp.
References Clamp(), Cross(), Ray::d, Dot(), M_PI, Ray::maxt, Ray::mint, Normalize(), Ray::o, Shape::ObjectToWorld, phiMax, Quadratic(), radius, thetaMax, thetaMin, Point::x, Vector::x, Point::y, Vector::y, Point::z, Vector::z, zmax, and zmin.
Referenced by Sample().
bool Sphere::IntersectP | ( | const Ray & | ray | ) | const [virtual] |
BBox Sphere::ObjectBound | ( | ) | const [virtual] |
Reimplemented from Shape.
Definition at line 256 of file sphere.cpp.
References DistanceSquared(), Shape::Pdf(), radius, and UniformConePdf().
Reimplemented from Shape.
Definition at line 228 of file sphere.cpp.
References CoordinateSystem(), Ray::d, DistanceSquared(), Dot(), Intersect(), Normalize(), radius, Shape::ReverseOrientation, Sample(), and UniformSampleCone().
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().
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().