--- ray/src/rt/rv2.c 2005/04/14 17:34:49 2.47 +++ ray/src/rt/rv2.c 2005/06/14 03:34:14 2.51 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rv2.c,v 2.47 2005/04/14 17:34:49 greg Exp $"; +static const char RCSid[] = "$Id: rv2.c,v 2.51 2005/06/14 03:34:14 greg Exp $"; #endif /* * rv2.c - command routines used in tracing a view. @@ -305,7 +305,7 @@ getfocus( /* set focus distance */ error(COMMAND, "not on image"); return; } - rayorigin(&thisray, NULL, PRIMARY, 1.0); + rayorigin(&thisray, PRIMARY, NULL, NULL); if (!localhit(&thisray, &thescene)) { error(COMMAND, "not a local object"); return; @@ -522,11 +522,15 @@ setparam( /* get/set program parameter */ if (s[0] == '\0') { (*dev->comout)( - "aa ab ad ar as av aw b dc dv dj ds dt i lr lw me ma mg ms ps pt sj st bv: "); + "aa ab ad ar as av aw b bv dc dv dj ds dt i lr lw me ma mg ms ps pt sj st u: "); (*dev->comin)(buf, NULL); s = buf; } switch (s[0]) { + case 'u': /* uncorrelated sampling */ + getparam(s+1, "uncorrelated sampling", 'b', + (void *)&rand_samp); + break; case 'l': /* limit */ switch (s[1]) { case 'w': /* weight */ @@ -719,7 +723,7 @@ char *s; return; } - rayorigin(&thisray, NULL, PRIMARY, 1.0); + rayorigin(&thisray, PRIMARY, NULL, NULL); rayvalue(&thisray); @@ -738,9 +742,9 @@ char *s; strcpy(matspec, "back of "); if (mod != NULL) { strcat(matspec, mod->oname); - if (mat != mod) - sprintf(matspec+strlen(matspec), " (%s)", - mat!=NULL ? mat->oname : VOIDID); + if (mat != mod && mat != NULL) + sprintf(matspec+strlen(matspec), + " (%s)", mat->oname); } else strcat(matspec, VOIDID); sprintf(buf, "ray hit %s %s \"%s\"", matspec,