diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-08-23 16:56:10 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-08-23 16:56:10 +0300 |
commit | eb5cd578b8cb9839b4b1fb8b6e9f56bbaad7bfae (patch) | |
tree | dcd1ba08664b4b3342d7c76efe60f01b9c38be6f /source/blender/render | |
parent | a853367fbf2981458bfbae2f2df8ce7dc7499746 (diff) |
Cleanup: Output argument name and const qualifier
Diffstat (limited to 'source/blender/render')
-rw-r--r-- | source/blender/render/intern/raytrace/rayobject.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/source/blender/render/intern/raytrace/rayobject.cpp b/source/blender/render/intern/raytrace/rayobject.cpp index 3415e5268de..c16ef5500df 100644 --- a/source/blender/render/intern/raytrace/rayobject.cpp +++ b/source/blender/render/intern/raytrace/rayobject.cpp @@ -200,16 +200,19 @@ static bool isect_ray_tri_watertight_no_sign_check_v3( } } -MALWAYS_INLINE int isec_tri_quad(float start[3], const struct IsectRayPrecalc *isect_precalc, RayFace *face, float r_uv[2], float *lambda) +MALWAYS_INLINE int isec_tri_quad(const float start[3], + const struct IsectRayPrecalc *isect_precalc, + const RayFace *face, + float r_uv[2], float *r_lambda) { float uv[2], l; if (isect_ray_tri_watertight_v3(start, isect_precalc, face->v1, face->v2, face->v3, &l, uv)) { /* check if intersection is within ray length */ - if (l > -RE_RAYTRACE_EPSILON && l < *lambda) { + if (l > -RE_RAYTRACE_EPSILON && l < *r_lambda) { r_uv[0] = -uv[0]; r_uv[1] = -uv[1]; - *lambda = l; + *r_lambda = l; return 1; } } @@ -218,10 +221,10 @@ MALWAYS_INLINE int isec_tri_quad(float start[3], const struct IsectRayPrecalc *i if (RE_rayface_isQuad(face)) { if (isect_ray_tri_watertight_v3(start, isect_precalc, face->v1, face->v3, face->v4, &l, uv)) { /* check if intersection is within ray length */ - if (l > -RE_RAYTRACE_EPSILON && l < *lambda) { + if (l > -RE_RAYTRACE_EPSILON && l < *r_lambda) { r_uv[0] = -uv[0]; r_uv[1] = -uv[1]; - *lambda = l; + *r_lambda = l; return 2; } } @@ -232,13 +235,14 @@ MALWAYS_INLINE int isec_tri_quad(float start[3], const struct IsectRayPrecalc *i /* Simpler yes/no Ray Triangle/Quad Intersection */ -MALWAYS_INLINE int isec_tri_quad_neighbour(float start[3], float dir[3], RayFace *face) +MALWAYS_INLINE int isec_tri_quad_neighbour(const float start[3], + const float dir[3], + const RayFace *face) { float r[3]; struct IsectRayPrecalc isect_precalc; float uv[2], l; - negate_v3_v3(r, dir); /* note, different than above function */ isect_ray_tri_watertight_v3_precalc(&isect_precalc, r); |