diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-09-14 13:51:04 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-09-14 13:53:52 +0300 |
commit | 34843a855e6b45cffbc0cd0ffae2d688e6ee1168 (patch) | |
tree | 1a90816443ce788ef67ae994d33b0a7d3dfb5096 /source/blender/blenkernel/BKE_object.h | |
parent | 2db71782e750313fc2c7d0a420e0fab6e06e38d4 (diff) |
Fix T46099: snapping failed on objects with some NULL-dimension in their bbox.
Added a helper that ensures a bbox has some non-NULL dimension along all its axes.
Also, fixed some (rather unlikely) NULL dereference cases (though it should not in this context,
`BKE_object_boundbox_get()` can return NULL).
Diffstat (limited to 'source/blender/blenkernel/BKE_object.h')
-rw-r--r-- | source/blender/blenkernel/BKE_object.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h index 15ebfb54f41..6c5081d1ea9 100644 --- a/source/blender/blenkernel/BKE_object.h +++ b/source/blender/blenkernel/BKE_object.h @@ -143,6 +143,8 @@ bool BKE_boundbox_ray_hit_check( void BKE_boundbox_calc_center_aabb(const struct BoundBox *bb, float r_cent[3]); void BKE_boundbox_calc_size_aabb(const struct BoundBox *bb, float r_size[3]); void BKE_boundbox_minmax(const struct BoundBox *bb, float obmat[4][4], float r_min[3], float r_max[3]); +struct BoundBox *BKE_boundbox_ensure_minimum_dimensions( + struct BoundBox *bb, struct BoundBox *bb_temp, const float epsilon); struct BoundBox *BKE_object_boundbox_get(struct Object *ob); void BKE_object_dimensions_get(struct Object *ob, float vec[3]); |