|
Code_TYMPAN
4.4.0
Industrial site acoustic simulation
|
K-d tree Accelerator (based on space splitting) More...
#include <KdtreeAccelerator.h>


Public Member Functions | |
| KdtreeAccelerator (std::vector< Shape * > *_initialMesh=NULL, BBox _globalBox=BBox()) | |
| Constructor. More... | |
| virtual | ~KdtreeAccelerator () |
| Destructor. More... | |
| virtual bool | build () |
| Build this accelerator. More... | |
| virtual decimal | traverse (Ray *r, std::list< Intersection > &result) const |
| Run this accelerator. More... | |
| void | setMaxProfondeur (int _maxProfondeur) |
| Set maximal depth. More... | |
| int | getMaxProfondeur () |
| Get maximal depth. More... | |
| void | setMaxPrimPerLeaf (int _maxPrimPerLeaf) |
| Set maximal primitives per leaf. More... | |
| int | getMaxPrimPerLeaf () |
| Get maximal primitives per leaf. More... | |
| std::vector< BBox > & | getBBox () |
| Get the vector of bounding boxes. More... | |
| void | print () |
| Print the tree (not implemented yet) More... | |
Public Member Functions inherited from Accelerator | |
| Accelerator () | |
| Constructors. More... | |
| Accelerator (std::vector< Shape * > *_shapes, BBox &_globalBox) | |
| Accelerator (const Accelerator &other) | |
| Copy constructor. More... | |
| virtual | ~Accelerator () |
| Destructor. More... | |
| leafTreatment::treatment | getIntersectionChoice () |
| Get/Set the Intersection choice. More... | |
| void | setIntersectionChoice (leafTreatment::treatment _intersectionChoice=leafTreatment::FIRST) |
Public Attributes | |
| bool | alreadyFail |
| Unused attribute. More... | |
| unsigned int | nbFail |
| Unused attribute. More... | |
| Ray | r |
| Unused attribute. More... | |
| bool | trace |
| Unused attribute. More... | |
Protected Member Functions | |
| void | generateMidKdTree (int currentProfondeur, BBox &localBox, unsigned int nbPrims, unsigned int *prims) |
| Generate the tree by middle subdivision. More... | |
| void | generateSAHKdTree (int currentProfondeur, BBox &localBox, TaBRecBoundEdge *edges[3], unsigned int nbPrims, unsigned int *prims) |
| Generate the tree with SAH (Surface Area Heuristic) method. More... | |
Protected Member Functions inherited from Accelerator | |
| void | defineLeafFunction () |
| To define leaf function. More... | |
Protected Attributes | |
| std::vector< Shape * > * | initialMesh |
| Pointer to the mesh. More... | |
| std::vector< InfoPrim > | tablePrimitive |
| List of primitives and their bounding box. More... | |
| std::vector< BBox > | tableBox |
| Bounding boxes list of the tree. More... | |
| std::vector< KDNode > | tableNode |
| int | maxProfondeur |
| Maximal depth. More... | |
| int | maxPrimPerLeaf |
| Maximal primitives per leaf. More... | |
| int | realMaxProfondeur |
| Real max depth. More... | |
| float | isectCost |
| Parameter for best splitting. More... | |
| float | emptyBonus |
| Parameter for best splitting. More... | |
| float | traversalCost |
| Parameter for best splitting. More... | |
Protected Attributes inherited from Accelerator | |
| decimal(* | pLeafTreatmentFunction )(std::list< Intersection > &, decimal) |
| Pointer to the treatment function of leaf. More... | |
| leafTreatment::treatment | intersectionChoice |
| Intersection choice. More... | |
| std::vector< Shape * > * | shapes |
| Vector of pointers to shapes. More... | |
| BBox | globalBox |
| Global bounding box. More... | |
K-d tree Accelerator (based on space splitting)
Definition at line 153 of file KdtreeAccelerator.h.
| KdtreeAccelerator::KdtreeAccelerator | ( | std::vector< Shape * > * | _initialMesh = NULL, |
| BBox | _globalBox = BBox() |
||
| ) |
Constructor.
Definition at line 50 of file KdtreeAccelerator.cpp.
|
virtual |
Destructor.
Definition at line 70 of file KdtreeAccelerator.cpp.
|
virtual |
Build this accelerator.
Reimplemented from Accelerator.
Definition at line 72 of file KdtreeAccelerator.cpp.

|
protected |
Generate the tree by middle subdivision.
Definition at line 106 of file KdtreeAccelerator.cpp.


|
protected |
Generate the tree with SAH (Surface Area Heuristic) method.
Definition at line 320 of file KdtreeAccelerator.cpp.


|
inline |
Get the vector of bounding boxes.
Definition at line 188 of file KdtreeAccelerator.h.
|
inline |
Get maximal primitives per leaf.
Definition at line 183 of file KdtreeAccelerator.h.
|
inline |
Get maximal depth.
Definition at line 172 of file KdtreeAccelerator.h.
| void KdtreeAccelerator::print | ( | ) |
Print the tree (not implemented yet)
Definition at line 301 of file KdtreeAccelerator.cpp.
|
inline |
Set maximal primitives per leaf.
Definition at line 178 of file KdtreeAccelerator.h.
|
inline |
Set maximal depth.
Definition at line 167 of file KdtreeAccelerator.h.
|
virtual |
Run this accelerator.
Reimplemented from Accelerator.
Definition at line 178 of file KdtreeAccelerator.cpp.

| bool KdtreeAccelerator::alreadyFail |
Unused attribute.
Definition at line 195 of file KdtreeAccelerator.h.
|
protected |
Parameter for best splitting.
Definition at line 219 of file KdtreeAccelerator.h.
|
protected |
Pointer to the mesh.
Definition at line 206 of file KdtreeAccelerator.h.
|
protected |
Parameter for best splitting.
Definition at line 218 of file KdtreeAccelerator.h.
|
protected |
Maximal primitives per leaf.
Definition at line 214 of file KdtreeAccelerator.h.
|
protected |
Maximal depth.
Definition at line 213 of file KdtreeAccelerator.h.
| unsigned int KdtreeAccelerator::nbFail |
Unused attribute.
Definition at line 196 of file KdtreeAccelerator.h.
| Ray KdtreeAccelerator::r |
Unused attribute.
Definition at line 197 of file KdtreeAccelerator.h.
|
protected |
Real max depth.
Definition at line 216 of file KdtreeAccelerator.h.
|
protected |
Bounding boxes list of the tree.
Definition at line 210 of file KdtreeAccelerator.h.
|
protected |
Definition at line 211 of file KdtreeAccelerator.h.
|
protected |
List of primitives and their bounding box.
Definition at line 209 of file KdtreeAccelerator.h.
| bool KdtreeAccelerator::trace |
Unused attribute.
Definition at line 198 of file KdtreeAccelerator.h.
|
protected |
Parameter for best splitting.
Definition at line 220 of file KdtreeAccelerator.h.