summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2018-10-31 00:58:04 -0700
committerVito Caputo <vcaputo@pengaru.com>2018-10-31 19:09:31 -0700
commitbed74304b6a31d190032c01341f76733464b8ff7 (patch)
tree9db1a654ad8bd3ef8e84d0b1d383fb66913e0e15
parentd25ab83c081e71af38884cfd8b0998732607422c (diff)
libix3: trivial whitespace fixups
-rw-r--r--src/ix3.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/ix3.c b/src/ix3.c
index 320c123..26a65b6 100644
--- a/src/ix3.c
+++ b/src/ix3.c
@@ -182,12 +182,12 @@ static void init_octrants(bb3f_t *octrants, bb3f_t *parent_aabb, v3f_t *octrants
/*
+-+-+\
- |0|1|-+-+
- +-+-+4|5|
- |2|3|-+-+
- +-+-+6|7|
- \-+-+
-*/
+ |0|1|-+-+
+ +-+-+4|5|
+ |2|3|-+-+
+ +-+-+6|7|
+ \-+-+
+*/
octrants[0].min.x = parent_aabb->min.x;
octrants[0].min.y = octrants_center->y;
octrants[0].min.z = octrants_center->z;
@@ -435,12 +435,10 @@ static ix3_object_t * add_object(ix3_t *ix3, unsigned *depth, ix3_node_t *node,
return object;
}
-
/* Node is a leaf, optimistically link the object to the node */
if (!link_object(object, node, reference_cache))
goto _fail;
-
/* If the node is overflowing, split it */
if (node->n_objects > ix3->max_per_node && *depth < ix3->max_depth) {
*depth++;
@@ -641,7 +639,6 @@ unsigned ix3_search_by_point(ix3_t *ix3, v3f_t *point, ix3_search_cb cb, void *c
n_hits++;
}
-
return n_hits;
}
@@ -671,12 +668,11 @@ static void search_node_by_aabb(ix3_node_t *node, bb3f_t *node_aabb, v3f_t *sear
return;
}
-
list_for_each_entry_safe(ref, _ref, &node->objects, objects) {
if (!aabb_overlap(&ref->object->position, &ref->object->origin, &ref->object->aabb, search_position, search_origin, search_aabb))
continue;
- list_move_tail(&ref->object->hits, hits);
+ list_move_tail(&ref->object->hits, hits);
}
}
© All Rights Reserved