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:
authorMartin Poirier <theeth@yahoo.com>2007-09-27 21:45:53 +0400
committerMartin Poirier <theeth@yahoo.com>2007-09-27 21:45:53 +0400
commit0345b3b221568d9c29665397ef42496c8199a05e (patch)
tree1713c8ee0dac014104eedbb5b305a32e20da06ee /source/blender
parent8c2ebc2decc22bb052242d7a305010b55fd52947 (diff)
Improve consistency in editmesh tmp unions.
EditVert had "float *fp" while the others had "float p". changed to "float p" and made all code using the float pointer use the already existing tmp.p (void*) instead.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenlib/BLI_editVert.h2
-rw-r--r--source/blender/src/editmesh_mods.c10
-rw-r--r--source/blender/src/transform_conversions.c30
3 files changed, 21 insertions, 21 deletions
diff --git a/source/blender/blenlib/BLI_editVert.h b/source/blender/blenlib/BLI_editVert.h
index fd217e479ed..795f6781894 100644
--- a/source/blender/blenlib/BLI_editVert.h
+++ b/source/blender/blenlib/BLI_editVert.h
@@ -55,9 +55,9 @@ typedef struct EditVert
struct EditVert *v;
struct EditEdge *e;
struct EditFace *f;
- float *fp;
void *p;
long l;
+ float fp;
} tmp;
float no[3]; /*vertex normal */
float co[3]; /*vertex location */
diff --git a/source/blender/src/editmesh_mods.c b/source/blender/src/editmesh_mods.c
index 2a86c674f66..5cfeab03c0a 100644
--- a/source/blender/src/editmesh_mods.c
+++ b/source/blender/src/editmesh_mods.c
@@ -3894,7 +3894,7 @@ void vertexsmooth(void)
eve= em->verts.first;
while(eve) {
if(eve->f & SELECT) {
- eve->tmp.fp = adr;
+ eve->tmp.p = (void*)adr;
eve->f1= 0;
eve->f2= 0;
adr+= 3;
@@ -3942,11 +3942,11 @@ void vertexsmooth(void)
if((eed->v1->f & SELECT) && eed->v1->f1<255) {
eed->v1->f1++;
- VecAddf(eed->v1->tmp.fp, eed->v1->tmp.fp, fvec);
+ VecAddf(eed->v1->tmp.p, eed->v1->tmp.p, fvec);
}
if((eed->v2->f & SELECT) && eed->v2->f1<255) {
eed->v2->f1++;
- VecAddf(eed->v2->tmp.fp, eed->v2->tmp.fp, fvec);
+ VecAddf(eed->v2->tmp.p, eed->v2->tmp.p, fvec);
}
}
eed= eed->next;
@@ -3956,7 +3956,7 @@ void vertexsmooth(void)
while(eve) {
if(eve->f & SELECT) {
if(eve->f1) {
- adr = eve->tmp.fp;
+ adr = eve->tmp.p;
fac= 0.5/(float)eve->f1;
eve->co[0]= 0.5*eve->co[0]+fac*adr[0];
@@ -3976,7 +3976,7 @@ void vertexsmooth(void)
}
}
}
- eve->tmp.fp= 0;
+ eve->tmp.p= NULL;
}
eve= eve->next;
}
diff --git a/source/blender/src/transform_conversions.c b/source/blender/src/transform_conversions.c
index 058461806ce..d7bd3154ba1 100644
--- a/source/blender/src/transform_conversions.c
+++ b/source/blender/src/transform_conversions.c
@@ -1580,7 +1580,7 @@ static void set_crazyspace_quats(float *origcos, float *mappedcos, float *quats)
/* two abused locations in vertices */
for(eve= em->verts.first; eve; eve= eve->next, index++) {
- eve->tmp.fp = NULL;
+ eve->tmp.p = NULL;
eve->prev= (EditVert *)index;
}
@@ -1596,9 +1596,9 @@ static void set_crazyspace_quats(float *origcos, float *mappedcos, float *quats)
co2= (origcos)? origcos + 3*(long)(efa->v2->prev): efa->v2->co;
co3= (origcos)? origcos + 3*(long)(efa->v3->prev): efa->v3->co;
- if(efa->v2->tmp.fp==NULL && efa->v2->f1) {
+ if(efa->v2->tmp.p==NULL && efa->v2->f1) {
set_crazy_vertex_quat(quats, co2, co3, co1, v2, v3, v1);
- efa->v2->tmp.fp= quats;
+ efa->v2->tmp.p= (void*)quats;
quats+= 4;
}
@@ -1606,31 +1606,31 @@ static void set_crazyspace_quats(float *origcos, float *mappedcos, float *quats)
v4= mappedcos + 3*(long)(efa->v4->prev);
co4= (origcos)? origcos + 3*(long)(efa->v4->prev): efa->v4->co;
- if(efa->v1->tmp.fp==NULL && efa->v1->f1) {
+ if(efa->v1->tmp.p==NULL && efa->v1->f1) {
set_crazy_vertex_quat(quats, co1, co2, co4, v1, v2, v4);
- efa->v1->tmp.fp= quats;
+ efa->v1->tmp.p= (void*)quats;
quats+= 4;
}
- if(efa->v3->tmp.fp==NULL && efa->v3->f1) {
+ if(efa->v3->tmp.p==NULL && efa->v3->f1) {
set_crazy_vertex_quat(quats, co3, co4, co2, v3, v4, v2);
- efa->v3->tmp.fp= quats;
+ efa->v3->tmp.p= (void*)quats;
quats+= 4;
}
- if(efa->v4->tmp.fp==NULL && efa->v4->f1) {
+ if(efa->v4->tmp.p==NULL && efa->v4->f1) {
set_crazy_vertex_quat(quats, co4, co1, co3, v4, v1, v3);
- efa->v4->tmp.fp= quats;
+ efa->v4->tmp.p= (void*)quats;
quats+= 4;
}
}
else {
- if(efa->v1->tmp.fp==NULL && efa->v1->f1) {
+ if(efa->v1->tmp.p==NULL && efa->v1->f1) {
set_crazy_vertex_quat(quats, co1, co2, co3, v1, v2, v3);
- efa->v1->tmp.fp= quats;
+ efa->v1->tmp.p= (void*)quats;
quats+= 4;
}
- if(efa->v3->tmp.fp==NULL && efa->v3->f1) {
+ if(efa->v3->tmp.p==NULL && efa->v3->f1) {
set_crazy_vertex_quat(quats, co3, co1, co2, v3, v1, v2);
- efa->v3->tmp.fp= quats;
+ efa->v3->tmp.p= (void*)quats;
quats+= 4;
}
}
@@ -1764,12 +1764,12 @@ static void createTransEditVerts(TransInfo *t)
}
/* CrazySpace */
- if(defmats || (quats && eve->tmp.fp)) {
+ if(defmats || (quats && eve->tmp.p)) {
float mat[3][3], imat[3][3], qmat[3][3];
/* use both or either quat and defmat correction */
if(quats && eve->tmp.f) {
- QuatToMat3(eve->tmp.fp, qmat);
+ QuatToMat3(eve->tmp.p, qmat);
if(defmats)
Mat3MulSerie(mat, mtx, qmat, defmats[a],