BBox Class Reference

#include <geometry.h>

List of all members.

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)


Detailed Description

Definition at line 216 of file geometry.h.


Constructor & Destructor Documentation

BBox::BBox (  )  [inline]

Definition at line 219 of file geometry.h.

References INFINITY.

BBox::BBox ( const Point p  )  [inline]

Definition at line 223 of file geometry.h.

BBox::BBox ( const Point p1,
const Point p2 
) [inline]

Definition at line 224 of file geometry.h.

References Point::x, Point::y, and Point::z.


Member Function Documentation

bool BBox::Overlaps ( const BBox b  )  const [inline]

Definition at line 236 of file geometry.h.

References pMax, pMin, Point::x, Point::y, and Point::z.

bool BBox::Inside ( const Point pt  )  const [inline]

Definition at line 242 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]

Definition at line 247 of file geometry.h.

Referenced by IrradianceCache::IndirectLo().

float BBox::Volume (  )  const [inline]

Definition at line 251 of file geometry.h.

References Vector::x, Vector::y, and Vector::z.

Referenced by IrradianceCache::IndirectLo().

int BBox::MaximumExtent (  )  const [inline]

Definition at line 255 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 34 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 38 of file geometry.cpp.

References Ray::d, if(), 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().


Friends And Related Function Documentation

ostream& operator<< ( ostream &  os,
const BBox b 
) [friend]

Definition at line 366 of file geometry.h.

COREDLL BBox Union ( const BBox b,
const Point p 
) [friend]

Definition at line 14 of file geometry.cpp.

COREDLL BBox Union ( const BBox b,
const BBox b2 
) [friend]

Definition at line 24 of file geometry.cpp.


Member Data Documentation

Point BBox::pMin

Definition at line 269 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().

Point BBox::pMax

Definition at line 269 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().


The documentation for this class was generated from the following files:
Generated on Wed Sep 26 14:01:24 2007 for pbrt by  doxygen 1.5.1