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:
authorCampbell Barton <ideasman42@gmail.com>2010-04-21 16:27:48 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-04-21 16:27:48 +0400
commitfba7ebcbea35d3b14f535f7f7a50c61074ae7092 (patch)
tree91045bfb888e38b02b109b6174c8b93102b649d2 /source/blender/render
parentf7717b2e80907a974b472d0ee786f63b06efa40c (diff)
replace add_v3_v3v3() --> add_v3_v3() where possible
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/source/convertblender.c44
-rw-r--r--source/blender/render/intern/source/envmap.c4
-rw-r--r--source/blender/render/intern/source/rayshade.c6
-rw-r--r--source/blender/render/intern/source/volumetric.c8
-rw-r--r--source/blender/render/intern/source/voxeldata.c2
5 files changed, 32 insertions, 32 deletions
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index 189c029d2e2..f6d08db78c7 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -1041,7 +1041,7 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par
vlr->v4= RE_findOrAddVert(obr, obr->totvert++);
VECCOPY(vlr->v1->co, vec);
- add_v3_v3v3(vlr->v1->co, vlr->v1->co, cross);
+ add_v3_v3(vlr->v1->co, cross);
VECCOPY(vlr->v1->n, nor);
vlr->v1->orco= sd->orco;
vlr->v1->accum= -1.0f; // accum abuse for strand texco
@@ -1053,7 +1053,7 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par
vlr->v2->accum= vlr->v1->accum;
VECCOPY(vlr->v4->co, vec1);
- add_v3_v3v3(vlr->v4->co, vlr->v4->co, cross);
+ add_v3_v3(vlr->v4->co, cross);
VECCOPY(vlr->v4->n, nor);
vlr->v4->orco= sd->orco;
vlr->v4->accum= 1.0f; // accum abuse for strand texco
@@ -1115,7 +1115,7 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par
v2= RE_findOrAddVert(obr, obr->totvert++);
VECCOPY(v1->co, vec);
- add_v3_v3v3(v1->co, v1->co, cross);
+ add_v3_v3(v1->co, cross);
VECCOPY(v1->n, nor);
v1->orco= sd->orco;
v1->accum= -1.0f; // accum abuse for strand texco
@@ -1177,7 +1177,7 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par
}
VECCOPY(vlr->v4->co, vec);
- add_v3_v3v3(vlr->v4->co, vlr->v4->co, cross);
+ add_v3_v3(vlr->v4->co, cross);
VECCOPY(vlr->v4->n, nor);
vlr->v4->orco= sd->orco;
vlr->v4->accum= -1.0f + 2.0f*sd->time; // accum abuse for strand texco
@@ -2544,10 +2544,10 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar,
vlr->flag |= R_NOPUNOFLIP;
}
- add_v3_v3v3(v1->n, v1->n, n1);
- add_v3_v3v3(v2->n, v2->n, n1);
- add_v3_v3v3(v3->n, v3->n, n1);
- add_v3_v3v3(v4->n, v4->n, n1);
+ add_v3_v3(v1->n, n1);
+ add_v3_v3(v2->n, n1);
+ add_v3_v3(v3->n, n1);
+ add_v3_v3(v4->n, n1);
p1++; p2++; p3++; p4++;
}
@@ -2561,10 +2561,10 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar,
/* optimize! :*/
vlr= RE_findOrAddVlak(obr, UVTOINDEX(sizeu - 1, v));
vlr1= RE_findOrAddVlak(obr, UVTOINDEX(0, v));
- add_v3_v3v3(vlr1->v1->n, vlr1->v1->n, vlr->n);
- add_v3_v3v3(vlr1->v2->n, vlr1->v2->n, vlr->n);
- add_v3_v3v3(vlr->v3->n, vlr->v3->n, vlr1->n);
- add_v3_v3v3(vlr->v4->n, vlr->v4->n, vlr1->n);
+ add_v3_v3(vlr1->v1->n, vlr->n);
+ add_v3_v3(vlr1->v2->n, vlr->n);
+ add_v3_v3(vlr->v3->n, vlr1->n);
+ add_v3_v3(vlr->v4->n, vlr1->n);
}
}
if (dl->flag & DL_CYCL_U) {
@@ -2574,10 +2574,10 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar,
/* optimize! :*/
vlr= RE_findOrAddVlak(obr, UVTOINDEX(u, 0));
vlr1= RE_findOrAddVlak(obr, UVTOINDEX(u, sizev-1));
- add_v3_v3v3(vlr1->v2->n, vlr1->v2->n, vlr->n);
- add_v3_v3v3(vlr1->v3->n, vlr1->v3->n, vlr->n);
- add_v3_v3v3(vlr->v1->n, vlr->v1->n, vlr1->n);
- add_v3_v3v3(vlr->v4->n, vlr->v4->n, vlr1->n);
+ add_v3_v3(vlr1->v2->n, vlr->n);
+ add_v3_v3(vlr1->v3->n, vlr->n);
+ add_v3_v3(vlr->v1->n, vlr1->n);
+ add_v3_v3(vlr->v4->n, vlr1->n);
}
}
/* last vertex is an extra case:
@@ -2603,9 +2603,9 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar,
vlr1= RE_findOrAddVlak(obr, UVTOINDEX(0,0)); /* (0,0) */
add_v3_v3v3(n1, vlr->n, vlr1->n);
vlr2= RE_findOrAddVlak(obr, UVTOINDEX(0, sizev-1)); /* (0,n) */
- add_v3_v3v3(n1, n1, vlr2->n);
+ add_v3_v3(n1, vlr2->n);
vlr3= RE_findOrAddVlak(obr, UVTOINDEX(sizeu-1, 0)); /* (m,0) */
- add_v3_v3v3(n1, n1, vlr3->n);
+ add_v3_v3(n1, vlr3->n);
VECCOPY(vlr->v3->n, n1);
VECCOPY(vlr1->v1->n, n1);
VECCOPY(vlr2->v2->n, n1);
@@ -2986,10 +2986,10 @@ static void init_render_curve(Render *re, ObjectRen *obr, int timeoffset)
for(a= startvlak; a<obr->totvlak; a++) {
vlr= RE_findOrAddVlak(obr, a);
- add_v3_v3v3(vlr->v1->n, vlr->v1->n, vlr->n);
- add_v3_v3v3(vlr->v3->n, vlr->v3->n, vlr->n);
- add_v3_v3v3(vlr->v2->n, vlr->v2->n, vlr->n);
- add_v3_v3v3(vlr->v4->n, vlr->v4->n, vlr->n);
+ add_v3_v3(vlr->v1->n, vlr->n);
+ add_v3_v3(vlr->v3->n, vlr->n);
+ add_v3_v3(vlr->v2->n, vlr->n);
+ add_v3_v3(vlr->v4->n, vlr->n);
}
for(a=startvert; a<obr->totvert; a++) {
ver= RE_findOrAddVert(obr, a);
diff --git a/source/blender/render/intern/source/envmap.c b/source/blender/render/intern/source/envmap.c
index 1a34868b9fd..3ab03aaed78 100644
--- a/source/blender/render/intern/source/envmap.c
+++ b/source/blender/render/intern/source/envmap.c
@@ -719,7 +719,7 @@ int envmaptex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex, TexRe
texr1.nor= texr2.nor= NULL;
- add_v3_v3v3(vec, vec, dxt);
+ add_v3_v3(vec, dxt);
face1= envcube_isect(env, vec, sco);
sub_v3_v3v3(vec, vec, dxt);
@@ -732,7 +732,7 @@ int envmaptex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex, TexRe
/* here was the nasty bug! results were not zero-ed. FPE! */
- add_v3_v3v3(vec, vec, dyt);
+ add_v3_v3(vec, dyt);
face1= envcube_isect(env, vec, sco);
sub_v3_v3v3(vec, vec, dyt);
diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c
index 015922216f9..b184b681846 100644
--- a/source/blender/render/intern/source/rayshade.c
+++ b/source/blender/render/intern/source/rayshade.c
@@ -1310,7 +1310,7 @@ static void trace_refract(float *col, ShadeInput *shi, ShadeResult *shr)
/* and perturb the refraction vector in it */
add_v3_v3v3(v_refract_new, v_refract, orthx);
- add_v3_v3v3(v_refract_new, v_refract_new, orthy);
+ add_v3_v3(v_refract_new, orthy);
normalize_v3(v_refract_new);
} else {
@@ -1405,7 +1405,7 @@ static void trace_reflect(float *col, ShadeInput *shi, ShadeResult *shr, float f
/* and perturb the normal in it */
add_v3_v3v3(v_nor_new, shi->vn, orthx);
- add_v3_v3v3(v_nor_new, v_nor_new, orthy);
+ add_v3_v3(v_nor_new, orthy);
normalize_v3(v_nor_new);
} else {
/* no blurriness, use the original normal */
@@ -1728,7 +1728,7 @@ static void DS_energy(float *sphere, int tot, float *vec)
}
mul_v3_fl(res, 0.5);
- add_v3_v3v3(vec, vec, res);
+ add_v3_v3(vec, res);
normalize_v3(vec);
}
diff --git a/source/blender/render/intern/source/volumetric.c b/source/blender/render/intern/source/volumetric.c
index 99c27aaf81e..142bef7180d 100644
--- a/source/blender/render/intern/source/volumetric.c
+++ b/source/blender/render/intern/source/volumetric.c
@@ -455,7 +455,7 @@ static void vol_get_transmittance(ShadeInput *shi, float *tr, float *co, float *
tau[1] += stepd * sigma_t[1];
tau[2] += stepd * sigma_t[2];
- add_v3_v3v3(p, p, step_vec);
+ add_v3_v3(p, step_vec);
}
/* return transmittance */
@@ -561,7 +561,7 @@ void vol_get_scattering(ShadeInput *shi, float *scatter_col, float *co)
if (lar) {
vol_shade_one_lamp(shi, co, lar, lacol);
- add_v3_v3v3(scatter_col, scatter_col, lacol);
+ add_v3_v3(scatter_col, lacol);
}
}
}
@@ -631,12 +631,12 @@ static void volumeintegrate(struct ShadeInput *shi, float *col, float *co, float
radiance[1] += stepd * tr[1] * (emit_col[1] + scatter_col[1]);
radiance[2] += stepd * tr[2] * (emit_col[2] + scatter_col[2]);
}
- add_v3_v3v3(p, p, step_vec);
+ add_v3_v3(p, step_vec);
}
/* multiply original color (from behind volume) with transmittance over entire distance */
mul_v3_v3v3(col, tr, col);
- add_v3_v3v3(col, col, radiance);
+ add_v3_v3(col, radiance);
/* alpha <-- transmission luminance */
col[3] = 1.0f - luminance(tr);
diff --git a/source/blender/render/intern/source/voxeldata.c b/source/blender/render/intern/source/voxeldata.c
index 762848c402a..3ac806f320a 100644
--- a/source/blender/render/intern/source/voxeldata.c
+++ b/source/blender/render/intern/source/voxeldata.c
@@ -339,7 +339,7 @@ int voxeldatatex(struct Tex *tex, float *texvec, struct TexResult *texres)
* to the range 0.0, 1.0, before looking up in the voxel structure. */
copy_v3_v3(co, texvec);
mul_v3_fl(co, 0.5f);
- add_v3_v3v3(co, co, offset);
+ add_v3_v3(co, offset);
/* co is now in the range 0.0, 1.0 */
switch (tex->extend) {