diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-04-21 17:11:51 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-04-21 17:11:51 +0400 |
commit | 210ee1ade4b4ec5b6f2d3710986171a21a4b8604 (patch) | |
tree | 86e27af39ba932f043da2b73463651ff2e40d41c /source/blender/blenlib/intern/math_geom.c | |
parent | 2e9982f420cab3b2ecf4648c0a91403f757ef9fe (diff) |
whitespace only, no functional change mixed tabs/spaces --> tabs.v2.57a
Diffstat (limited to 'source/blender/blenlib/intern/math_geom.c')
-rw-r--r-- | source/blender/blenlib/intern/math_geom.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c index 744a15f4711..42a9587596e 100644 --- a/source/blender/blenlib/intern/math_geom.c +++ b/source/blender/blenlib/intern/math_geom.c @@ -473,7 +473,7 @@ int isect_line_tri_v3(const float p1[3], const float p2[3], const float v0[3], c cross_v3_v3v3(q, s, e1); - v = f * dot_v3v3(d, q); + v = f * dot_v3v3(d, q); if ((v < 0.0f)||((u + v) > 1.0f)) return 0; *lambda = f * dot_v3v3(e2, q); @@ -519,7 +519,7 @@ int isect_ray_tri_v3(const float p1[3], const float d[3], const float v0[3], con *lambda = f * dot_v3v3(e2, q); if ((*lambda < 0.0f)) return 0; - if(uv) { + if(uv) { uv[0]= u; uv[1]= v; } @@ -529,36 +529,36 @@ int isect_ray_tri_v3(const float p1[3], const float d[3], const float v0[3], con int isect_ray_tri_epsilon_v3(const float p1[3], const float d[3], const float v0[3], const float v1[3], const float v2[3], float *lambda, float uv[2], const float epsilon) { - float p[3], s[3], e1[3], e2[3], q[3]; - float a, f, u, v; + float p[3], s[3], e1[3], e2[3], q[3]; + float a, f, u, v; - sub_v3_v3v3(e1, v1, v0); - sub_v3_v3v3(e2, v2, v0); + sub_v3_v3v3(e1, v1, v0); + sub_v3_v3v3(e2, v2, v0); - cross_v3_v3v3(p, d, e2); - a = dot_v3v3(e1, p); - if (a == 0.0f) return 0; - f = 1.0f/a; + cross_v3_v3v3(p, d, e2); + a = dot_v3v3(e1, p); + if (a == 0.0f) return 0; + f = 1.0f/a; - sub_v3_v3v3(s, p1, v0); + sub_v3_v3v3(s, p1, v0); - u = f * dot_v3v3(s, p); - if ((u < -epsilon)||(u > 1.0f+epsilon)) return 0; + u = f * dot_v3v3(s, p); + if ((u < -epsilon)||(u > 1.0f+epsilon)) return 0; - cross_v3_v3v3(q, s, e1); + cross_v3_v3v3(q, s, e1); - v = f * dot_v3v3(d, q); - if ((v < -epsilon)||((u + v) > 1.0f+epsilon)) return 0; + v = f * dot_v3v3(d, q); + if ((v < -epsilon)||((u + v) > 1.0f+epsilon)) return 0; - *lambda = f * dot_v3v3(e2, q); - if ((*lambda < 0.0f)) return 0; + *lambda = f * dot_v3v3(e2, q); + if ((*lambda < 0.0f)) return 0; - if(uv) { - uv[0]= u; - uv[1]= v; - } + if(uv) { + uv[0]= u; + uv[1]= v; + } - return 1; + return 1; } int isect_ray_tri_threshold_v3(const float p1[3], const float d[3], const float v0[3], const float v1[3], const float v2[3], float *lambda, float *uv, const float threshold) @@ -2604,7 +2604,7 @@ static float ff_quad_form_factor(float *p, float *n, float *q0, float *q1, float aresult = (_mm_set_ps1(n[0])*gx + _mm_set_ps1(n[1])*gy + _mm_set_ps1(n[2])*gz)*angle; /* sum together */ - result= (fresult[0] + fresult[1] + fresult[2] + fresult[3])*(0.5f/(float)M_PI); + result= (fresult[0] + fresult[1] + fresult[2] + fresult[3])*(0.5f/(float)M_PI); result= MAX2(result, 0.0f); return result; |