#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 |
float | SurfaceArea () 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 34 of file bbox.h.
Definition at line 42 of file bbox.h.
References cimg_library::cimg::max(), cimg_library::cimg::min(), pMax, pMin, lux::Point::x, lux::Point::y, and lux::Point::z.
void lux::BBox::BoundingSphere | ( | Point * | c, | |
float * | rad | |||
) | const |
Definition at line 52 of file bbox.cpp.
References lux::Distance(), Inside(), pMax, and pMin.
Referenced by lux::SunLight::Le(), lux::SkyLight::Le(), lux::InfiniteAreaLight::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] |
Definition at line 65 of file bbox.h.
Referenced by lux::PerspectiveCamera::Bounds(), lux::OrthoCamera::Bounds(), lux::EnvironmentCamera::Bounds(), lux::IrradianceCache::IndirectLo(), and lux::TaBRecKdTreeAccel::TaBRecKdTreeAccel().
bool lux::BBox::Inside | ( | const Point & | pt | ) | const [inline] |
Definition at line 60 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::Cloud::Density(), lux::GridAccel::Intersect(), lux::GridAccel::IntersectP(), lux::Octree< IrradianceSample, IrradProcess >::Lookup(), lux::HomogeneousVolume::Lve(), lux::HomogeneousVolume::P(), lux::HomogeneousVolume::sigma_a(), lux::HomogeneousVolume::sigma_s(), and lux::HomogeneousVolume::sigma_t().
bool lux::BBox::IntersectP | ( | const Ray & | ray, | |
float * | hitt0 = NULL , |
|||
float * | hitt1 = NULL | |||
) | const |
Definition at line 61 of file bbox.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::PrimitiveSet::Intersect(), lux::GridAccel::Intersect(), lux::BruteForceAccel::Intersect(), lux::VolumeGrid::IntersectP(), lux::UnsafeKdTreeAccel::IntersectP(), lux::TaBRecKdTreeAccel::IntersectP(), lux::PrimitiveSet::IntersectP(), lux::HomogeneousVolume::IntersectP(), lux::GridAccel::IntersectP(), lux::ExponentialDensity::IntersectP(), lux::Cloud::IntersectP(), and lux::BruteForceAccel::IntersectP().
int lux::BBox::MaximumExtent | ( | ) | const [inline] |
Definition at line 77 of file bbox.h.
References pMax, pMin, lux::Vector::x, lux::Vector::y, and lux::Vector::z.
Referenced by lux::MeshQuadrilateral::GetShadingGeometry(), lux::GridAccel::GridAccel(), and lux::KdTree< NodeData, LookupProc >::recursiveBuild().
bool lux::BBox::Overlaps | ( | const BBox & | b | ) | const [inline] |
Definition at line 54 of file bbox.h.
References pMax, pMin, lux::Point::x, lux::Point::y, and lux::Point::z.
float lux::BBox::SurfaceArea | ( | ) | const [inline] |
Definition at line 73 of file bbox.h.
References pMax, pMin, lux::Vector::x, lux::Vector::y, and lux::Vector::z.
float lux::BBox::Volume | ( | ) | const [inline] |
Definition at line 69 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 91 of file bbox.h.
Referenced by lux::Octree< IrradianceSample, IrradProcess >::Add(), lux::Octree< NodeData, LookupProc >::addPrivate(), BBox(), BoundingSphere(), lux::UnsafeKdTreeAccel::buildTree(), lux::TaBRecKdTreeAccel::buildTree(), lux::Cloud::Cloud(), lux::VolumeGrid::Density(), lux::MachineEpsilon::E(), Expand(), lux::BVHAccel::FindBestSplit(), lux::MeshQuadrilateral::GetShadingGeometry(), lux::GridAccel::GridAccel(), Inside(), IntersectP(), lux::Octree< NodeData, LookupProc >::lookupPrivate(), MaximumExtent(), lux::Transform::operator()(), lux::operator<<(), Overlaps(), lux::IrradianceCache::Preprocess(), lux::PrimitiveSet::PrimitiveSet(), lux::QBVHNode::SetBBox(), SurfaceArea(), lux::Union(), and Volume().
Definition at line 91 of file bbox.h.
Referenced by lux::Octree< IrradianceSample, IrradProcess >::Add(), lux::Octree< NodeData, LookupProc >::addPrivate(), BBox(), BoundingSphere(), lux::UnsafeKdTreeAccel::buildTree(), lux::TaBRecKdTreeAccel::buildTree(), lux::Cloud::Cloud(), lux::VolumeGrid::Density(), lux::ExponentialDensity::Density(), lux::MachineEpsilon::E(), Expand(), lux::BVHAccel::FindBestSplit(), lux::MeshQuadrilateral::GetShadingGeometry(), lux::GridAccel::GridAccel(), Inside(), IntersectP(), lux::Octree< NodeData, LookupProc >::lookupPrivate(), MaximumExtent(), lux::Transform::operator()(), lux::operator<<(), Overlaps(), lux::GridAccel::PosToVoxel(), lux::IrradianceCache::Preprocess(), lux::PrimitiveSet::PrimitiveSet(), lux::QBVHNode::SetBBox(), SurfaceArea(), lux::Union(), Volume(), and lux::GridAccel::VoxelToPos().