luxrays::MQBVHAccel Class Reference

#include <mqbvhaccel.h>

Inheritance diagram for luxrays::MQBVHAccel:
luxrays::Accelerator

List of all members.

Public Member Functions

 MQBVHAccel (const Context *context, u_int fst, u_int sf)
 ~MQBVHAccel ()
BBox WorldBound () const
AcceleratorType GetType () const
void Init (const std::deque< Mesh * > &meshes, const unsigned int totalVertexCount, const unsigned int totalTriangleCount)
const TriangleMeshID GetMeshID (const unsigned int index) const
const TriangleMeshIDGetMeshIDTable () const
const TriangleID GetMeshTriangleID (const unsigned int index) const
const TriangleIDGetMeshTriangleIDTable () const
bool Intersect (const Ray *ray, RayHit *hit) const
void Update ()

Private Member Functions

void BuildTree (u_int start, u_int end, u_int *primsIndexes, BBox *primsBboxes, Point *primsCentroids, const BBox &nodeBbox, const BBox &centroidsBbox, int32_t parentIndex, int32_t childIndex, int depth)
void CreateLeaf (int32_t parentIndex, int32_t childIndex, u_int start, const BBox &nodeBbox)
int32_t CreateNode (int32_t parentIndex, int32_t childIndex, const BBox &nodeBbox)

Static Private Member Functions

static bool MeshPtrCompare (Mesh *, Mesh *)

Private Attributes

std::deque< Mesh * > meshList
QBVHNodenodes
u_int nNodes
u_int maxNodes
BBox worldBound
u_int fullSweepThreshold
u_int skipFactor
u_int nLeafs
std::map< Mesh *, QBVHAccel
*, bool(*)(Mesh *, Mesh *)> 
accels
QBVHAccel ** leafs
const Transform ** leafsInvTransform
unsigned int * leafsOffset
TriangleMeshIDmeshIDs
TriangleIDmeshTriangleIDs
const Contextctx
bool initialized

Friends

class OpenCLIntersectionDevice

Detailed Description

Definition at line 37 of file mqbvhaccel.h.


Constructor & Destructor Documentation

MQBVHAccel::MQBVHAccel ( const Context context,
u_int  fst,
u_int  sf 
)

Definition at line 29 of file mqbvhaccel.cpp.

References initialized.

MQBVHAccel::~MQBVHAccel (  ) 

Member Function Documentation

void MQBVHAccel::BuildTree ( u_int  start,
u_int  end,
u_int *  primsIndexes,
BBox primsBboxes,
Point primsCentroids,
const BBox nodeBbox,
const BBox centroidsBbox,
int32_t  parentIndex,
int32_t  childIndex,
int  depth 
) [private]
void MQBVHAccel::CreateLeaf ( int32_t  parentIndex,
int32_t  childIndex,
u_int  start,
const BBox nodeBbox 
) [private]

Definition at line 378 of file mqbvhaccel.cpp.

References luxrays::QBVHNode::InitializeLeaf(), nNodes, nodes, and luxrays::QBVHNode::SetBBox().

Referenced by BuildTree().

int32_t MQBVHAccel::CreateNode ( int32_t  parentIndex,
int32_t  childIndex,
const BBox nodeBbox 
) [private]
const TriangleMeshID luxrays::MQBVHAccel::GetMeshID ( const unsigned int  index  )  const [inline, virtual]

Implements luxrays::Accelerator.

Definition at line 48 of file mqbvhaccel.h.

References meshIDs.

const TriangleMeshID* luxrays::MQBVHAccel::GetMeshIDTable (  )  const [inline, virtual]

Implements luxrays::Accelerator.

Definition at line 49 of file mqbvhaccel.h.

References meshIDs.

const TriangleID luxrays::MQBVHAccel::GetMeshTriangleID ( const unsigned int  index  )  const [inline, virtual]

Implements luxrays::Accelerator.

Definition at line 50 of file mqbvhaccel.h.

References meshTriangleIDs.

const TriangleID* luxrays::MQBVHAccel::GetMeshTriangleIDTable (  )  const [inline, virtual]

Implements luxrays::Accelerator.

Definition at line 51 of file mqbvhaccel.h.

References meshTriangleIDs.

AcceleratorType luxrays::MQBVHAccel::GetType (  )  const [inline, virtual]

Implements luxrays::Accelerator.

Definition at line 44 of file mqbvhaccel.h.

References luxrays::ACCEL_QBVH.

Referenced by Init().

void MQBVHAccel::Init ( const std::deque< Mesh * > &  meshes,
const unsigned int  totalVertexCount,
const unsigned int  totalTriangleCount 
) [virtual]
bool MQBVHAccel::Intersect ( const Ray ray,
RayHit hit 
) const [virtual]
bool MQBVHAccel::MeshPtrCompare ( Mesh p0,
Mesh p1 
) [static, private]

Definition at line 50 of file mqbvhaccel.cpp.

void MQBVHAccel::Update (  ) 
BBox luxrays::MQBVHAccel::WorldBound (  )  const

Friends And Related Function Documentation

friend class OpenCLIntersectionDevice [friend]

Definition at line 57 of file mqbvhaccel.h.


Member Data Documentation

std::map<Mesh *, QBVHAccel *, bool (*)(Mesh *, Mesh *)> luxrays::MQBVHAccel::accels [private]

Definition at line 82 of file mqbvhaccel.h.

Referenced by Init(), luxrays::OpenCLIntersectionDevice::SetDataSet(), and ~MQBVHAccel().

Definition at line 89 of file mqbvhaccel.h.

Referenced by Init(), and Update().

Definition at line 78 of file mqbvhaccel.h.

Referenced by BuildTree().

Definition at line 90 of file mqbvhaccel.h.

Referenced by Init(), MQBVHAccel(), and ~MQBVHAccel().

unsigned int* luxrays::MQBVHAccel::leafsOffset [private]

Definition at line 75 of file mqbvhaccel.h.

Referenced by CreateNode(), Init(), and Update().

Definition at line 86 of file mqbvhaccel.h.

Referenced by GetMeshID(), GetMeshIDTable(), Init(), and ~MQBVHAccel().

std::deque<Mesh *> luxrays::MQBVHAccel::meshList [private]

Definition at line 72 of file mqbvhaccel.h.

Referenced by Init(), and Update().

Definition at line 87 of file mqbvhaccel.h.

Referenced by GetMeshTriangleID(), GetMeshTriangleIDTable(), Init(), and ~MQBVHAccel().

u_int luxrays::MQBVHAccel::nLeafs [private]
u_int luxrays::MQBVHAccel::nNodes [private]

Definition at line 79 of file mqbvhaccel.h.

Referenced by BuildTree().

Definition at line 76 of file mqbvhaccel.h.

Referenced by Update().


The documentation for this class was generated from the following files:
Generated on Sat Aug 21 14:06:20 2010 for LuxRays by  doxygen 1.6.3