--- ray/src/px/xshowtrace.c 2004/03/28 20:33:14 2.10 +++ ray/src/px/xshowtrace.c 2014/04/11 20:27:23 2.13 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: xshowtrace.c,v 2.10 2004/03/28 20:33:14 schorsch Exp $"; +static const char RCSid[] = "$Id: xshowtrace.c,v 2.13 2014/04/11 20:27:23 greg Exp $"; #endif /* * Display an image and watch the rays get traced. @@ -15,13 +15,9 @@ static const char RCSid[] = "$Id: xshowtrace.c,v 2.10 #define MAXDEPTH 32 /* ridiculous ray tree depth */ -#ifdef SMLFLT -#define sscanvec(s,v) (sscanf(s,"%f %f %f",v,v+1,v+2)==3) -#else -#define sscanvec(s,v) (sscanf(s,"%lf %lf %lf",v,v+1,v+2)==3) -#endif +#define sscanvec(s,v) (sscanf(s,FVFORMAT,v,v+1,v+2)==3) -char rtcom[] = "rtrace -h- -otp -fa -x 1"; +char rtcom[64] = "rtrace -h- -otp -fa -x 1"; char xicom[] = "ximage -c 256"; VIEW ourview = STDVIEW; /* view for picture */ @@ -66,10 +62,12 @@ main( /* takes both the octree and the image */ for (i = 1; i < argc-2; i++) if (!strcmp(argv[i], "-s")) slow++; + else if (!strcmp(argv[i], "-T")) + strcat(rtcom, " -oTp"); else break; if (i > argc-2) { - fprintf(stderr, "Usage: %s [-s] [rtrace args] octree picture\n", + fprintf(stderr, "Usage: %s [-s][-T] [rtrace args] octree picture\n", progname); exit(1); }