rwenzlaff: Added a small round-off constant to Faceloopcut's percent calc

so that it rounds numbers off consistantly.  (Fixes bug #970) Though
	it was only a 0.03% error.

	Also fixed some sloppy/missing comments.
This commit is contained in:
Robert Wenzlaff
2004-03-09 13:49:45 +00:00
parent 9d68a346bb
commit 7ba0272093
2 changed files with 16 additions and 16 deletions

View File

@@ -2488,14 +2488,14 @@ static void drawmeshwire(Object *ob)
glEnd();
}
}
else {
else { /* Object mode draw */
if(me==0) return;
if(me->bb==0) tex_space_mesh(me);
if(me->totface>4) if(boundbox_clip(ob->obmat, me->bb)==0) return;
if(mesh_uses_displist(me)) drawDispListwire(&me->disp);
if(mesh_uses_displist(me)) drawDispListwire(&me->disp); /* Subsurf */
else {
mvert= me->mvert;
@@ -2511,7 +2511,7 @@ static void drawmeshwire(Object *ob)
dl= find_displist(&ob->disp, DL_VERTS);
if(dl) extverts= dl->verts;
if(ok) {
if(ok) { /* No faces, just draw verts as points */
start= 0; end= me->totvert;
set_buildvars(ob, &start, &end);
@@ -2521,13 +2521,13 @@ static void drawmeshwire(Object *ob)
if(extverts) {
extverts+= 3*start;
for(a= start; a<end; a++, extverts+=3) {
for(a= start; a<end; a++, extverts+=3) { /* DispList found, Draw displist */
glVertex3fv(extverts);
}
}
else {
mvert+= start;
for(a= start; a<end; a++, mvert++) {
for(a= start; a<end; a++, mvert++) { /* else Draw mesh verts directly */
glVertex3fv(mvert->co);
}
}
@@ -2535,7 +2535,7 @@ static void drawmeshwire(Object *ob)
glEnd();
glPointSize(1.0);
}
else {
else { /* Draw wire frame */
start= 0; end= me->totface;
set_buildvars(ob, &start, &end);

View File

@@ -3011,10 +3011,10 @@ void loopoperations(char mode)
else if(percentcut == 0.0)
percentcut = 0.0001;
if(eed->f & 8){
if(eed->f & 32)
eed->f1 = 32768*(1.0-percentcut);
if(eed->f & 32) /* Need to offset by a const. (0.5/32768) for consistant roundoff */
eed->f1 = 32768*(1.0-percentcut - 0.0000153);
else
eed->f1 = 32768*(percentcut);
eed->f1 = 32768*(percentcut + 0.0000153);
}
}
/*-------------------------------------*/
@@ -3954,12 +3954,12 @@ static void set_wuv(int tot, EditVlak *evl, int v1, int v2, int v3, int v4)
/* Numbers corespond to verts (corner points), */
/* edge->vn's (center edges), the Center */
memcpy(uvo, evl->tf.uv, sizeof(uvo)); /* And the quincunx points of a face */
uv= evl->tf.uv[0]; /* as shown here: */
/* 2 5 1 */
memcpy(colo, evl->tf.col, sizeof(colo)); /* 10 13 */
col= evl->tf.col; /* 6 9 8 */
/* 11 12 */
if(tot==4) { /* 3 7 4 */
uv= evl->tf.uv[0]; /* as shown here: */
/* 2 5 1 */
memcpy(colo, evl->tf.col, sizeof(colo)); /* 10 13 */
col= evl->tf.col; /* 6 9 8 */
/* 11 12 */
if(tot==4) { /* 3 7 4 */
for(a=0; a<4; a++, uv+=2, col++) {
if(a==0) v= v1;
else if(a==1) v= v2;
@@ -9435,4 +9435,4 @@ void vertex_loop_select()
addqueue(curarea->win, REDRAW, 1);
SetBlenderCursor(SYSCURSOR);
return;
}
}