| 1 |
– |
/* Copyright (c) 1992 Regents of the University of California */ |
| 2 |
– |
|
| 1 |
|
#ifndef lint |
| 2 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
| 2 |
> |
static const char RCSid[] = "$Id$"; |
| 3 |
|
#endif |
| 6 |
– |
|
| 4 |
|
/* |
| 5 |
|
* oconv.c - main program for object to octree conversion. |
| 6 |
|
* |
| 19 |
|
|
| 20 |
|
#define OMARGIN (10*FTINY) /* margin around global cube */ |
| 21 |
|
|
| 22 |
< |
#define MAXOBJFIL 63 /* maximum number of scene files */ |
| 22 |
> |
#define MAXOBJFIL 127 /* maximum number of scene files */ |
| 23 |
|
|
| 24 |
|
char *progname; /* argv[0] */ |
| 25 |
|
|
| 27 |
|
|
| 28 |
|
int objlim = 5; /* # of objects before split */ |
| 29 |
|
|
| 30 |
< |
int resolu = 1024; /* octree resolution limit */ |
| 30 |
> |
int resolu = 8192; /* octree resolution limit */ |
| 31 |
|
|
| 32 |
|
CUBE thescene = {EMPTY, {0.0, 0.0, 0.0}, 0.0}; /* our scene */ |
| 33 |
|
|
| 36 |
|
|
| 37 |
|
double mincusize; /* minimum cube size from resolu */ |
| 38 |
|
|
| 39 |
< |
int (*addobjnotify[])() = {NULL}; /* new object notifier functions */ |
| 39 |
> |
void (*addobjnotify[])() = {NULL}; /* new object notifier functions */ |
| 40 |
|
|
| 41 |
|
|
| 42 |
|
main(argc, argv) /* convert object files to an octree */ |
| 43 |
|
int argc; |
| 44 |
< |
char **argv; |
| 44 |
> |
char *argv[]; |
| 45 |
|
{ |
| 49 |
– |
extern char *getenv(); |
| 46 |
|
FVECT bbmin, bbmax; |
| 47 |
|
char *infile = NULL; |
| 48 |
|
int inpfrozen = 0; |
| 57 |
|
for (i = 1; i < argc && argv[i][0] == '-'; i++) |
| 58 |
|
switch (argv[i][1]) { |
| 59 |
|
case '\0': /* scene from stdin */ |
| 64 |
– |
outflags &= ~IO_FILES; |
| 60 |
|
goto breakopt; |
| 61 |
|
case 'i': /* input octree */ |
| 62 |
|
infile = argv[++i]; |
| 157 |
|
} |
| 158 |
|
|
| 159 |
|
|
| 160 |
+ |
void |
| 161 |
|
quit(code) /* exit program */ |
| 162 |
|
int code; |
| 163 |
|
{ |
| 165 |
|
} |
| 166 |
|
|
| 167 |
|
|
| 168 |
+ |
void |
| 169 |
|
cputs() /* interactive error */ |
| 170 |
|
{ |
| 171 |
|
/* referenced, but not used */ |
| 172 |
|
} |
| 173 |
|
|
| 174 |
|
|
| 175 |
+ |
void |
| 176 |
|
wputs(s) /* warning message */ |
| 177 |
|
char *s; |
| 178 |
|
{ |
| 181 |
|
} |
| 182 |
|
|
| 183 |
|
|
| 184 |
+ |
void |
| 185 |
|
eputs(s) /* put string to stderr */ |
| 186 |
|
register char *s; |
| 187 |
|
{ |