Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-03-19 16:46:33 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-19 16:48:51 +0300
commit109cbdf2e1b609e93270100239906a8e17c64ab5 (patch)
tree821504319da91e5a5dea1ebaf64978560468288e /source/blender/blenkernel/intern/boids.c
parente8777a729013d04dcb854b0b9f327e9b90191747 (diff)
Cleanup: use BLI_kdtree_3d prefix
Use prefix now there isn't only the 3d version.
Diffstat (limited to 'source/blender/blenkernel/intern/boids.c')
-rw-r--r--source/blender/blenkernel/intern/boids.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c
index 8b71aa0fb69..c092b2c7e79 100644
--- a/source/blender/blenkernel/intern/boids.c
+++ b/source/blender/blenkernel/intern/boids.c
@@ -206,7 +206,7 @@ static int rule_avoid_collision(BoidRule *rule, BoidBrainData *bbd, BoidValues *
{
const int raycast_flag = BVH_RAYCAST_DEFAULT & ~(BVH_RAYCAST_WATERTIGHT);
BoidRuleAvoidCollision *acbr = (BoidRuleAvoidCollision*) rule;
- KDTreeNearest *ptn = NULL;
+ KDTreeNearest_3d *ptn = NULL;
ParticleTarget *pt;
BoidParticle *bpa = pa->boid;
ColliderCache *coll;
@@ -274,7 +274,7 @@ static int rule_avoid_collision(BoidRule *rule, BoidBrainData *bbd, BoidValues *
//check boids in own system
if (acbr->options & BRULE_ACOLL_WITH_BOIDS) {
- neighbors = BLI_kdtree_range_search_with_len_squared_cb(
+ neighbors = BLI_kdtree_3d_range_search_with_len_squared_cb(
bbd->sim->psys->tree, pa->prev_state.co, &ptn, acbr->look_ahead * len_v3(pa->prev_state.vel),
len_squared_v3v3_with_normal_bias, pa->prev_state.ave);
if (neighbors > 1) for (n=1; n<neighbors; n++) {
@@ -323,7 +323,7 @@ static int rule_avoid_collision(BoidRule *rule, BoidBrainData *bbd, BoidValues *
if (epsys) {
BLI_assert(epsys->tree != NULL);
- neighbors = BLI_kdtree_range_search_with_len_squared_cb(
+ neighbors = BLI_kdtree_3d_range_search_with_len_squared_cb(
epsys->tree, pa->prev_state.co, &ptn, acbr->look_ahead * len_v3(pa->prev_state.vel),
len_squared_v3v3_with_normal_bias, pa->prev_state.ave);
@@ -377,11 +377,11 @@ static int rule_avoid_collision(BoidRule *rule, BoidBrainData *bbd, BoidValues *
}
static int rule_separate(BoidRule *UNUSED(rule), BoidBrainData *bbd, BoidValues *val, ParticleData *pa)
{
- KDTreeNearest *ptn = NULL;
+ KDTreeNearest_3d *ptn = NULL;
ParticleTarget *pt;
float len = 2.0f * val->personal_space * pa->size + 1.0f;
float vec[3] = {0.0f, 0.0f, 0.0f};
- int neighbors = BLI_kdtree_range_search(
+ int neighbors = BLI_kdtree_3d_range_search(
bbd->sim->psys->tree, pa->prev_state.co,
&ptn, 2.0f * val->personal_space * pa->size);
int ret = 0;
@@ -401,7 +401,7 @@ static int rule_separate(BoidRule *UNUSED(rule), BoidBrainData *bbd, BoidValues
ParticleSystem *epsys = psys_get_target_system(bbd->sim->ob, pt);
if (epsys) {
- neighbors = BLI_kdtree_range_search(
+ neighbors = BLI_kdtree_3d_range_search(
epsys->tree, pa->prev_state.co,
&ptn, 2.0f * val->personal_space * pa->size);
@@ -421,9 +421,9 @@ static int rule_separate(BoidRule *UNUSED(rule), BoidBrainData *bbd, BoidValues
}
static int rule_flock(BoidRule *UNUSED(rule), BoidBrainData *bbd, BoidValues *UNUSED(val), ParticleData *pa)
{
- KDTreeNearest ptn[11];
+ KDTreeNearest_3d ptn[11];
float vec[3] = {0.0f, 0.0f, 0.0f}, loc[3] = {0.0f, 0.0f, 0.0f};
- int neighbors = BLI_kdtree_find_nearest_n_with_len_squared_cb(
+ int neighbors = BLI_kdtree_3d_find_nearest_n_with_len_squared_cb(
bbd->sim->psys->tree, pa->state.co, ptn, ARRAY_SIZE(ptn),
len_squared_v3v3_with_normal_bias, pa->prev_state.ave);
int n;
@@ -639,7 +639,7 @@ static int rule_average_speed(BoidRule *rule, BoidBrainData *bbd, BoidValues *va
static int rule_fight(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, ParticleData *pa)
{
BoidRuleFight *fbr = (BoidRuleFight*)rule;
- KDTreeNearest *ptn = NULL;
+ KDTreeNearest_3d *ptn = NULL;
ParticleTarget *pt;
ParticleData *epars;
ParticleData *enemy_pa = NULL;
@@ -652,7 +652,7 @@ static int rule_fight(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, Parti
int n, ret = 0;
/* calculate own group strength */
- int neighbors = BLI_kdtree_range_search(
+ int neighbors = BLI_kdtree_3d_range_search(
bbd->sim->psys->tree, pa->prev_state.co,
&ptn, fbr->distance);
for (n=0; n<neighbors; n++) {
@@ -670,7 +670,7 @@ static int rule_fight(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, Parti
if (epsys) {
epars = epsys->particles;
- neighbors = BLI_kdtree_range_search(
+ neighbors = BLI_kdtree_3d_range_search(
epsys->tree, pa->prev_state.co,
&ptn, fbr->distance);