36 |
|
* as simple as we can. Global variables and their defaults |
37 |
|
* are defined below, and including "ray.h" declares these |
38 |
|
* along with all the routines you are likely to need. First, |
39 |
< |
* assign the global variable progname to your argv[0], then |
40 |
< |
* change the rendering parameters as you like. If you have a set |
41 |
< |
* of option arguments you are working from, the getrenderopt(ac,av) |
39 |
> |
* assign the global variable progname by calling fixargv0(argv[0]), |
40 |
> |
* then change the rendering parameters as you like. If you have a |
41 |
> |
* set of option arguments you are working from, the getrenderopt() |
42 |
|
* call should be very useful. Before tracing any rays, you |
43 |
|
* must read in the octree with a call to ray_init(oct). |
44 |
|
* Passing NULL for the file name causes ray_init() to read |
103 |
|
#include "font.h" |
104 |
|
#include "pmapray.h" |
105 |
|
|
106 |
– |
char *progname = "unknown_app"; /* caller sets to argv[0] */ |
107 |
– |
|
106 |
|
char *octname; /* octree name we are given */ |
107 |
|
|
108 |
|
CUBE thescene; /* our scene */ |
110 |
|
|
111 |
|
int dimlist[MAXDIM]; /* sampling dimensions */ |
112 |
|
int ndims = 0; /* number of sampling dimensions */ |
113 |
< |
int samplendx = 0; /* index for this sample */ |
113 |
> |
unsigned long samplendx = 0; /* index for this sample */ |
114 |
|
|
115 |
|
void (*trace)() = NULL; /* trace call */ |
116 |
|
|
155 |
|
int ambincl = -1; /* include == 1, exclude == 0 */ |
156 |
|
|
157 |
|
|
158 |
< |
static void |
158 |
> |
void |
159 |
|
reset_random(void) /* re-initialize random number generator */ |
160 |
|
{ |
161 |
|
if (rand_samp) { |