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:
authorBastien Montagne <montagne29@wanadoo.fr>2014-01-29 23:10:03 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-01-29 23:10:03 +0400
commit77089a3bf20319be87a434750656206449c04dbc (patch)
tree83b7fd34ce9ea4a6fcec20e48dd293a65597fe85 /source/blender/blenkernel/BKE_object.h
parent95e153a319b48a3a8d4fcb013b7be24fe1f07af3 (diff)
Fix T38358: Face snapping fails on Orthographic view
Issue is caused by start point of ray used to detect faces under the mouse is set rather far away in ortho 3dviews. The loss of precision on the ray location induced by this can lead to face snapping failures. Solution is to do the raycasting with a temp start point, much closer to the object we check, and add back to the found distance the diff to the real start point once detection is done (as we need all hit distances from all tested objects to be relative to a common point!). Note this commit only addresses the "face snapping on mesh" case, other kind of snapping do not seem to suffer from this issue. Reviewers: brecht, campbellbarton Differential Revision: https://developer.blender.org/D268
Diffstat (limited to 'source/blender/blenkernel/BKE_object.h')
-rw-r--r--source/blender/blenkernel/BKE_object.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h
index 33c9583db8b..38055dd1ec5 100644
--- a/source/blender/blenkernel/BKE_object.h
+++ b/source/blender/blenkernel/BKE_object.h
@@ -124,7 +124,8 @@ void BKE_object_where_is_calc_mat4(struct Scene *scene, struct Object *ob, float
/* possibly belong in own moduke? */
struct BoundBox *BKE_boundbox_alloc_unit(void);
void BKE_boundbox_init_from_minmax(struct BoundBox *bb, const float min[3], const float max[3]);
-bool BKE_boundbox_ray_hit_check(struct BoundBox *bb, const float ray_start[3], const float ray_normal[3]);
+bool BKE_boundbox_ray_hit_check(struct BoundBox *bb, const float ray_start[3], const float ray_normal[3],
+ float *r_lambda);
struct BoundBox *BKE_object_boundbox_get(struct Object *ob);
void BKE_object_dimensions_get(struct Object *ob, float vec[3]);