#include <cone.h>
Public Member Functions | |
Cone (const Transform &o2w, bool ro, float height, float rad, float tm) | |
virtual | ~Cone () |
virtual BBox | ObjectBound () const |
virtual bool | Intersect (const Ray &ray, float *tHit, DifferentialGeometry *dg) const |
virtual bool | IntersectP (const Ray &ray) const |
virtual float | Area () const |
virtual Point | Sample (float u1, float u2, float u3, Normal *Ns) const |
Static Public Member Functions | |
static Shape * | CreateShape (const Transform &o2w, bool reverseOrientation, const ParamSet ¶ms) |
Protected Attributes | |
float | radius |
float | height |
float | phiMax |
Definition at line 30 of file cone.h.
Cone::Cone | ( | const Transform & | o2w, | |
bool | ro, | |||
float | height, | |||
float | rad, | |||
float | tm | |||
) |
float Cone::Area | ( | ) | const [virtual] |
bool Cone::Intersect | ( | const Ray & | ray, | |
float * | tHit, | |||
DifferentialGeometry * | dg | |||
) | const [virtual] |
Reimplemented from lux::Shape.
Definition at line 43 of file cone.cpp.
References lux::Cross(), lux::Ray::d, lux::Dot(), blender::g, G(), height, M_PI, lux::Ray::maxt, lux::Ray::mint, lux::Normalize(), lux::Ray::o, lux::Shape::ObjectToWorld, phiMax, Quadratic(), radius, lux::Shape::WorldToObject, lux::Point::x, lux::Vector::x, lux::Point::y, lux::Vector::y, lux::Point::z, and lux::Vector::z.
bool Cone::IntersectP | ( | const Ray & | r | ) | const [virtual] |
Tests for intersection of this primitive with the given ray.
r | The ray to intersect with this primitive. |
Reimplemented from lux::Primitive.
Definition at line 126 of file cone.cpp.
References lux::Ray::d, height, 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, and lux::Vector::z.
BBox Cone::ObjectBound | ( | ) | const [virtual] |
Reimplemented from lux::Shape.
virtual Point lux::Cone::Sample | ( | float | u1, | |
float | u2, | |||
float | u3, | |||
Normal * | Ns | |||
) | const [inline, virtual] |
Reimplemented from lux::Shape.
Definition at line 41 of file cone.h.
References lux::Normalize(), lux::Shape::ObjectToWorld, p, phiMax, radius, lux::Shape::reverseOrientation, lux::Point::x, and lux::Point::y.
float lux::Cone::height [protected] |
Definition at line 58 of file cone.h.
Referenced by Area(), Cone(), CreateShape(), Intersect(), IntersectP(), and ObjectBound().
float lux::Cone::phiMax [protected] |
Definition at line 58 of file cone.h.
Referenced by Area(), Cone(), Intersect(), IntersectP(), and Sample().
float lux::Cone::radius [protected] |
Definition at line 58 of file cone.h.
Referenced by Area(), Cone(), CreateShape(), Intersect(), IntersectP(), ObjectBound(), and Sample().