#include <cone.h>
Public Member Functions | |
Cone (const Transform &o2w, bool ro, float height, float rad, float tm) | |
BBox | ObjectBound () const |
bool | Intersect (const Ray &ray, float *tHit, DifferentialGeometry *dg) const |
bool | IntersectP (const Ray &ray) const |
float | Area () 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] |
Shape * Cone::CreateShape | ( | const Transform & | o2w, | |
bool | reverseOrientation, | |||
const ParamSet & | params | |||
) | [static] |
Definition at line 176 of file cone.cpp.
References Cone(), lux::ParamSet::FindOneFloat(), height, and radius.
Referenced by lux::MakeShape().
bool Cone::Intersect | ( | const Ray & | ray, | |
float * | tHit, | |||
DifferentialGeometry * | dg | |||
) | const [virtual] |
Reimplemented from lux::Shape.
Definition at line 42 of file cone.cpp.
References lux::Cross(), lux::Ray::d, lux::Dot(), blender::g, height, M_PI, lux::Ray::maxt, lux::Ray::mint, N, 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 & | ray | ) | const [virtual] |
Reimplemented from lux::Shape.
Definition at line 125 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] |
float lux::Cone::height [protected] |
Definition at line 45 of file cone.h.
Referenced by Area(), Cone(), CreateShape(), Intersect(), IntersectP(), and ObjectBound().
float lux::Cone::phiMax [protected] |
Definition at line 45 of file cone.h.
Referenced by Area(), Cone(), Intersect(), and IntersectP().
float lux::Cone::radius [protected] |
Definition at line 45 of file cone.h.
Referenced by Area(), Cone(), CreateShape(), Intersect(), IntersectP(), and ObjectBound().