KdTreeAccel Class Reference

#include <kdtreeaccel.h>

Inheritance diagram for KdTreeAccel:
Aggregate Primitive ReferenceCounted

List of all members.

Public Member Functions

 KdTreeAccel (const vector< Reference< Primitive > > &p, int icost=80, int scost=1, float ebonus=0.5f, int maxp=1, int maxDepth=-1)
BBox WorldBound () const
bool CanIntersect () const
 ~KdTreeAccel ()
bool Intersect (const Ray &ray, Intersection *isect) const
bool IntersectP (const Ray &ray) const

Private Member Functions

void buildTree (int nodeNum, const BBox &bounds, const vector< BBox > &primBounds, uint32_t *primNums, int nprims, int depth, BoundEdge *edges[3], uint32_t *prims0, uint32_t *prims1, int badRefines=0)

Private Attributes

int isectCost
int traversalCost
int maxPrims
int maxDepth
float emptyBonus
vector< Reference< Primitive > > primitives
KdAccelNodenodes
int nAllocedNodes
int nextFreeNode
BBox bounds
MemoryArena arena

Detailed Description

Definition at line 38 of file kdtreeaccel.h.


Constructor & Destructor Documentation

KdTreeAccel::KdTreeAccel ( const vector< Reference< Primitive > > &  p,
int  icost = 80,
int  scost = 1,
float  ebonus = 0.5f,
int  maxp = 1,
int  maxDepth = -1 
)
KdTreeAccel::~KdTreeAccel (  ) 

Definition at line 145 of file kdtreeaccel.cpp.

References FreeAligned(), and nodes.


Member Function Documentation

void KdTreeAccel::buildTree ( int  nodeNum,
const BBox bounds,
const vector< BBox > &  primBounds,
uint32_t *  primNums,
int  nprims,
int  depth,
BoundEdge edges[3],
uint32_t *  prims0,
uint32_t *  prims1,
int  badRefines = 0 
) [private]
bool KdTreeAccel::CanIntersect (  )  const [inline, virtual]

Reimplemented from Primitive.

Definition at line 45 of file kdtreeaccel.h.

bool KdTreeAccel::Intersect ( const Ray ray,
Intersection isect 
) const [virtual]
bool KdTreeAccel::IntersectP ( const Ray ray  )  const [virtual]
BBox KdTreeAccel::WorldBound (  )  const [inline, virtual]

Implements Primitive.

Definition at line 44 of file kdtreeaccel.h.

References bounds.


Member Data Documentation

Definition at line 62 of file kdtreeaccel.h.

Referenced by buildTree().

Definition at line 61 of file kdtreeaccel.h.

Referenced by Intersect(), IntersectP(), KdTreeAccel(), and WorldBound().

float KdTreeAccel::emptyBonus [private]

Definition at line 57 of file kdtreeaccel.h.

Referenced by buildTree().

int KdTreeAccel::isectCost [private]

Definition at line 56 of file kdtreeaccel.h.

Referenced by buildTree().

int KdTreeAccel::maxDepth [private]

Definition at line 56 of file kdtreeaccel.h.

Referenced by buildTree(), and KdTreeAccel().

int KdTreeAccel::maxPrims [private]

Definition at line 56 of file kdtreeaccel.h.

Referenced by buildTree().

Definition at line 60 of file kdtreeaccel.h.

Referenced by buildTree(), and KdTreeAccel().

Definition at line 60 of file kdtreeaccel.h.

Referenced by buildTree(), and KdTreeAccel().

Definition at line 59 of file kdtreeaccel.h.

Referenced by buildTree(), Intersect(), IntersectP(), and ~KdTreeAccel().

Definition at line 58 of file kdtreeaccel.h.

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

Definition at line 56 of file kdtreeaccel.h.

Referenced by buildTree().


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