--- ray/src/util/rad.c 2008/03/11 02:21:47 2.83 +++ ray/src/util/rad.c 2008/12/06 01:08:53 2.89 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rad.c,v 2.83 2008/03/11 02:21:47 greg Exp $"; +static const char RCSid[] = "$Id: rad.c,v 2.89 2008/12/06 01:08:53 greg Exp $"; #endif /* * Executive program for oconv, rpict and pfilt @@ -208,7 +208,7 @@ main( goto userr; rifname = argv[i]; /* check command-line options */ - if ((nprocs > 1) & (viewselect != NULL)) + if ((nprocs > 1) & (viewselect != NULL) & (rvdevice == NULL)) nprocs = 1; /* assign Radiance root file name */ rootname(radname, rifname); @@ -787,7 +787,7 @@ medqopts( /* medium quality rendering options */ } po = addarg(po, "-pt .08"); if (vbool(PENUMBRAS)) - op = addarg(op, "-ds .2 -dj .5"); + op = addarg(op, "-ds .2 -dj .9"); else op = addarg(op, "-ds .3"); op = addarg(op, "-dt .1 -dc .5 -dr 1 -sj .7 -st .1"); @@ -1012,10 +1012,19 @@ specview( /* get proper view spec from vs */ } else if (*vs == 'z') { zpos = -1; vs++; } - viewtype = 'v'; - if ((*vs == 'v') | (*vs == 'l') | (*vs == 'a') | - (*vs == 'h') | (*vs == 'c') | (*vs == 's')) + switch (*vs) { + case VT_PER: + case VT_PAR: + case VT_ANG: + case VT_HEM: + case VT_PLS: + case VT_CYL: viewtype = *vs++; + break; + default: + viewtype = VT_PER; + break; + } cp = viewopts; if ((!*vs || isspace(*vs)) && (xpos|ypos|zpos)) { /* got one! */ *cp++ = '-'; *cp++ = 'v'; *cp++ = 't'; *cp++ = viewtype; @@ -1057,19 +1066,20 @@ specview( /* get proper view spec from vs */ } cp = addarg(cp, vup[upax+3]); switch (viewtype) { - case 'v': + case VT_PER: cp = addarg(cp, "-vh 45 -vv 45"); break; - case 'l': + case VT_PAR: d = sqrt(dim[0]*dim[0]+dim[1]*dim[1]+dim[2]*dim[2]); sprintf(cp, " -vh %.2g -vv %.2g", d, d); cp += strlen(cp); break; - case 'a': - case 'h': + case VT_ANG: + case VT_HEM: + case VT_PLS: cp = addarg(cp, "-vh 180 -vv 180"); break; - case 'c': + case VT_CYL: cp = addarg(cp, "-vh 180 -vv 90"); break; } @@ -1187,6 +1197,8 @@ rvu( /* run rvu with first view */ if (sayview) myprintview(vw, stdout); sprintf(combuf, "rvu %s%s%s -R %s ", vw, po, opts, rifname); + if (nprocs > 1) + sprintf(combuf+strlen(combuf), "-n %d ", nprocs); if (rvdevice != NULL) sprintf(combuf+strlen(combuf), "-o %s ", rvdevice); if (vdef(EXPOSURE)) @@ -1267,7 +1279,7 @@ rpict( /* run rpict and pfilt for each view */ myprintview(vw, stdout); if (!vs[0]) sprintf(vs, "%d", vn); - sprintf(picfile, "%s_%s.pic", vval(PICTURE), vs); + sprintf(picfile, "%s_%s.hdr", vval(PICTURE), vs); if (vdef(ZFILE)) sprintf(zopt, " -z %s_%s.zbf", vval(ZFILE), vs); else @@ -1356,7 +1368,7 @@ rpict( /* run rpict and pfilt for each view */ } /* remove/rename raw file */ if (vdef(RAWFILE)) { - sprintf(combuf, "%s_%s.pic", vval(RAWFILE), vs); + sprintf(combuf, "%s_%s.hdr", vval(RAWFILE), vs); mvfile(rawfile, combuf); } else rmfile(rawfile); @@ -1473,8 +1485,8 @@ wait_process( /* wait for process(es) to finish */ int all ) { - int ourstatus = 0; - RT_PID pid, status; + int ourstatus = 0, status; + RT_PID pid; if (all) all = children_running; @@ -1511,7 +1523,8 @@ int all; } int kill(pid, sig) /* win|unix_process.c should also wait and kill */ -RT_PID pid, sig; +RT_PID pid; +int sig; { return 0; }