KdTreeAccel Class Reference

Inheritance diagram for KdTreeAccel:

Aggregate Primitive ReferenceCounted

List of all members.

Public Member Functions

 KdTreeAccel (const vector< Reference< Primitive > > &p, int icost, int scost, float ebonus, int maxp, int maxDepth)
BBox WorldBound () const
bool CanIntersect () const
 ~KdTreeAccel ()
void buildTree (int nodeNum, const BBox &bounds, const vector< BBox > &primBounds, int *primNums, int nprims, int depth, BoundEdge *edges[3], int *prims0, int *prims1, int badRefines=0)
bool Intersect (const Ray &ray, Intersection *isect) const
bool IntersectP (const Ray &ray) const

Private Attributes

int isectCost
int traversalCost
int maxPrims
float emptyBonus
u_int nMailboxes
MailboxPrimmailboxPrims
int curMailboxId
KdAccelNodenodes
int nAllocedNodes
int nextFreeNode
BBox bounds
MemoryArena arena


Detailed Description

Definition at line 108 of file kdtree.cpp.


Constructor & Destructor Documentation

KdTreeAccel::KdTreeAccel ( const vector< Reference< Primitive > > &  p,
int  icost,
int  scost,
float  ebonus,
int  maxp,
int  maxDepth 
)

KdTreeAccel::~KdTreeAccel (  ) 

Definition at line 191 of file kdtree.cpp.

References FreeAligned(), mailboxPrims, nMailboxes, and nodes.


Member Function Documentation

BBox KdTreeAccel::WorldBound (  )  const [inline, virtual]

Implements Primitive.

Definition at line 114 of file kdtree.cpp.

References bounds.

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

Reimplemented from Primitive.

Definition at line 115 of file kdtree.cpp.

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

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

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


Member Data Documentation

int KdTreeAccel::isectCost [private]

Definition at line 126 of file kdtree.cpp.

Referenced by buildTree(), and CreateAccelerator().

Definition at line 126 of file kdtree.cpp.

Referenced by buildTree().

int KdTreeAccel::maxPrims [private]

Definition at line 126 of file kdtree.cpp.

Referenced by buildTree(), and CreateAccelerator().

float KdTreeAccel::emptyBonus [private]

Definition at line 127 of file kdtree.cpp.

Referenced by buildTree(), and CreateAccelerator().

Definition at line 128 of file kdtree.cpp.

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

Definition at line 129 of file kdtree.cpp.

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

int KdTreeAccel::curMailboxId [mutable, private]

Definition at line 130 of file kdtree.cpp.

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

Definition at line 131 of file kdtree.cpp.

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

Definition at line 132 of file kdtree.cpp.

Referenced by buildTree(), and KdTreeAccel().

Definition at line 132 of file kdtree.cpp.

Referenced by buildTree(), and KdTreeAccel().

Definition at line 133 of file kdtree.cpp.

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

Definition at line 134 of file kdtree.cpp.

Referenced by buildTree().


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