Cleanup: Add r_ prefix for ED_view3d_global_to_vector

Pull Request: https://projects.blender.org/blender/blender/pulls/126666
This commit is contained in:
Sean Kim
2024-08-22 23:23:50 +02:00
committed by Sean Kim
parent 49409bdc89
commit c394aa9cea
2 changed files with 6 additions and 6 deletions

View File

@@ -614,9 +614,9 @@ void ED_view3d_win_to_ray(const ARegion *region,
* In orthographic view the resulting vector will match the view vector.
* \param rv3d: The region (used for the window width and height).
* \param coord: The world-space location.
* \param vec: The resulting normalized vector.
* \param r_out: The resulting normalized vector.
*/
void ED_view3d_global_to_vector(const RegionView3D *rv3d, const float coord[3], float vec[3]);
void ED_view3d_global_to_vector(const RegionView3D *rv3d, const float coord[3], float r_out[3]);
/**
* Calculate a 3d location from 2d window coordinates.
* \param region: The region (used for the window width and height).

View File

@@ -421,7 +421,7 @@ void ED_view3d_win_to_ray(const ARegion *region,
ED_view3d_win_to_vector(region, mval, r_ray_normal);
}
void ED_view3d_global_to_vector(const RegionView3D *rv3d, const float coord[3], float vec[3])
void ED_view3d_global_to_vector(const RegionView3D *rv3d, const float coord[3], float r_out[3])
{
if (rv3d->is_persp) {
float p1[4], p2[4];
@@ -436,12 +436,12 @@ void ED_view3d_global_to_vector(const RegionView3D *rv3d, const float coord[3],
mul_m4_v4(rv3d->viewinv, p2);
sub_v3_v3v3(vec, p1, p2);
sub_v3_v3v3(r_out, p1, p2);
}
else {
copy_v3_v3(vec, rv3d->viewinv[2]);
copy_v3_v3(r_out, rv3d->viewinv[2]);
}
normalize_v3(vec);
normalize_v3(r_out);
}
/* very similar to ED_view3d_win_to_3d() but has no advantage, de-duplicating */