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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-06-01 12:02:54 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-06-01 13:00:11 +0300
commit719e782f2c790aab7a822ad9e01a4fa8c93b5620 (patch)
tree51533c39b8438b45be8b885b3a0562fa5674d6d9 /source/blender/blenlib
parentbcbee4b9a3537cce072509a3ec94d309eb1568cc (diff)
Modifiers: tiny optimizations for mesh deform, lattice, kdop.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/intern/BLI_kdopbvh.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c
index b3adf3106c1..c6daae97688 100644
--- a/source/blender/blenlib/intern/BLI_kdopbvh.c
+++ b/source/blender/blenlib/intern/BLI_kdopbvh.c
@@ -513,25 +513,27 @@ static void create_kdop_hull(const BVHTree *tree, BVHNode *node, const float *co
}
/**
- * \note depends on the fact that the BVH's for each face is already build
+ * \note depends on the fact that the BVH's for each face is already built
*/
static void refit_kdop_hull(const BVHTree *tree, BVHNode *node, int start, int end)
{
float newmin, newmax;
- float *bv = node->bv;
+ float *__restrict bv = node->bv;
int j;
axis_t axis_iter;
node_minmax_init(tree, node);
for (j = start; j < end; j++) {
+ float *__restrict node_bv = tree->nodes[j]->bv;
+
/* for all Axes. */
for (axis_iter = tree->start_axis; axis_iter < tree->stop_axis; axis_iter++) {
- newmin = tree->nodes[j]->bv[(2 * axis_iter)];
+ newmin = node_bv[(2 * axis_iter)];
if ((newmin < bv[(2 * axis_iter)]))
bv[(2 * axis_iter)] = newmin;
- newmax = tree->nodes[j]->bv[(2 * axis_iter) + 1];
+ newmax = node_bv[(2 * axis_iter) + 1];
if ((newmax > bv[(2 * axis_iter) + 1]))
bv[(2 * axis_iter) + 1] = newmax;
}