#include <sphere.h>
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 |
Static Public Member Functions | |
| static Shape * | CreateShape (const Transform &o2w, bool reverseOrientation, const ParamSet ¶ms) |
Private Attributes | |
| float | radius |
| float | phiMax |
| float | zmin |
| float | zmax |
| float | thetaMin |
| float | thetaMax |
Definition at line 31 of file sphere.h.
| Sphere::Sphere | ( | const Transform & | o2w, | |
| bool | ro, | |||
| float | rad, | |||
| float | zmin, | |||
| float | zmax, | |||
| float | phiMax | |||
| ) |
Definition at line 30 of file sphere.cpp.
References Clamp(), cimg_library::cimg::max(), cimg_library::cimg::min(), phiMax, Radians(), radius, thetaMax, thetaMin, zmax, and zmin.
Referenced by CreateShape().
| float Sphere::Area | ( | ) | const [virtual] |
Reimplemented from lux::Shape.
Definition at line 191 of file sphere.cpp.
| Shape * Sphere::CreateShape | ( | const Transform & | o2w, | |
| bool | reverseOrientation, | |||
| const ParamSet & | params | |||
| ) | [static] |
Definition at line 194 of file sphere.cpp.
References lux::ParamSet::FindOneFloat(), radius, Sphere(), zmax, and zmin.
Referenced by lux::MakeShape().
| bool Sphere::Intersect | ( | const Ray & | ray, | |
| float * | tHit, | |||
| DifferentialGeometry * | dg | |||
| ) | const [virtual] |
Reimplemented from lux::Shape.
Definition at line 44 of file sphere.cpp.
References lux::Cross(), lux::Ray::d, lux::Dot(), blender::g, M_PI, lux::Ray::maxt, lux::Ray::mint, N, lux::Normalize(), lux::Ray::o, lux::Shape::ObjectToWorld, phiMax, Quadratic(), radius, thetaMax, thetaMin, lux::Shape::WorldToObject, lux::Point::x, lux::Vector::x, lux::Point::y, lux::Vector::y, lux::Point::z, lux::Vector::z, zmax, and zmin.
Referenced by Sample().
| bool Sphere::IntersectP | ( | const Ray & | ray | ) | const [virtual] |
Reimplemented from lux::Shape.
Definition at line 148 of file sphere.cpp.
References lux::Ray::d, M_PI, lux::Ray::maxt, lux::Ray::mint, lux::Ray::o, phiMax, Quadratic(), radius, lux::Shape::WorldToObject, lux::Point::x, lux::Vector::x, lux::Point::y, lux::Vector::y, lux::Point::z, lux::Vector::z, zmax, and zmin.
| BBox Sphere::ObjectBound | ( | ) | const [virtual] |
Reimplemented from lux::Shape.
Definition at line 75 of file sphere.h.
References lux::DistanceSquared(), cimg_library::cimg::max(), lux::Shape::ObjectToWorld, radius, and lux::UniformConePdf().
| Point lux::Sphere::Sample | ( | const Point & | p, | |
| float | u1, | |||
| float | u2, | |||
| Normal * | ns | |||
| ) | const [inline, virtual] |
Reimplemented from lux::Shape.
Definition at line 48 of file sphere.h.
References lux::CoordinateSystem(), lux::DistanceSquared(), Intersect(), cimg_library::cimg::max(), lux::Normalize(), lux::Shape::ObjectToWorld, radius, lux::Shape::reverseOrientation, Sample(), and lux::UniformSampleCone().
Reimplemented from lux::Shape.
Definition at line 41 of file sphere.h.
References lux::Normalize(), lux::Shape::ObjectToWorld, blender::p, radius, lux::Shape::reverseOrientation, lux::UniformSampleSphere(), lux::Point::x, lux::Point::y, and lux::Point::z.
Referenced by Sample().
float lux::Sphere::phiMax [private] |
Definition at line 90 of file sphere.h.
Referenced by Area(), Intersect(), IntersectP(), and Sphere().
float lux::Sphere::radius [private] |
Definition at line 89 of file sphere.h.
Referenced by Area(), CreateShape(), Intersect(), IntersectP(), ObjectBound(), Pdf(), Sample(), and Sphere().
float lux::Sphere::thetaMax [private] |
Definition at line 92 of file sphere.h.
Referenced by Intersect(), and Sphere().
float lux::Sphere::thetaMin [private] |
Definition at line 92 of file sphere.h.
Referenced by Intersect(), and Sphere().
float lux::Sphere::zmax [private] |
Definition at line 91 of file sphere.h.
Referenced by Area(), CreateShape(), Intersect(), IntersectP(), ObjectBound(), and Sphere().
float lux::Sphere::zmin [private] |
Definition at line 91 of file sphere.h.
Referenced by Area(), CreateShape(), Intersect(), IntersectP(), ObjectBound(), and Sphere().
1.6.1