BVHAccel Class Reference

#include <bvh.h>

Inheritance diagram for BVHAccel:
Aggregate Primitive ReferenceCounted

List of all members.

Public Member Functions

 BVHAccel (const vector< Reference< Primitive > > &p, uint32_t maxPrims=1, const string &sm="sah")
BBox WorldBound () const
bool CanIntersect () const
 ~BVHAccel ()
bool Intersect (const Ray &ray, Intersection *isect) const
bool IntersectP (const Ray &ray) const

Private Types

enum  SplitMethod { SPLIT_MIDDLE, SPLIT_EQUAL_COUNTS, SPLIT_SAH }

Private Member Functions

BVHBuildNoderecursiveBuild (MemoryArena &buildArena, vector< BVHPrimitiveInfo > &buildData, uint32_t start, uint32_t end, uint32_t *totalNodes, vector< Reference< Primitive > > &orderedPrims)
uint32_t flattenBVHTree (BVHBuildNode *node, uint32_t *offset)

Private Attributes

uint32_t maxPrimsInNode
SplitMethod splitMethod
vector< Reference< Primitive > > primitives
LinearBVHNodenodes

Detailed Description

Definition at line 41 of file bvh.h.


Member Enumeration Documentation

enum BVHAccel::SplitMethod [private]
Enumerator:
SPLIT_MIDDLE 
SPLIT_EQUAL_COUNTS 
SPLIT_SAH 

Definition at line 60 of file bvh.h.


Constructor & Destructor Documentation

BVHAccel::BVHAccel ( const vector< Reference< Primitive > > &  p,
uint32_t  maxPrims = 1,
const string &  sm = "sah" 
)
BVHAccel::~BVHAccel (  ) 

Definition at line 370 of file bvh.cpp.

References FreeAligned(), and nodes.


Member Function Documentation

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

Reimplemented from Primitive.

Definition at line 47 of file bvh.h.

uint32_t BVHAccel::flattenBVHTree ( BVHBuildNode node,
uint32_t *  offset 
) [private]
bool BVHAccel::Intersect ( const Ray ray,
Intersection isect 
) const [virtual]
bool BVHAccel::IntersectP ( const Ray ray  )  const [virtual]
BVHBuildNode * BVHAccel::recursiveBuild ( MemoryArena buildArena,
vector< BVHPrimitiveInfo > &  buildData,
uint32_t  start,
uint32_t  end,
uint32_t *  totalNodes,
vector< Reference< Primitive > > &  orderedPrims 
) [private]
BBox BVHAccel::WorldBound (  )  const [virtual]

Implements Primitive.

Definition at line 197 of file bvh.cpp.

References LinearBVHNode::bounds, and nodes.


Member Data Documentation

uint32_t BVHAccel::maxPrimsInNode [private]

Definition at line 59 of file bvh.h.

Referenced by BVHAccel(), and recursiveBuild().

Definition at line 63 of file bvh.h.

Referenced by BVHAccel(), flattenBVHTree(), Intersect(), IntersectP(), WorldBound(), and ~BVHAccel().

Definition at line 62 of file bvh.h.

Referenced by BVHAccel(), Intersect(), IntersectP(), and recursiveBuild().

Definition at line 61 of file bvh.h.

Referenced by BVHAccel(), and recursiveBuild().


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