Cleanup: renaming missed from merge

This commit is contained in:
Campbell Barton 2018-09-20 12:04:18 +10:00
parent 65fb2ebb3c
commit 1a2e41a0f2
12 changed files with 25 additions and 23 deletions

View File

@ -204,7 +204,7 @@ static bool stroke_elem_project(
if (cdd->project.use_plane) {
/* get the view vector to 'location' */
float ray_origin[3], ray_direction[3];
ED_view3d_win_to_ray(cdd->depsgraph, cdd->vc.ar, v3d, mval_fl, ray_origin, ray_direction, false);
ED_view3d_win_to_ray_clipped(cdd->depsgraph, cdd->vc.ar, v3d, mval_fl, ray_origin, ray_direction, false);
float lambda;
if (isect_ray_plane_v3(ray_origin, ray_direction, cdd->project.plane, &lambda, true)) {

View File

@ -195,7 +195,7 @@ bool gizmo_window_project_2d(
float ray_origin[3], ray_direction[3];
if (ED_view3d_win_to_ray(CTX_data_depsgraph(C), ar, v3d, mval, ray_origin, ray_direction, false)) {
if (ED_view3d_win_to_ray_clipped(CTX_data_depsgraph(C), ar, v3d, mval, ray_origin, ray_direction, false)) {
float lambda;
if (isect_ray_plane_v3(ray_origin, ray_direction, plane, &lambda, true)) {
float co[3];

View File

@ -264,7 +264,7 @@ static int gizmo_arrow_modal(
int ok = 0;
for (int j = 0; j < 2; j++) {
if (ED_view3d_win_to_ray(
if (ED_view3d_win_to_ray_clipped(
CTX_data_depsgraph(C),
ar, v3d, proj[j].mval,
proj[j].ray_origin, proj[j].ray_direction, false))

View File

@ -252,11 +252,11 @@ float ED_view3d_pixel_size_no_ui_scale(const struct RegionView3D *rv3d, const fl
float ED_view3d_calc_zfac(const struct RegionView3D *rv3d, const float co[3], bool *r_flip);
bool ED_view3d_clip_segment(const struct RegionView3D *rv3d, float ray_start[3], float ray_end[3]);
bool ED_view3d_win_to_ray(
bool ED_view3d_win_to_ray_clipped(
struct Depsgraph *depsgraph,
const struct ARegion *ar, const struct View3D *v3d, const float mval[2],
float ray_start[3], float ray_normal[3], const bool do_clip);
bool ED_view3d_win_to_ray_ex(
bool ED_view3d_win_to_ray_clipped_ex(
struct Depsgraph *depsgraph,
const struct ARegion *ar, const struct View3D *v3d, const float mval[2],
float r_ray_co[3], float r_ray_normal[3], float r_ray_start[3], bool do_clip);
@ -280,9 +280,10 @@ bool ED_view3d_win_to_3d_on_plane_int(
void ED_view3d_win_to_delta(const struct ARegion *ar, const float mval[2], float out[3], const float zfac);
void ED_view3d_win_to_origin(const struct ARegion *ar, const float mval[2], float out[3]);
void ED_view3d_win_to_vector(const struct ARegion *ar, const float mval[2], float out[3]);
bool ED_view3d_win_to_segment(struct Depsgraph *depsgraph,
const struct ARegion *ar, struct View3D *v3d, const float mval[2],
float r_ray_start[3], float r_ray_end[3], const bool do_clip);
bool ED_view3d_win_to_segment_clipped(
struct Depsgraph *depsgraph,
const struct ARegion *ar, struct View3D *v3d, const float mval[2],
float r_ray_start[3], float r_ray_end[3], const bool do_clip);
void ED_view3d_ob_project_mat_get(const struct RegionView3D *v3d, struct Object *ob, float pmat[4][4]);
void ED_view3d_ob_project_mat_get_from_obmat(const struct RegionView3D *rv3d, float obmat[4][4], float pmat[4][4]);

View File

@ -100,7 +100,7 @@ static void calc_initial_placement_point_from_view(
if (use_mouse_project) {
float ray_co[3], ray_no[3];
if (ED_view3d_win_to_ray(
if (ED_view3d_win_to_ray_clipped(
CTX_data_depsgraph(C),
ar, v3d, mval,
ray_co, ray_no, false))

View File

@ -1572,8 +1572,8 @@ static void knife_find_line_hits(KnifeTool_OpData *kcd)
}
/* unproject screen line */
ED_view3d_win_to_segment(kcd->vc.depsgraph, kcd->ar, kcd->vc.v3d, s1, v1, v3, true);
ED_view3d_win_to_segment(kcd->vc.depsgraph, kcd->ar, kcd->vc.v3d, s2, v2, v4, true);
ED_view3d_win_to_segment_clipped(kcd->vc.depsgraph, kcd->ar, kcd->vc.v3d, s1, v1, v3, true);
ED_view3d_win_to_segment_clipped(kcd->vc.depsgraph, kcd->ar, kcd->vc.v3d, s2, v2, v4, true);
mul_m4_v3(kcd->ob->imat, v1);
mul_m4_v3(kcd->ob->imat, v2);

View File

@ -1118,7 +1118,7 @@ bool EDBM_unified_findnearest_from_raycast(
BMElem *ele;
} best = {0, NULL};
if (ED_view3d_win_to_ray(
if (ED_view3d_win_to_ray_clipped(
vc->depsgraph,
vc->ar, vc->v3d, mval_fl,
ray_origin, ray_direction, true))

View File

@ -1502,7 +1502,7 @@ bool BMBVH_EdgeVisible(struct BMBVHTree *tree, BMEdge *e,
ar->winy / 2.0f,
};
ED_view3d_win_to_segment(depsgraph, ar, v3d, mval_f, origin, end, false);
ED_view3d_win_to_segment_clipped(depsgraph, ar, v3d, mval_f, origin, end, false);
invert_m4_m4(invmat, obedit->obmat);
mul_m4_v3(invmat, origin);

View File

@ -3751,7 +3751,7 @@ static void brush_add_count_iter(
mco[1] = data->mval[1] + dmy;
float co1[3], co2[3];
ED_view3d_win_to_segment(depsgraph, data->vc.ar, data->vc.v3d, mco, co1, co2, true);
ED_view3d_win_to_segment_clipped(depsgraph, data->vc.ar, data->vc.v3d, mco, co1, co2, true);
mul_m4_v3(iter_data->imat, co1);
mul_m4_v3(iter_data->imat, co2);

View File

@ -4697,7 +4697,7 @@ static float sculpt_raycast_init(
RegionView3D *rv3d = vc->ar->regiondata;
/* TODO: what if the segment is totally clipped? (return == 0) */
ED_view3d_win_to_segment(vc->depsgraph, vc->ar, vc->v3d, mouse, ray_start, ray_end, true);
ED_view3d_win_to_segment_clipped(vc->depsgraph, vc->ar, vc->v3d, mouse, ray_start, ray_end, true);
invert_m4_m4(obimat, ob->obmat);
mul_m4_v3(obimat, ray_start);

View File

@ -370,7 +370,7 @@ bool ED_view3d_clip_segment(const RegionView3D *rv3d, float ray_start[3], float
* \param do_clip_planes Optionally clip the start of the ray by the view clipping planes.
* \return success, false if the ray is totally clipped.
*/
bool ED_view3d_win_to_ray_ex(
bool ED_view3d_win_to_ray_clipped_ex(
struct Depsgraph *depsgraph,
const ARegion *ar, const View3D *v3d, const float mval[2],
float r_ray_co[3], float r_ray_normal[3], float r_ray_start[3], bool do_clip_planes)
@ -400,12 +400,12 @@ bool ED_view3d_win_to_ray_ex(
* \param do_clip_planes Optionally clip the start of the ray by the view clipping planes.
* \return success, false if the ray is totally clipped.
*/
bool ED_view3d_win_to_ray(
bool ED_view3d_win_to_ray_clipped(
struct Depsgraph *depsgraph,
const ARegion *ar, const View3D *v3d, const float mval[2],
float r_ray_start[3], float r_ray_normal[3], const bool do_clip_planes)
{
return ED_view3d_win_to_ray_ex(depsgraph, ar, v3d, mval, NULL, r_ray_normal, r_ray_start, do_clip_planes);
return ED_view3d_win_to_ray_clipped_ex(depsgraph, ar, v3d, mval, NULL, r_ray_normal, r_ray_start, do_clip_planes);
}
/**
@ -660,9 +660,10 @@ void ED_view3d_win_to_vector(const ARegion *ar, const float mval[2], float out[3
* \param do_clip_planes Optionally clip the ray by the view clipping planes.
* \return success, false if the segment is totally clipped.
*/
bool ED_view3d_win_to_segment(struct Depsgraph *depsgraph,
const ARegion *ar, View3D *v3d, const float mval[2],
float r_ray_start[3], float r_ray_end[3], const bool do_clip_planes)
bool ED_view3d_win_to_segment_clipped(
struct Depsgraph *depsgraph,
const ARegion *ar, View3D *v3d, const float mval[2],
float r_ray_start[3], float r_ray_end[3], const bool do_clip_planes)
{
view3d_win_to_ray_segment(depsgraph, ar, v3d, mval, NULL, NULL, r_ray_start, r_ray_end);

View File

@ -2606,7 +2606,7 @@ static short transform_snap_context_project_view3d_mixed_impl(
if (snap_to_flag & SCE_SNAP_MODE_FACE || use_occlusion_test) {
float ray_start[3], ray_normal[3];
if (!ED_view3d_win_to_ray_ex(
if (!ED_view3d_win_to_ray_clipped_ex(
sctx->depsgraph,
sctx->v3d_data.ar, sctx->v3d_data.v3d,
mval, NULL, ray_normal, ray_start, true))
@ -2770,7 +2770,7 @@ bool ED_transform_snap_object_project_all_view3d_ex(
{
float ray_start[3], ray_normal[3];
if (!ED_view3d_win_to_ray_ex(
if (!ED_view3d_win_to_ray_clipped_ex(
sctx->depsgraph,
sctx->v3d_data.ar, sctx->v3d_data.v3d,
mval, NULL, ray_normal, ray_start, true))