GridAccel Class Reference

#include <grid.h>

Inheritance diagram for GridAccel:
Aggregate Primitive ReferenceCounted

List of all members.

Public Member Functions

 GridAccel (const vector< Reference< Primitive > > &p, bool refineImmediately)
BBox WorldBound () const
bool CanIntersect () const
 ~GridAccel ()
bool Intersect (const Ray &ray, Intersection *isect) const
bool IntersectP (const Ray &ray) const

Private Member Functions

int posToVoxel (const Point &P, int axis) const
float voxelToPos (int p, int axis) const
int offset (int x, int y, int z) const

Private Attributes

vector< Reference< Primitive > > primitives
int nVoxels [3]
BBox bounds
Vector width
Vector invWidth
Voxel ** voxels
MemoryArena voxelArena
RWMutexrwMutex

Detailed Description

Definition at line 60 of file grid.h.


Constructor & Destructor Documentation

GridAccel::GridAccel ( const vector< Reference< Primitive > > &  p,
bool  refineImmediately 
)
GridAccel::~GridAccel (  ) 

Definition at line 107 of file grid.cpp.

References RWMutex::Destroy(), FreeAligned(), nVoxels, rwMutex, and voxels.


Member Function Documentation

bool GridAccel::CanIntersect (  )  const [inline, virtual]

Reimplemented from Primitive.

Definition at line 65 of file grid.h.

bool GridAccel::Intersect ( const Ray ray,
Intersection isect 
) const [virtual]
bool GridAccel::IntersectP ( const Ray ray  )  const [virtual]
int GridAccel::offset ( int  x,
int  y,
int  z 
) const [inline, private]

Definition at line 79 of file grid.h.

References nVoxels.

Referenced by GridAccel(), Intersect(), and IntersectP().

int GridAccel::posToVoxel ( const Point P,
int  axis 
) const [inline, private]

Definition at line 71 of file grid.h.

References bounds, Clamp(), Float2Int(), invWidth, nVoxels, and BBox::pMin.

Referenced by GridAccel(), Intersect(), and IntersectP().

float GridAccel::voxelToPos ( int  p,
int  axis 
) const [inline, private]

Definition at line 76 of file grid.h.

References bounds, BBox::pMin, and width.

Referenced by Intersect(), and IntersectP().

BBox GridAccel::WorldBound (  )  const [virtual]

Implements Primitive.

Definition at line 102 of file grid.cpp.

References bounds.

Referenced by GridAccel().


Member Data Documentation

Definition at line 86 of file grid.h.

Referenced by GridAccel(), Intersect(), IntersectP(), posToVoxel(), voxelToPos(), and WorldBound().

Definition at line 87 of file grid.h.

Referenced by GridAccel(), and posToVoxel().

int GridAccel::nVoxels[3] [private]

Definition at line 85 of file grid.h.

Referenced by GridAccel(), Intersect(), IntersectP(), offset(), posToVoxel(), and ~GridAccel().

Definition at line 84 of file grid.h.

Referenced by GridAccel().

RWMutex* GridAccel::rwMutex [mutable, private]

Definition at line 90 of file grid.h.

Referenced by GridAccel(), Intersect(), IntersectP(), and ~GridAccel().

Definition at line 89 of file grid.h.

Referenced by GridAccel().

Voxel** GridAccel::voxels [private]

Definition at line 88 of file grid.h.

Referenced by GridAccel(), Intersect(), IntersectP(), and ~GridAccel().

Definition at line 87 of file grid.h.

Referenced by GridAccel(), Intersect(), IntersectP(), and voxelToPos().


The documentation for this class was generated from the following files:
Generated on Sat Aug 28 20:00:13 2010 for pbrt by  doxygen 1.6.3