diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-14 09:37:43 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-14 09:37:43 +0400 |
commit | ba283d6c9be1d678210e08233916268f48ef4ee1 (patch) | |
tree | 979ed657034ae3e6df69b4e428fe2694ccee867e /source/blender/editors/include/ED_transform.h | |
parent | d2b14ed4f007d7eb1160b67c6b3722cec52df375 (diff) |
modify snapObjectsRayEx() to use a pointer to 'ray_dist' rather then passing the dist, this is to better support multiple calls to ray-cast where only closer distances are accepted.
Diffstat (limited to 'source/blender/editors/include/ED_transform.h')
-rw-r--r-- | source/blender/editors/include/ED_transform.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h index 824d1db432f..f674f70ebee 100644 --- a/source/blender/editors/include/ED_transform.h +++ b/source/blender/editors/include/ED_transform.h @@ -178,6 +178,7 @@ typedef enum SnapMode { } SnapMode; #define SNAP_MIN_DISTANCE 30 +#define TRANSFORM_DIST_MAX_RAY (FLT_MAX / 2.0f) bool peelObjectsTransForm(struct TransInfo *t, struct ListBase *depth_peels, const float mval[2], SnapMode mode); bool peelObjectsContext(struct bContext *C, struct ListBase *depth_peels, const float mval[2], SnapMode mode); @@ -187,7 +188,7 @@ bool snapObjectsContext(struct bContext *C, const float mval[2], float *r_dist_p bool snapObjectsEx(struct Scene *scene, struct Base *base_act, struct View3D *v3d, struct ARegion *ar, struct Object *obedit, short snap_mode, const float mval[2], float *r_dist_px, float r_loc[3], float r_no[3], SnapMode mode); bool snapObjectsRayEx(struct Scene *scene, struct Base *base_act, struct View3D *v3d, struct ARegion *ar, struct Object *obedit, short snap_mode, - const float ray_start[3], const float ray_normal[3], const float ray_dist, + const float ray_start[3], const float ray_normal[3], float *r_ray_dist, const float mval[2], float *r_dist_px, float r_loc[3], float r_no[3], SnapMode mode); bool snapNodesTransform(struct TransInfo *t, const int mval[2], float *r_dist_px, float r_loc[2], char *r_node_border, SnapMode mode); |