Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Genrich <daniel.genrich@gmx.net>2009-01-28 03:43:46 +0300
committerDaniel Genrich <daniel.genrich@gmx.net>2009-01-28 03:43:46 +0300
commit561a9b3d4c20458c6d62de9f7f58a3725d3b0fd4 (patch)
tree0c404081ea6bc1899571693e7943bd872d9992b6 /source/blender/blenlib/intern/arithb.c
parent1ed26fffb88ffcf70aa62c65964cc98348712b9d (diff)
parent7eae2080f23446054d0a7a3f30f8dd6c4969d1fa (diff)
svn merge -r 17502:18705 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Diffstat (limited to 'source/blender/blenlib/intern/arithb.c')
-rw-r--r--source/blender/blenlib/intern/arithb.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/arithb.c b/source/blender/blenlib/intern/arithb.c
index 5cfee8bf784..96016eda1fa 100644
--- a/source/blender/blenlib/intern/arithb.c
+++ b/source/blender/blenlib/intern/arithb.c
@@ -2190,6 +2190,13 @@ void VecMulf(float *v1, float f)
v1[2]*= f;
}
+void VecNegf(float *v1)
+{
+ v1[0] = -v1[0];
+ v1[1] = -v1[1];
+ v1[2] = -v1[2];
+}
+
void VecOrthoBasisf(float *v, float *v1, float *v2)
{
float f = sqrt(v[0]*v[0] + v[1]*v[1]);
@@ -3958,7 +3965,7 @@ int SweepingSphereIntersectsTriangleUV(float p1[3], float p2[3], float radius, f
Normalize(nor);
/* flip normal */
- if(Inpf(nor,vel)>0.0f) VecMulf(nor,-1.0f);
+ if(Inpf(nor,vel)>0.0f) VecNegf(nor);
a=Inpf(p1,nor)-Inpf(v0,nor);
nordotv=Inpf(nor,vel);
@@ -4629,7 +4636,7 @@ void tangent_from_uv(float *uv1, float *uv2, float *uv3, float *co1, float *co2,
/* check flip */
if ((ct[0]*n[0] + ct[1]*n[1] + ct[2]*n[2]) < 0.0f)
- VecMulf(tang, -1.0f);
+ VecNegf(tang);
}
/* used for zoom values*/