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:
authorHans Goudey <h.goudey@me.com>2022-04-01 21:45:02 +0300
committerHans Goudey <h.goudey@me.com>2022-04-01 21:45:02 +0300
commitf688e3cc3130e70e77f0bb050cd71cf1549c765c (patch)
treecb70e8529ac06af6303d8fef5bdf0d294d573a1d /source/blender/blenkernel/intern/rigidbody.c
parent999f6526b1bc049cdccad3c7a8e165ab342f82d9 (diff)
Cleanup: Use const for bounding boxes where possible
Diffstat (limited to 'source/blender/blenkernel/intern/rigidbody.c')
-rw-r--r--source/blender/blenkernel/intern/rigidbody.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index c21b525f628..60cc4ce83af 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -473,7 +473,6 @@ static rbCollisionShape *rigidbody_validate_sim_shape_helper(RigidBodyWorld *rbw
{
RigidBodyOb *rbo = ob->rigidbody_object;
rbCollisionShape *new_shape = NULL;
- BoundBox *bb = NULL;
float size[3] = {1.0f, 1.0f, 1.0f};
float radius = 1.0f;
float height = 1.0f;
@@ -494,7 +493,7 @@ static rbCollisionShape *rigidbody_validate_sim_shape_helper(RigidBodyWorld *rbw
*/
/* XXX: all dimensions are auto-determined now... later can add stored settings for this */
/* get object dimensions without scaling */
- bb = BKE_object_boundbox_get(ob);
+ const BoundBox *bb = BKE_object_boundbox_get(ob);
if (bb) {
size[0] = (bb->vec[4][0] - bb->vec[0][0]);
size[1] = (bb->vec[2][1] - bb->vec[0][1]);
@@ -1678,7 +1677,7 @@ static void rigidbody_update_sim_ob(
if (mesh) {
MVert *mvert = mesh->mvert;
int totvert = mesh->totvert;
- BoundBox *bb = BKE_object_boundbox_get(ob);
+ const BoundBox *bb = BKE_object_boundbox_get(ob);
RB_shape_trimesh_update(rbo->shared->physics_shape,
(float *)mvert,