lux::GridAccel Class Reference

#include <grid.h>

Inheritance diagram for lux::GridAccel:

lux::Aggregate lux::Primitive

List of all members.

Public Member Functions

 GridAccel (const vector< 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

Static Public Member Functions

static PrimitiveCreateAccelerator (const vector< Primitive * > &prims, const ParamSet &ps)

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
GMailboxPrimmailboxes
int NVoxels [3]
BBox bounds
Vector Width
Vector InvWidth
Voxel ** voxels
boost::object_pool< VoxelvoxelArena

Static Private Attributes

static int curMailboxId = 0


Detailed Description

Definition at line 90 of file grid.h.


Constructor & Destructor Documentation

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

GridAccel::~GridAccel (  ) 

Definition at line 124 of file grid.cpp.

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


Member Function Documentation

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

Reimplemented from lux::Primitive.

Definition at line 96 of file grid.h.

Primitive * GridAccel::CreateAccelerator ( const vector< Primitive * > &  prims,
const ParamSet ps 
) [static]

Definition at line 344 of file grid.cpp.

References lux::ParamSet::FindOneBool(), and GridAccel().

Referenced by lux::MakeAccelerator().

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

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

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

Definition at line 116 of file grid.h.

References NVoxels.

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

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

Definition at line 104 of file grid.h.

References bounds, Clamp(), Float2Int(), InvWidth, NVoxels, and lux::BBox::pMin.

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

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

Definition at line 112 of file grid.h.

References bounds, lux::BBox::pMin, and Width.

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

Definition at line 109 of file grid.h.

References bounds, lux::BBox::pMin, and Width.

Referenced by Intersect(), and IntersectP().

BBox GridAccel::WorldBound (  )  const [virtual]

Implements lux::Primitive.

Definition at line 121 of file grid.cpp.

References bounds.

Referenced by GridAccel().


Member Data Documentation

Definition at line 124 of file grid.h.

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

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

Definition at line 130 of file grid.h.

Referenced by Intersect(), and IntersectP().

Definition at line 120 of file grid.h.

Referenced by Intersect().

Definition at line 125 of file grid.h.

Referenced by GridAccel(), and PosToVoxel().

Definition at line 122 of file grid.h.

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

Definition at line 121 of file grid.h.

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

int lux::GridAccel::NVoxels[3] [private]

Definition at line 123 of file grid.h.

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

boost::object_pool<Voxel> lux::GridAccel::voxelArena [private]

Definition at line 129 of file grid.h.

Referenced by GridAccel().

Definition at line 126 of file grid.h.

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

Definition at line 125 of file grid.h.

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


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

Generated on Mon May 18 07:13:51 2009 for lux by  doxygen 1.5.8