#include <bbox.h>
Public Member Functions | |
BBox () | |
BBox (const Point &p) | |
BBox (const Point &p1, const Point &p2) | |
bool | Overlaps (const BBox &b) const |
bool | Inside (const Point &pt) const |
void | Expand (float delta) |
float | Volume () const |
int | MaximumExtent () const |
void | BoundingSphere (Point *c, float *rad) const |
bool | IntersectP (const Ray &ray, float *hitt0=NULL, float *hitt1=NULL) const |
Public Attributes | |
Point | pMin |
Point | pMax |
Friends | |
ostream & | operator<< (ostream &os, const BBox &b) |
BBox | Union (const BBox &b, const Point &p) |
BBox | Union (const BBox &b, const BBox &b2) |
Definition at line 35 of file bbox.h.
lux::BBox::BBox | ( | ) | [inline] |
Definition at line 43 of file bbox.h.
References cimg_library::max(), cimg_library::min(), pMax, pMin, lux::Point::x, lux::Point::y, and lux::Point::z.
void BBox::BoundingSphere | ( | Point * | c, | |
float * | rad | |||
) | const |
Definition at line 55 of file geometry.cpp.
References lux::Distance(), Inside(), pMax, and pMin.
Referenced by lux::SunLight::Le(), lux::SkyLight::Le(), lux::SunLight::Power(), lux::SkyLight::Power(), lux::InfiniteAreaLightIS::Power(), lux::InfiniteAreaLight::Power(), lux::DistantLight::Power(), lux::SunLight::Sample_L(), lux::SkyLight::Sample_L(), lux::InfiniteAreaLightIS::Sample_L(), lux::InfiniteAreaLight::Sample_L(), and lux::DistantLight::Sample_L().
void lux::BBox::Expand | ( | float | delta | ) | [inline] |
bool lux::BBox::Inside | ( | const Point & | pt | ) | const [inline] |
Definition at line 61 of file bbox.h.
References pMax, pMin, lux::Point::x, lux::Point::y, and lux::Point::z.
Referenced by BoundingSphere(), lux::VolumeGrid::Density(), lux::ExponentialDensity::Density(), lux::GridAccel::Intersect(), lux::GridAccel::IntersectP(), lux::Octree< lux::IrradianceSample, lux::IrradProcess >::Lookup(), lux::HomogeneousVolume::Lve(), lux::HomogeneousVolume::p(), lux::HomogeneousVolume::sigma_a(), lux::HomogeneousVolume::sigma_s(), and lux::HomogeneousVolume::sigma_t().
bool BBox::IntersectP | ( | const Ray & | ray, | |
float * | hitt0 = NULL , |
|||
float * | hitt1 = NULL | |||
) | const |
Definition at line 59 of file geometry.cpp.
References lux::Ray::d, lux::Ray::maxt, lux::Ray::mint, lux::Ray::o, pMax, pMin, and cimg_library::cimg::swap().
Referenced by lux::UnsafeKdTreeAccel::Intersect(), lux::TaBRecKdTreeAccel::Intersect(), lux::ShapeSet::Intersect(), lux::GridAccel::Intersect(), lux::BruteForceAccel::Intersect(), lux::VolumeGrid::IntersectP(), lux::UnsafeKdTreeAccel::IntersectP(), lux::TaBRecKdTreeAccel::IntersectP(), lux::HomogeneousVolume::IntersectP(), lux::GridAccel::IntersectP(), lux::ExponentialDensity::IntersectP(), and lux::BruteForceAccel::IntersectP().
int lux::BBox::MaximumExtent | ( | ) | const [inline] |
Definition at line 74 of file bbox.h.
References pMax, pMin, lux::Vector::x, lux::Vector::y, and lux::Vector::z.
Referenced by lux::GridAccel::GridAccel(), and lux::KdTree< NodeData, LookupProc >::recursiveBuild().
bool lux::BBox::Overlaps | ( | const BBox & | b | ) | const [inline] |
Definition at line 55 of file bbox.h.
References pMax, pMin, lux::Point::x, lux::Point::y, and lux::Point::z.
float lux::BBox::Volume | ( | ) | const [inline] |
Definition at line 70 of file bbox.h.
References pMax, pMin, lux::Vector::x, lux::Vector::y, and lux::Vector::z.
Referenced by lux::IrradianceCache::IndirectLo().
Definition at line 40 of file geometry.cpp.
Definition at line 30 of file geometry.cpp.
Definition at line 88 of file bbox.h.
Referenced by lux::Octree< lux::IrradianceSample, lux::IrradProcess >::Add(), lux::Octree< NodeData, LookupProc >::addPrivate(), BBox(), BoundingSphere(), lux::UnsafeKdTreeAccel::buildTree(), lux::TaBRecKdTreeAccel::buildTree(), lux::VolumeGrid::Density(), Expand(), lux::GridAccel::GridAccel(), Inside(), IntersectP(), lux::Octree< NodeData, LookupProc >::lookupPrivate(), MaximumExtent(), lux::Transform::operator()(), lux::operator<<(), Overlaps(), lux::IrradianceCache::Preprocess(), lux::ShapeSet::ShapeSet(), lux::TaBRecKdTreeAccel::TaBRecKdTreeAccel(), lux::Union(), and Volume().
Definition at line 88 of file bbox.h.
Referenced by lux::Octree< lux::IrradianceSample, lux::IrradProcess >::Add(), lux::Octree< NodeData, LookupProc >::addPrivate(), BBox(), BoundingSphere(), lux::UnsafeKdTreeAccel::buildTree(), lux::TaBRecKdTreeAccel::buildTree(), lux::VolumeGrid::Density(), lux::ExponentialDensity::Density(), Expand(), lux::GridAccel::GridAccel(), Inside(), IntersectP(), lux::Octree< NodeData, LookupProc >::lookupPrivate(), MaximumExtent(), lux::Transform::operator()(), lux::operator<<(), Overlaps(), lux::GridAccel::PosToVoxel(), lux::IrradianceCache::Preprocess(), lux::ShapeSet::ShapeSet(), lux::TaBRecKdTreeAccel::TaBRecKdTreeAccel(), lux::Union(), Volume(), and lux::GridAccel::VoxelToPos().