GridAccel Class Reference

Inheritance diagram for GridAccel:

Aggregate Primitive ReferenceCounted

List of all members.

Public Member Functions

 GridAccel (const vector< Reference< Primitive > > &p, bool forRefined, 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
Point VoxelToPos (int x, int y, int z) const
int Offset (int x, int y, int z) const

Private Attributes

bool gridForRefined
u_int nMailboxes
MailboxPrimmailboxes
int NVoxels [3]
BBox bounds
Vector Width
Vector InvWidth
Voxel ** voxels
ObjectArena< VoxelvoxelArena

Static Private Attributes

static int curMailboxId = 0


Detailed Description

Definition at line 83 of file grid.cpp.


Constructor & Destructor Documentation

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

GridAccel::~GridAccel (  ) 

Definition at line 214 of file grid.cpp.

References FreeAligned(), mailboxes, nMailboxes, NVoxels, voxels, and Voxel::~Voxel().


Member Function Documentation

BBox GridAccel::WorldBound (  )  const [virtual]

Implements Primitive.

Definition at line 211 of file grid.cpp.

References bounds.

Referenced by GridAccel().

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

Reimplemented from Primitive.

Definition at line 89 of file grid.cpp.

bool GridAccel::Intersect ( const Ray ray,
Intersection isect 
) const [virtual]

bool GridAccel::IntersectP ( const Ray ray  )  const [virtual]

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

Definition at line 95 of file grid.cpp.

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 100 of file grid.cpp.

References bounds, BBox::pMin, and Width.

Referenced by Intersect(), and IntersectP().

Point GridAccel::VoxelToPos ( int  x,
int  y,
int  z 
) const [inline, private]

Definition at line 103 of file grid.cpp.

References bounds, BBox::pMin, and Width.

int GridAccel::Offset ( int  x,
int  y,
int  z 
) const [inline, private]

Definition at line 107 of file grid.cpp.

References NVoxels.

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


Member Data Documentation

bool GridAccel::gridForRefined [private]

Definition at line 111 of file grid.cpp.

Referenced by Intersect(), and IntersectP().

Definition at line 112 of file grid.cpp.

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

Definition at line 113 of file grid.cpp.

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

int GridAccel::NVoxels[3] [private]

Definition at line 114 of file grid.cpp.

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

Definition at line 115 of file grid.cpp.

Referenced by GridAccel(), Intersect(), IntersectP(), PosToVoxel(), VoxelToPos(), and WorldBound().

Definition at line 116 of file grid.cpp.

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

Definition at line 116 of file grid.cpp.

Referenced by GridAccel(), and PosToVoxel().

Voxel** GridAccel::voxels [private]

Definition at line 117 of file grid.cpp.

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

Definition at line 118 of file grid.cpp.

Referenced by GridAccel().

int GridAccel::curMailboxId = 0 [static, private]

Definition at line 119 of file grid.cpp.

Referenced by Intersect(), and IntersectP().


The documentation for this class was generated from the following file:

Generated on Mon Jul 20 17:31:55 2009 for pbrt by  doxygen 1.5.6