#include <geometry.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) |
COREDLL BBox | Union (const BBox &b, const Point &p) |
COREDLL BBox | Union (const BBox &b, const BBox &b2) |
Definition at line 229 of file geometry.h.
BBox::BBox | ( | ) | [inline] |
BBox::BBox | ( | const Point & | p | ) | [inline] |
Definition at line 236 of file geometry.h.
bool BBox::Overlaps | ( | const BBox & | b | ) | const [inline] |
bool BBox::Inside | ( | const Point & | pt | ) | const [inline] |
Definition at line 255 of file geometry.h.
References Point::x, Point::y, and Point::z.
Referenced by BoundingSphere(), VolumeGrid::Density(), ExponentialDensity::Density(), GridAccel::Intersect(), GridAccel::IntersectP(), Octree< IrradianceSample, IrradProcess >::Lookup(), HomogeneousVolume::Lve(), HomogeneousVolume::p(), HomogeneousVolume::sigma_a(), HomogeneousVolume::sigma_s(), and HomogeneousVolume::sigma_t().
void BBox::Expand | ( | float | delta | ) | [inline] |
float BBox::Volume | ( | ) | const [inline] |
Definition at line 264 of file geometry.h.
References Vector::x, Vector::y, and Vector::z.
Referenced by IrradianceCache::IndirectLo().
int BBox::MaximumExtent | ( | ) | const [inline] |
Definition at line 268 of file geometry.h.
References Vector::x, Vector::y, and Vector::z.
Referenced by GridAccel::GridAccel(), and KdTree< NodeData, LookupProc >::recursiveBuild().
void BBox::BoundingSphere | ( | Point * | c, | |
float * | rad | |||
) | const |
Definition at line 47 of file geometry.cpp.
References Distance(), Inside(), pMax, and pMin.
Referenced by InfiniteAreaLightIS::Power(), InfiniteAreaLight::Power(), DistantLight::Power(), InfiniteAreaLightIS::Sample_L(), InfiniteAreaLight::Sample_L(), and DistantLight::Sample_L().
bool BBox::IntersectP | ( | const Ray & | ray, | |
float * | hitt0 = NULL , |
|||
float * | hitt1 = NULL | |||
) | const |
Definition at line 51 of file geometry.cpp.
References Ray::d, Ray::maxt, Ray::mint, Ray::o, pMax, and pMin.
Referenced by KdTreeAccel::Intersect(), GridAccel::Intersect(), VolumeGrid::IntersectP(), KdTreeAccel::IntersectP(), HomogeneousVolume::IntersectP(), GridAccel::IntersectP(), and ExponentialDensity::IntersectP().
ostream& operator<< | ( | ostream & | os, | |
const BBox & | b | |||
) | [friend] |
Definition at line 379 of file geometry.h.
Definition at line 27 of file geometry.cpp.
Definition at line 37 of file geometry.cpp.
Definition at line 282 of file geometry.h.
Referenced by Octree< IrradianceSample, IrradProcess >::Add(), Octree< NodeData, LookupProc >::addPrivate(), BoundingSphere(), KdTreeAccel::buildTree(), VolumeGrid::Density(), ExponentialDensity::Density(), GridAccel::GridAccel(), IntersectP(), Octree< NodeData, LookupProc >::lookupPrivate(), Transform::operator()(), operator<<(), Overlaps(), GridAccel::PosToVoxel(), IrradianceCache::Preprocess(), Union(), and GridAccel::VoxelToPos().
Definition at line 282 of file geometry.h.
Referenced by Octree< IrradianceSample, IrradProcess >::Add(), Octree< NodeData, LookupProc >::addPrivate(), BoundingSphere(), KdTreeAccel::buildTree(), VolumeGrid::Density(), GridAccel::GridAccel(), IntersectP(), Octree< NodeData, LookupProc >::lookupPrivate(), Transform::operator()(), operator<<(), Overlaps(), IrradianceCache::Preprocess(), and Union().