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
path: root/source
diff options
context:
space:
mode:
authorTom Musgrove <LetterRip@gmail.com>2006-10-15 03:27:18 +0400
committerTom Musgrove <LetterRip@gmail.com>2006-10-15 03:27:18 +0400
commit05ee7d9053031e8204fba3a3dbd98652af422e3f (patch)
tree212251af5456cae44e0e5d250b54bc55dc4065cf /source
parent03be45c8c0baf664194778b80d98bfe4790a4ce2 (diff)
=translate hoek to angle=
renamed the dutch variable hoek to angle globally arithb.c changes done by Matt Plough
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/curve.c32
-rw-r--r--source/blender/blenlib/intern/arithb.c54
-rw-r--r--source/blender/render/intern/source/convertblender.c6
-rw-r--r--source/blender/render/intern/source/pixelshading.c14
-rw-r--r--source/blender/src/drawobject.c6
5 files changed, 56 insertions, 56 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index c3c7704da85..22ace2d20bf 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -1097,7 +1097,7 @@ void makebevelcurve(Object *ob, ListBase *disp)
{
DispList *dl, *dlnew;
Curve *bevcu, *cu;
- float *fp, facx, facy, hoek, dhoek;
+ float *fp, facx, facy, angle, dangle;
int nr, a;
cu= ob->data;
@@ -1174,14 +1174,14 @@ void makebevelcurve(Object *ob, ListBase *disp)
/* a circle */
fp= dl->verts;
- dhoek= (2.0f*M_PI/(nr));
- hoek= -(nr-1)*dhoek;
+ dangle= (2.0f*M_PI/(nr));
+ angle= -(nr-1)*dangle;
for(a=0; a<nr; a++) {
fp[0]= 0.0;
- fp[1]= (float)(cos(hoek)*(cu->ext2));
- fp[2]= (float)(sin(hoek)*(cu->ext2)) - cu->ext1;
- hoek+= dhoek;
+ fp[1]= (float)(cos(angle)*(cu->ext2));
+ fp[2]= (float)(sin(angle)*(cu->ext2)) - cu->ext1;
+ angle+= dangle;
fp+= 3;
}
}
@@ -1204,14 +1204,14 @@ void makebevelcurve(Object *ob, ListBase *disp)
/* half a circle */
fp= dl->verts;
- dhoek= (0.5*M_PI/(dnr-1));
- hoek= -(nr-1)*dhoek;
+ dangle= (0.5*M_PI/(dnr-1));
+ angle= -(nr-1)*dangle;
for(a=0; a<nr; a++) {
fp[0]= 0.0;
- fp[1]= (float)(cos(hoek)*(cu->ext2));
- fp[2]= (float)(sin(hoek)*(cu->ext2)) - cu->ext1;
- hoek+= dhoek;
+ fp[1]= (float)(cos(angle)*(cu->ext2));
+ fp[2]= (float)(sin(angle)*(cu->ext2)) - cu->ext1;
+ angle+= dangle;
fp+= 3;
}
@@ -1260,14 +1260,14 @@ void makebevelcurve(Object *ob, ListBase *disp)
/* half a circle */
fp= dl->verts;
- hoek= 0.0;
- dhoek= (0.5*M_PI/(dnr-1));
+ angle= 0.0;
+ dangle= (0.5*M_PI/(dnr-1));
for(a=0; a<nr; a++) {
fp[0]= 0.0;
- fp[1]= (float)(cos(hoek)*(cu->ext2));
- fp[2]= (float)(sin(hoek)*(cu->ext2)) + cu->ext1;
- hoek+= dhoek;
+ fp[1]= (float)(cos(angle)*(cu->ext2));
+ fp[2]= (float)(sin(angle)*(cu->ext2)) + cu->ext1;
+ angle+= dangle;
fp+= 3;
}
}
diff --git a/source/blender/blenlib/intern/arithb.c b/source/blender/blenlib/intern/arithb.c
index 9053db49aec..4c3d91cda88 100644
--- a/source/blender/blenlib/intern/arithb.c
+++ b/source/blender/blenlib/intern/arithb.c
@@ -1185,7 +1185,7 @@ void Mat3ToQuat( float wmat[][3], float *q) /* from Sig.Proc.85 pag 253 */
void Mat3ToQuat_is_ok( float wmat[][3], float *q)
{
- float mat[3][3], matr[3][3], matn[3][3], q1[4], q2[4], hoek, si, co, nor[3];
+ float mat[3][3], matr[3][3], matn[3][3], q1[4], q2[4], angle, si, co, nor[3];
/* work on a copy */
Mat3CpyMat3(mat, wmat);
@@ -1199,10 +1199,10 @@ void Mat3ToQuat_is_ok( float wmat[][3], float *q)
Normalise(nor);
co= mat[2][2];
- hoek= 0.5f*saacos(co);
+ angle= 0.5f*saacos(co);
- co= (float)cos(hoek);
- si= (float)sin(hoek);
+ co= (float)cos(angle);
+ si= (float)sin(angle);
q1[0]= co;
q1[1]= -nor[0]*si; /* negative here, but why? */
q1[2]= -nor[1]*si;
@@ -1214,10 +1214,10 @@ void Mat3ToQuat_is_ok( float wmat[][3], float *q)
Mat3MulVecfl(matn, mat[0]);
/* and align x-axes */
- hoek= (float)(0.5*atan2(mat[0][1], mat[0][0]));
+ angle= (float)(0.5*atan2(mat[0][1], mat[0][0]));
- co= (float)cos(hoek);
- si= (float)sin(hoek);
+ co= (float)cos(angle);
+ si= (float)sin(angle);
q2[0]= co;
q2[1]= 0.0f;
q2[2]= 0.0f;
@@ -1261,7 +1261,7 @@ void NormalQuat(float *q)
float *vectoquat( float *vec, short axis, short upflag)
{
static float q1[4];
- float q2[4], nor[3], *fp, mat[3][3], hoek, si, co, x2, y2, z2, len1;
+ float q2[4], nor[3], *fp, mat[3][3], angle, si, co, x2, y2, z2, len1;
/* first rotate to axis */
if(axis>2) {
@@ -1319,9 +1319,9 @@ float *vectoquat( float *vec, short axis, short upflag)
Normalise(nor);
- hoek= 0.5f*saacos(co);
- si= (float)sin(hoek);
- q1[0]= (float)cos(hoek);
+ angle= 0.5f*saacos(co);
+ si= (float)sin(angle);
+ q1[0]= (float)cos(angle);
q1[1]= nor[0]*si;
q1[2]= nor[1]*si;
q1[3]= nor[2]*si;
@@ -1331,20 +1331,20 @@ float *vectoquat( float *vec, short axis, short upflag)
fp= mat[2];
if(axis==0) {
- if(upflag==1) hoek= (float)(0.5*atan2(fp[2], fp[1]));
- else hoek= (float)(-0.5*atan2(fp[1], fp[2]));
+ if(upflag==1) angle= (float)(0.5*atan2(fp[2], fp[1]));
+ else angle= (float)(-0.5*atan2(fp[1], fp[2]));
}
else if(axis==1) {
- if(upflag==0) hoek= (float)(-0.5*atan2(fp[2], fp[0]));
- else hoek= (float)(0.5*atan2(fp[0], fp[2]));
+ if(upflag==0) angle= (float)(-0.5*atan2(fp[2], fp[0]));
+ else angle= (float)(0.5*atan2(fp[0], fp[2]));
}
else {
- if(upflag==0) hoek= (float)(0.5*atan2(-fp[1], -fp[0]));
- else hoek= (float)(-0.5*atan2(-fp[0], -fp[1]));
+ if(upflag==0) angle= (float)(0.5*atan2(-fp[1], -fp[0]));
+ else angle= (float)(-0.5*atan2(-fp[0], -fp[1]));
}
- co= (float)cos(hoek);
- si= (float)(sin(hoek)/len1);
+ co= (float)cos(angle);
+ si= (float)(sin(angle)/len1);
q2[0]= co;
q2[1]= x2*si;
q2[2]= y2*si;
@@ -2473,7 +2473,7 @@ void Mat4ToSize( float mat[][4], float *size)
void triatoquat( float *v1, float *v2, float *v3, float *quat)
{
/* imaginary x-axis, y-axis triangle is being rotated */
- float vec[3], q1[4], q2[4], n[3], si, co, hoek, mat[3][3], imat[3][3];
+ float vec[3], q1[4], q2[4], n[3], si, co, angle, mat[3][3], imat[3][3];
/* move z-axis to face-normal */
CalcNormFloat(v1, v2, v3, vec);
@@ -2485,9 +2485,9 @@ void triatoquat( float *v1, float *v2, float *v3, float *quat)
if(n[0]==0.0 && n[1]==0.0) n[0]= 1.0;
- hoek= -0.5f*saacos(vec[2]);
- co= (float)cos(hoek);
- si= (float)sin(hoek);
+ angle= -0.5f*saacos(vec[2]);
+ co= (float)cos(angle);
+ si= (float)sin(angle);
q1[0]= co;
q1[1]= n[0]*si;
q1[2]= n[1]*si;
@@ -2503,9 +2503,9 @@ void triatoquat( float *v1, float *v2, float *v3, float *quat)
vec[2]= 0.0;
Normalise(vec);
- hoek= (float)(0.5*atan2(vec[1], vec[0]));
- co= (float)cos(hoek);
- si= (float)sin(hoek);
+ angle= (float)(0.5*atan2(vec[1], vec[0]));
+ co= (float)cos(angle);
+ si= (float)sin(angle);
q2[0]= co;
q2[1]= 0.0f;
q2[2]= 0.0f;
@@ -3053,4 +3053,4 @@ if(!point_in_slice(p,v1,v2,v3)) return 0;
if(!point_in_slice(p,v2,v3,v1)) return 0;
if(!point_in_slice(p,v3,v1,v2)) return 0;
return 1;
-} \ No newline at end of file
+}
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index c1cc2627e4f..dc509bfa7d8 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -2196,7 +2196,7 @@ static LampRen *add_render_lamp(Render *re, Object *ob)
Lamp *la= ob->data;
LampRen *lar;
GroupObject *go;
- float mat[4][4], hoek, xn, yn;
+ float mat[4][4], angle, xn, yn;
int c;
/* prevent only shadow from rendering light */
@@ -2345,9 +2345,9 @@ static LampRen *add_render_lamp(Render *re, Object *ob)
MTC_Mat3MulVecfl(lar->imat, lar->sh_invcampos);
/* z factor, for a normalized volume */
- hoek= saacos(lar->spotsi);
+ angle= saacos(lar->spotsi);
xn= lar->spotsi;
- yn= sin(hoek);
+ yn= sin(angle);
lar->sh_zfac= yn/xn;
/* pre-scale */
lar->sh_invcampos[2]*= lar->sh_zfac;
diff --git a/source/blender/render/intern/source/pixelshading.c b/source/blender/render/intern/source/pixelshading.c
index 42610c9f4d9..bf5e34d3442 100644
--- a/source/blender/render/intern/source/pixelshading.c
+++ b/source/blender/render/intern/source/pixelshading.c
@@ -343,17 +343,17 @@ void shadeHaloFloat(HaloRen *har, float *col, int zz,
}
if(har->starpoints) {
- float ster, hoek;
+ float ster, angle;
/* rotation */
- hoek= atan2(yn, xn);
- hoek*= (1.0+0.25*har->starpoints);
+ angle= atan2(yn, xn);
+ angle*= (1.0+0.25*har->starpoints);
- co= cos(hoek);
- si= sin(hoek);
+ co= cos(angle);
+ si= sin(angle);
- hoek= (co*xn+si*yn)*(co*yn-si*xn);
+ angle= (co*xn+si*yn)*(co*yn-si*xn);
- ster= fabs(hoek);
+ ster= fabs(angle);
if(ster>1.0) {
ster= (har->rad)/(ster);
diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c
index d0332e5c2d3..83d3f68e4b7 100644
--- a/source/blender/src/drawobject.c
+++ b/source/blender/src/drawobject.c
@@ -529,7 +529,7 @@ static void drawshadbuflimits(Lamp *la, float mat[][4])
static void spotvolume(float *lvec, float *vvec, float inp)
{
/* camera is at 0,0,0 */
- float temp[3],plane[3],mat1[3][3],mat2[3][3],mat3[3][3],mat4[3][3],q[4],co,si,hoek;
+ float temp[3],plane[3],mat1[3][3],mat2[3][3],mat3[3][3],mat4[3][3],q[4],co,si,angle;
Normalise(lvec);
Normalise(vvec); /* is this the correct vector ? */
@@ -552,8 +552,8 @@ static void spotvolume(float *lvec, float *vvec, float inp)
q[3] = 0 ;
Normalise(&q[1]);
- hoek = saacos(plane[2])/2.0;
- co = cos(hoek);
+ angle = saacos(plane[2])/2.0;
+ co = cos(angle);
si = sqrt(1-co*co);
q[0] = co;