|
From: <kin...@us...> - 2004-02-13 23:03:35
|
Update of /cvsroot/teem/teem/src/limn/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29503/test Modified Files: off2eps.c soid.c Log Message: added option to NOT initially fill the background color in the bounding box area Index: off2eps.c =================================================================== RCS file: /cvsroot/teem/teem/src/limn/test/off2eps.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** off2eps.c 10 Feb 2004 09:26:53 -0000 1.5 --- off2eps.c 13 Feb 2004 22:57:30 -0000 1.6 *************** *** 35,39 **** Nrrd *nmap; FILE *file; ! int wire, concave, describe, reverse; mop = airMopNew(); --- 35,39 ---- Nrrd *nmap; FILE *file; ! int wire, concave, describe, reverse, nobg; mop = airMopNew(); *************** *** 73,76 **** --- 73,78 ---- hestOptAdd(&hopt, "describe", NULL, airTypeInt, 0, 0, &describe, NULL, "for debugging: list object definition of OFF read"); + hestOptAdd(&hopt, "nobg", NULL, airTypeInt, 0, 0, &nobg, NULL, + "don't initially fill with background color"); hestOptAdd(&hopt, "wd", "5 widths", airTypeFloat, 5, 5, edgeWidth, "0.0 0.0 3.0 2.0 0.0", *************** *** 105,113 **** } airMopAdd(mop, file, (airMopper)airFclose, airMopAlways); - lookIdx = airArrayIncrLen(obj->lookArr, 2); - look = obj->look + lookIdx + 0; - ELL_4V_SET(look->rgba, 1, 1, 1, 1); /* this is kind of silly */ - ELL_3V_SET(look->kads, 0.2, 0.8, 0); - look->spow = 0; if (limnObjectOFFRead(obj, file)) { airMopAdd(mop, err = biffGetDone(LIMN), airFree, airMopAlways); --- 107,110 ---- *************** *** 141,144 **** --- 138,142 ---- win->ps.wireFrame = wire; win->ps.creaseAngle = creaseAngle; + win->ps.noBackground = nobg; win->file = airFopen(outS, stdout, "w"); *************** *** 146,149 **** --- 144,154 ---- win->scale = winscale; + for (lookIdx=0; lookIdx<obj->lookNum; lookIdx++) { + look = obj->look + lookIdx; + /* earlier version of limn/test/soid used (0.2,0.8,0.0), I think. + Now we assume that any useful shading is happening in the emap */ + ELL_3V_SET(look->kads, 0.2, 0.8, 0); + } + if (limnObjectRender(obj, cam, win) || (concave Index: soid.c =================================================================== RCS file: /cvsroot/teem/teem/src/limn/test/soid.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** soid.c 10 Feb 2004 09:26:53 -0000 1.9 --- soid.c 13 Feb 2004 22:57:30 -0000 1.10 *************** *** 53,57 **** main(int argc, char *argv[]) { char *me, *err, *outS; ! float p[3], q[4], mR[9], eval[3], len, sh, cl, cp, qA, qB; float matA[16], matB[16], os, rad, edgeWidth[5], AB[2]; hestOpt *hopt=NULL; --- 53,57 ---- main(int argc, char *argv[]) { char *me, *err, *outS; ! float p[3], q[4], mR[9], eval[3], scale[3], len, sh, cl, cp, qA, qB; float matA[16], matB[16], os, rad, edgeWidth[5], AB[2]; hestOpt *hopt=NULL; *************** *** 68,72 **** edgeWidth[1] = 0; me = argv[0]; ! hestOptAdd(&hopt, "sc", "scalings", airTypeFloat, 3, 3, eval, "1 1 1", "axis-aligned scaling to do on ellipsoid"); hestOptAdd(&hopt, "AB", "A, B exponents", airTypeFloat, 2, 2, AB, "nan nan", --- 68,72 ---- edgeWidth[1] = 0; me = argv[0]; ! hestOptAdd(&hopt, "sc", "scalings", airTypeFloat, 3, 3, scale, "1 1 1", "axis-aligned scaling to do on ellipsoid"); hestOptAdd(&hopt, "AB", "A, B exponents", airTypeFloat, 2, 2, AB, "nan nan", *************** *** 122,135 **** axis = 2; } else { ! ELL_3V_SCALE(eval, os, eval); ELL_SORT3(eval[0], eval[1], eval[2], cl); cl = (eval[0] - eval[1])/(eval[0] + eval[1] + eval[2]); cp = 2*(eval[1] - eval[2])/(eval[0] + eval[1] + eval[2]); if (cl > cp) { ! axis = ELL_MAX3_IDX(eval[0], eval[1], eval[2]); qA = pow(1-cp, sh); qB = pow(1-cl, sh); } else { ! axis = ELL_MIN3_IDX(eval[0], eval[1], eval[2]); qA = pow(1-cl, sh); qB = pow(1-cp, sh); --- 122,136 ---- axis = 2; } else { ! ELL_3V_SCALE(scale, os, scale); ! ELL_3V_COPY(eval, scale); ELL_SORT3(eval[0], eval[1], eval[2], cl); cl = (eval[0] - eval[1])/(eval[0] + eval[1] + eval[2]); cp = 2*(eval[1] - eval[2])/(eval[0] + eval[1] + eval[2]); if (cl > cp) { ! axis = ELL_MAX3_IDX(scale[0], scale[1], scale[2]); qA = pow(1-cp, sh); qB = pow(1-cl, sh); } else { ! axis = ELL_MIN3_IDX(scale[0], scale[1], scale[2]); qA = pow(1-cl, sh); qB = pow(1-cp, sh); *************** *** 149,153 **** part = obj->part + partIdx; ELL_4M_IDENTITY_SET(matA); ! ELL_4M_SCALE_SET(matB, eval[0], eval[1], eval[2]); ell_4m_post_mul_f(matA, matB); ELL_43M_INSET(matB, mR); --- 150,154 ---- part = obj->part + partIdx; ELL_4M_IDENTITY_SET(matA); ! ELL_4M_SCALE_SET(matB, scale[0], scale[1], scale[2]); ell_4m_post_mul_f(matA, matB); ELL_43M_INSET(matB, mR); |