#include <shape.h>
Public Member Functions | |
Point | Sample (float u1, float u2, Normal *Ns) const |
ShapeSet (const vector< boost::shared_ptr< Shape > > &s, const Transform &o2w, bool ro) | |
BBox | ObjectBound () const |
bool | CanIntersect () const |
bool | Intersect (const Ray &ray, float *t_hitp, DifferentialGeometry *dg) const |
void | Refine (vector< boost::shared_ptr< Shape > > &refined) const |
float | Area () const |
Private Attributes | |
float | area |
vector< float > | areaCDF |
vector< boost::shared_ptr < Shape > > | shapes |
BBox | worldbound |
Primitive * | accelerator |
Definition at line 121 of file shape.h.
ShapeSet::ShapeSet | ( | const vector< boost::shared_ptr< Shape > > & | s, | |
const Transform & | o2w, | |||
bool | ro | |||
) |
Definition at line 41 of file shape.cpp.
References accelerator, area, areaCDF, LUX_BUG, LUX_SEVERE, luxError, lux::MakeAccelerator(), lux::BBox::pMax, lux::BBox::pMin, shapes, lux::Shape::WorldBound(), and worldbound.
float lux::ShapeSet::Area | ( | ) | const [inline, virtual] |
bool lux::ShapeSet::CanIntersect | ( | ) | const [inline, virtual] |
Reimplemented from lux::Shape.
Definition at line 139 of file shape.h.
References shapes.
Referenced by Refine().
bool ShapeSet::Intersect | ( | const Ray & | ray, | |
float * | t_hitp, | |||
DifferentialGeometry * | dg | |||
) | const [virtual] |
Reimplemented from lux::Shape.
Definition at line 77 of file shape.cpp.
References accelerator, lux::Intersection::dg, lux::Primitive::Intersect(), lux::BBox::IntersectP(), lux::Ray::maxt, shapes, and worldbound.
BBox lux::ShapeSet::ObjectBound | ( | ) | const [inline, virtual] |
void lux::ShapeSet::Refine | ( | vector< boost::shared_ptr< Shape > > & | refined | ) | const [inline, virtual] |
Reimplemented from lux::Shape.
Definition at line 146 of file shape.h.
References CanIntersect(), and shapes.
Reimplemented from lux::Shape.
Definition at line 124 of file shape.h.
References areaCDF, lux::random::floatValue(), and shapes.
Primitive* lux::ShapeSet::accelerator [private] |
float lux::ShapeSet::area [private] |
vector<float> lux::ShapeSet::areaCDF [private] |
vector<boost::shared_ptr<Shape> > lux::ShapeSet::shapes [private] |
Definition at line 159 of file shape.h.
Referenced by CanIntersect(), Intersect(), ObjectBound(), Refine(), Sample(), and ShapeSet().
BBox lux::ShapeSet::worldbound [private] |