Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenlib/intern/BLI_kdopbvh.c
| Context not available. | |||||
| /* Helper data and structures to build a min-leaf generalized implicit tree | /* Helper data and structures to build a min-leaf generalized implicit tree | ||||
| * This code can be easily reduced | * This code can be easily reduced | ||||
| * (basicly this is only method to calculate pow(k, n) in O(1).. and stuff like that) */ | * (basically this is only method to calculate pow(k, n) in O(1).. and stuff like that) */ | ||||
| typedef struct BVHBuildHelper { | typedef struct BVHBuildHelper { | ||||
| int tree_type; /* */ | int tree_type; /* */ | ||||
| int totleafs; /* */ | int totleafs; /* */ | ||||
| Context not available. | |||||
| /** | /** | ||||
| * Generalized implicit tree build | * Generalized implicit tree build | ||||
| * | * | ||||
| * An implicit tree is a tree where its structure is implied, thus there is no need to store child pointers or indexs. | * An implicit tree is a tree where its structure is implied, thus there is no need to store child pointers or indexes. | ||||
| * Its possible to find the position of the child or the parent with simple maths (multiplication and adittion). | * Its possible to find the position of the child or the parent with simple maths (multiplication and adittion). | ||||
| * This type of tree is for example used on heaps.. where node N has its childs at indexs N*2 and N*2+1. | * This type of tree is for example used on heaps.. where node N has its childs at indexes N*2 and N*2+1. | ||||
| * | * | ||||
| * Although in this case the tree type is general.. and not know until runtime. | * Although in this case the tree type is general.. and not know until runtime. | ||||
| * tree_type stands for the maximum number of childs that a tree node can have. | * tree_type stands for the maximum number of childs that a tree node can have. | ||||
| Context not available. | |||||
| /** \name BLI_bvhtree_range_query | /** \name BLI_bvhtree_range_query | ||||
| * | * | ||||
| * Allocs and fills an array with the indexs of node that are on the given spherical range (center, radius). | * Allocs and fills an array with the indexes of node that are on the given spherical range (center, radius). | ||||
| * Returns the size of the array. | * Returns the size of the array. | ||||
| * | * | ||||
| * \{ */ | * \{ */ | ||||
| Context not available. | |||||