|
Code_TYMPAN
4.4.0
Industrial site acoustic simulation
|
Node structure (optimized to be stored on 2 bytes) More...
#include <KdtreeAccelerator.h>
Public Member Functions | |
| bool | isLeaf () |
| Return true if the node is a leaf. More... | |
| bool | isNode () |
| Return true if the node is a node. More... | |
| unsigned int | getNbPrimitives () |
| Return primitives number. More... | |
| unsigned int | AboveChild () |
| Return second child. More... | |
| unsigned int * | getPrims () |
| Get the primitives. More... | |
| int | getAxe () |
| Return the axis number of the separator plane (node) More... | |
| float | getAxeValue () |
| Return the axis value of the separator plane (node) More... | |
| unsigned int | getFirstIndex () |
| Return the index of the first node primitive (all) More... | |
| void | createLeaf (unsigned int _nbPrims, unsigned int _firstIndex, unsigned int *_prims) |
| Leaf initialization. More... | |
| void | createNode (int axis, float _split, unsigned int nextChild) |
| Node initialization. More... | |
Private Attributes | |
| union { | |
| int flag | |
| 0 : node, x axis, 1 : node, y axis, 2 : node, z axis, 3 : leaf. 2 bits used More... | |
| unsigned int secondChild | |
| Node : the first child is just after current node, second one is further. More... | |
| unsigned int nbPrims | |
| Leaf : number of primitives. Use 30 bits integer. More... | |
| }; | |
| union { | |
| float split | |
| Node : separator axis value. More... | |
| unsigned int firstIndex | |
| Leaf : index of the first primitive in the list. More... | |
| unsigned int * prims | |
| Leaf : array containing primitives indexes. More... | |
| }; | |
Node structure (optimized to be stored on 2 bytes)
Definition at line 28 of file KdtreeAccelerator.h.
|
inline |
Return second child.
Definition at line 42 of file KdtreeAccelerator.h.

| void KDNode::createLeaf | ( | unsigned int | _nbPrims, |
| unsigned int | _firstIndex, | ||
| unsigned int * | _prims | ||
| ) |
Leaf initialization.
Leaf initialization
| _nbPrims | Number of primitives |
| _firstIndex | First index of the primitive |
| _prims | Array containing the primitives indexes |
Definition at line 29 of file KdtreeAccelerator.cpp.

| void KDNode::createNode | ( | int | axis, |
| float | _split, | ||
| unsigned int | nextChild | ||
| ) |
Node initialization.
Definition at line 43 of file KdtreeAccelerator.cpp.
|
inline |
Return the axis number of the separator plane (node)
Definition at line 50 of file KdtreeAccelerator.h.

|
inline |
Return the axis value of the separator plane (node)
Definition at line 54 of file KdtreeAccelerator.h.

|
inline |
Return the index of the first node primitive (all)
Definition at line 58 of file KdtreeAccelerator.h.

|
inline |
Return primitives number.
Definition at line 38 of file KdtreeAccelerator.h.

|
inline |
Get the primitives.
Definition at line 46 of file KdtreeAccelerator.h.

|
inline |
Return true if the node is a leaf.
Definition at line 30 of file KdtreeAccelerator.h.

|
inline |
Return true if the node is a node.
Definition at line 34 of file KdtreeAccelerator.h.
| union { ... } |
| union { ... } |
| unsigned int kdNode::firstIndex |
Leaf : index of the first primitive in the list.
Definition at line 77 of file KdtreeAccelerator.h.
| int kdNode::flag |
0 : node, x axis, 1 : node, y axis, 2 : node, z axis, 3 : leaf. 2 bits used
Definition at line 68 of file KdtreeAccelerator.h.
| unsigned int kdNode::nbPrims |
Leaf : number of primitives. Use 30 bits integer.
Definition at line 71 of file KdtreeAccelerator.h.
| unsigned int* kdNode::prims |
Leaf : array containing primitives indexes.
Definition at line 78 of file KdtreeAccelerator.h.
| unsigned int kdNode::secondChild |
Node : the first child is just after current node, second one is further.
Definition at line 70 of file KdtreeAccelerator.h.
| float kdNode::split |
Node : separator axis value.
Definition at line 76 of file KdtreeAccelerator.h.