[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [52875] trunk/blender/source/blender: code cleanup: spelling labda -> lambda
Campbell Barton
ideasman42 at gmail.com
Tue Dec 11 15:18:38 CET 2012
Revision: 52875
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52875
Author: campbellbarton
Date: 2012-12-11 14:18:37 +0000 (Tue, 11 Dec 2012)
Log Message:
-----------
code cleanup: spelling labda -> lambda
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/curve.c
trunk/blender/source/blender/blenlib/intern/math_geom.c
trunk/blender/source/blender/blenlib/intern/rct.c
trunk/blender/source/blender/editors/armature/meshlaplacian.c
trunk/blender/source/blender/editors/mesh/editmesh_knife.c
trunk/blender/source/blender/editors/mesh/editmesh_select.c
trunk/blender/source/blender/render/intern/raytrace/rayobject_octree.cpp
trunk/blender/source/blender/render/intern/source/envmap.c
trunk/blender/source/blender/render/intern/source/shadbuf.c
trunk/blender/source/blender/render/intern/source/zbuf.c
Modified: trunk/blender/source/blender/blenkernel/intern/curve.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/curve.c 2012-12-11 14:11:46 UTC (rev 52874)
+++ trunk/blender/source/blender/blenkernel/intern/curve.c 2012-12-11 14:18:37 UTC (rev 52875)
@@ -68,7 +68,7 @@
/* local */
static int cu_isectLL(const float v1[3], const float v2[3], const float v3[3], const float v4[3],
short cox, short coy,
- float *labda, float *mu, float vec[3]);
+ float *lambda, float *mu, float vec[3]);
void BKE_curve_unlink(Curve *cu)
{
@@ -1615,7 +1615,7 @@
static int cu_isectLL(const float v1[3], const float v2[3], const float v3[3], const float v4[3],
short cox, short coy,
- float *labda, float *mu, float vec[3])
+ float *lambda, float *mu, float vec[3])
{
/* return:
* -1: collinear
@@ -1629,22 +1629,22 @@
if (deler == 0.0f)
return -1;
- *labda = (v1[coy] - v3[coy]) * (v3[cox] - v4[cox]) - (v1[cox] - v3[cox]) * (v3[coy] - v4[coy]);
- *labda = -(*labda / deler);
+ *lambda = (v1[coy] - v3[coy]) * (v3[cox] - v4[cox]) - (v1[cox] - v3[cox]) * (v3[coy] - v4[coy]);
+ *lambda = -(*lambda / deler);
deler = v3[coy] - v4[coy];
if (deler == 0) {
deler = v3[cox] - v4[cox];
- *mu = -(*labda * (v2[cox] - v1[cox]) + v1[cox] - v3[cox]) / deler;
+ *mu = -(*lambda * (v2[cox] - v1[cox]) + v1[cox] - v3[cox]) / deler;
}
else {
- *mu = -(*labda * (v2[coy] - v1[coy]) + v1[coy] - v3[coy]) / deler;
+ *mu = -(*lambda * (v2[coy] - v1[coy]) + v1[coy] - v3[coy]) / deler;
}
- vec[cox] = *labda * (v2[cox] - v1[cox]) + v1[cox];
- vec[coy] = *labda * (v2[coy] - v1[coy]) + v1[coy];
+ vec[cox] = *lambda * (v2[cox] - v1[cox]) + v1[cox];
+ vec[coy] = *lambda * (v2[coy] - v1[coy]) + v1[coy];
- if (*labda >= 0.0f && *labda <= 1.0f && *mu >= 0.0f && *mu <= 1.0f) {
- if (*labda == 0.0f || *labda == 1.0f || *mu == 0.0f || *mu == 1.0f)
+ if (*lambda >= 0.0f && *lambda <= 1.0f && *mu >= 0.0f && *mu <= 1.0f) {
+ if (*lambda == 0.0f || *lambda == 1.0f || *mu == 0.0f || *mu == 1.0f)
return 1;
return 2;
}
@@ -1654,7 +1654,7 @@
static short bevelinside(BevList *bl1, BevList *bl2)
{
- /* is bl2 INSIDE bl1 ? with left-right method and "labda's" */
+ /* is bl2 INSIDE bl1 ? with left-right method and "lambda's" */
/* returns '1' if correct hole */
BevPoint *bevp, *prevbevp;
float min, max, vec[3], hvec1[3], hvec2[3], lab, mu;
Modified: trunk/blender/source/blender/blenlib/intern/math_geom.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/math_geom.c 2012-12-11 14:11:46 UTC (rev 52874)
+++ trunk/blender/source/blender/blenlib/intern/math_geom.c 2012-12-11 14:18:37 UTC (rev 52875)
@@ -180,7 +180,7 @@
/* distance p to line-piece v1-v2 */
float dist_squared_to_line_segment_v2(const float p[2], const float l1[2], const float l2[2])
{
- float labda, rc[2], pt[2], len;
+ float lambda, rc[2], pt[2], len;
rc[0] = l2[0] - l1[0];
rc[1] = l2[1] - l1[1];
@@ -191,18 +191,18 @@
return (rc[0] * rc[0] + rc[1] * rc[1]);
}
- labda = (rc[0] * (p[0] - l1[0]) + rc[1] * (p[1] - l1[1])) / len;
- if (labda <= 0.0f) {
+ lambda = (rc[0] * (p[0] - l1[0]) + rc[1] * (p[1] - l1[1])) / len;
+ if (lambda <= 0.0f) {
pt[0] = l1[0];
pt[1] = l1[1];
}
- else if (labda >= 1.0f) {
+ else if (lambda >= 1.0f) {
pt[0] = l2[0];
pt[1] = l2[1];
}
else {
- pt[0] = labda * rc[0] + l1[0];
- pt[1] = labda * rc[1] + l1[1];
+ pt[0] = lambda * rc[0] + l1[0];
+ pt[1] = lambda * rc[1] + l1[1];
}
rc[0] = pt[0] - p[0];
@@ -301,17 +301,17 @@
/* intersect Line-Line, shorts */
int isect_line_line_v2_int(const int v1[2], const int v2[2], const int v3[2], const int v4[2])
{
- float div, labda, mu;
+ float div, lambda, mu;
div = (float)((v2[0] - v1[0]) * (v4[1] - v3[1]) - (v2[1] - v1[1]) * (v4[0] - v3[0]));
if (div == 0.0f) return ISECT_LINE_LINE_COLINEAR;
- labda = ((float)(v1[1] - v3[1]) * (v4[0] - v3[0]) - (v1[0] - v3[0]) * (v4[1] - v3[1])) / div;
+ lambda = ((float)(v1[1] - v3[1]) * (v4[0] - v3[0]) - (v1[0] - v3[0]) * (v4[1] - v3[1])) / div;
mu = ((float)(v1[1] - v3[1]) * (v2[0] - v1[0]) - (v1[0] - v3[0]) * (v2[1] - v1[1])) / div;
- if (labda >= 0.0f && labda <= 1.0f && mu >= 0.0f && mu <= 1.0f) {
- if (labda == 0.0f || labda == 1.0f || mu == 0.0f || mu == 1.0f) return ISECT_LINE_LINE_EXACT;
+ if (lambda >= 0.0f && lambda <= 1.0f && mu >= 0.0f && mu <= 1.0f) {
+ if (lambda == 0.0f || lambda == 1.0f || mu == 0.0f || mu == 1.0f) return ISECT_LINE_LINE_EXACT;
return ISECT_LINE_LINE_CROSS;
}
return ISECT_LINE_LINE_NONE;
@@ -335,17 +335,17 @@
/* intersect Line-Line, floats */
int isect_line_line_v2(const float v1[2], const float v2[2], const float v3[2], const float v4[2])
{
- float div, labda, mu;
+ float div, lambda, mu;
div = (v2[0] - v1[0]) * (v4[1] - v3[1]) - (v2[1] - v1[1]) * (v4[0] - v3[0]);
if (div == 0.0f) return ISECT_LINE_LINE_COLINEAR;
- labda = ((float)(v1[1] - v3[1]) * (v4[0] - v3[0]) - (v1[0] - v3[0]) * (v4[1] - v3[1])) / div;
+ lambda = ((float)(v1[1] - v3[1]) * (v4[0] - v3[0]) - (v1[0] - v3[0]) * (v4[1] - v3[1])) / div;
mu = ((float)(v1[1] - v3[1]) * (v2[0] - v1[0]) - (v1[0] - v3[0]) * (v2[1] - v1[1])) / div;
- if (labda >= 0.0f && labda <= 1.0f && mu >= 0.0f && mu <= 1.0f) {
- if (labda == 0.0f || labda == 1.0f || mu == 0.0f || mu == 1.0f) return ISECT_LINE_LINE_EXACT;
+ if (lambda >= 0.0f && lambda <= 1.0f && mu >= 0.0f && mu <= 1.0f) {
+ if (lambda == 0.0f || lambda == 1.0f || mu == 0.0f || mu == 1.0f) return ISECT_LINE_LINE_EXACT;
return ISECT_LINE_LINE_CROSS;
}
return ISECT_LINE_LINE_NONE;
Modified: trunk/blender/source/blender/blenlib/intern/rct.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/rct.c 2012-12-11 14:11:46 UTC (rev 52874)
+++ trunk/blender/source/blender/blenlib/intern/rct.c 2012-12-11 14:18:37 UTC (rev 52875)
@@ -109,9 +109,9 @@
return 1; /* co-linear */
}
else {
- const double labda = (double)((v1[1] - v3[1]) * (v4[0] - v3[0]) - (v1[0] - v3[0]) * (v4[1] - v3[1])) / div;
+ const double lambda = (double)((v1[1] - v3[1]) * (v4[0] - v3[0]) - (v1[0] - v3[0]) * (v4[1] - v3[1])) / div;
const double mu = (double)((v1[1] - v3[1]) * (v2[0] - v1[0]) - (v1[0] - v3[0]) * (v2[1] - v1[1])) / div;
- return (labda >= 0.0 && labda <= 1.0 && mu >= 0.0 && mu <= 1.0);
+ return (lambda >= 0.0 && lambda <= 1.0 && mu >= 0.0 && mu <= 1.0);
}
}
static int isect_segments_fl(const float v1[2], const float v2[2], const float v3[2], const float v4[2])
@@ -121,9 +121,9 @@
return 1; /* co-linear */
}
else {
- const double labda = (double)((v1[1] - v3[1]) * (v4[0] - v3[0]) - (v1[0] - v3[0]) * (v4[1] - v3[1])) / div;
+ const double lambda = (double)((v1[1] - v3[1]) * (v4[0] - v3[0]) - (v1[0] - v3[0]) * (v4[1] - v3[1])) / div;
const double mu = (double)((v1[1] - v3[1]) * (v2[0] - v1[0]) - (v1[0] - v3[0]) * (v2[1] - v1[1])) / div;
- return (labda >= 0.0 && labda <= 1.0 && mu >= 0.0 && mu <= 1.0);
+ return (lambda >= 0.0 && lambda <= 1.0 && mu >= 0.0 && mu <= 1.0);
}
}
Modified: trunk/blender/source/blender/editors/armature/meshlaplacian.c
===================================================================
--- trunk/blender/source/blender/editors/armature/meshlaplacian.c 2012-12-11 14:11:46 UTC (rev 52874)
+++ trunk/blender/source/blender/editors/armature/meshlaplacian.c 2012-12-11 14:18:37 UTC (rev 52875)
@@ -1120,7 +1120,7 @@
typedef struct MeshDeformIsect {
float start[3];
float vec[3];
- float labda;
+ float lambda;
void *face;
int isect;
@@ -1227,7 +1227,7 @@
copy_v3_v3(hit->co, co);
isec->isect = (dot_v3v3(no, ray->direction) <= 0.0f);
- isec->labda = dist;
+ isec->lambda = dist;
isec->face = mf;
}
}
@@ -1245,7 +1245,7 @@
/* setup isec */
memset(&isect_mdef, 0, sizeof(isect_mdef));
- isect_mdef.labda = 1e10f;
+ isect_mdef.lambda = 1e10f;
add_v3_v3v3(isect_mdef.start, co1, epsilon);
add_v3_v3v3(end, co2, epsilon);
@@ -1256,7 +1256,7 @@
if (BLI_bvhtree_ray_cast(mdb->bvhtree, isect_mdef.start, isect_mdef.vec,
0.0, &hit, harmonic_ray_callback, data) != -1)
{
- len = isect_mdef.labda;
+ len = isect_mdef.lambda;
isect_mdef.face = mface = mface1 + hit.index;
/* create MDefBoundIsect */
Modified: trunk/blender/source/blender/editors/mesh/editmesh_knife.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/editmesh_knife.c 2012-12-11 14:11:46 UTC (rev 52874)
+++ trunk/blender/source/blender/editors/mesh/editmesh_knife.c 2012-12-11 14:18:37 UTC (rev 52875)
@@ -1594,10 +1594,10 @@
dis = dist_to_line_segment_v2(sco, kfe->v1->sco, kfe->v2->sco);
if (dis < curdis && dis < maxdist) {
if (kcd->vc.rv3d->rflag & RV3D_CLIPPING) {
- float labda = line_point_factor_v2(sco, kfe->v1->sco, kfe->v2->sco);
+ float lambda = line_point_factor_v2(sco, kfe->v1->sco, kfe->v2->sco);
float vec[3];
- interp_v3_v3v3(vec, kfe->v1->cageco, kfe->v2->cageco, labda);
+ interp_v3_v3v3(vec, kfe->v1->cageco, kfe->v2->cageco, lambda);
if (ED_view3d_clipping_test(kcd->vc.rv3d, vec, TRUE) == 0) {
cure = kfe;
Modified: trunk/blender/source/blender/editors/mesh/editmesh_select.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/editmesh_select.c 2012-12-11 14:11:46 UTC (rev 52874)
+++ trunk/blender/source/blender/editors/mesh/editmesh_select.c 2012-12-11 14:18:37 UTC (rev 52875)
@@ -464,12 +464,12 @@
if (distance < data->dist) {
if (data->vc.rv3d->rflag & RV3D_CLIPPING) {
- float labda = line_point_factor_v2(data->mval_fl, screen_co_a, screen_co_b);
+ float lambda = line_point_factor_v2(data->mval_fl, screen_co_a, screen_co_b);
float vec[3];
- vec[0] = eed->v1->co[0] + labda * (eed->v2->co[0] - eed->v1->co[0]);
- vec[1] = eed->v1->co[1] + labda * (eed->v2->co[1] - eed->v1->co[1]);
- vec[2] = eed->v1->co[2] + labda * (eed->v2->co[2] - eed->v1->co[2]);
+ vec[0] = eed->v1->co[0] + lambda * (eed->v2->co[0] - eed->v1->co[0]);
+ vec[1] = eed->v1->co[1] + lambda * (eed->v2->co[1] - eed->v1->co[1]);
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list