| 173 |
|
extern int isname(); /* non-zero if legal identifier name */ |
| 174 |
|
extern int badarg(); /* check argument format */ |
| 175 |
|
extern int e_include(); /* expand include entity */ |
| 176 |
+ |
extern int e_pipe(); /* expand piped command */ |
| 177 |
|
extern int e_sph(); /* expand sphere as other entities */ |
| 178 |
|
extern int e_torus(); /* expand torus as other entities */ |
| 179 |
|
extern int e_cyl(); /* expand cylinder as other entities */ |
| 190 |
|
extern int isname(char *); /* non-zero if legal identifier name */ |
| 191 |
|
extern int badarg(int, char **, char *);/* check argument format */ |
| 192 |
|
extern int e_include(int, char **); /* expand include entity */ |
| 193 |
+ |
extern int e_pipe(int, char **); /* expand piped command */ |
| 194 |
|
extern int e_sph(int, char **); /* expand sphere as other entities */ |
| 195 |
|
extern int e_torus(int, char **); /* expand torus as other entities */ |
| 196 |
|
extern int e_cyl(int, char **); /* expand cylinder as other entities */ |
| 251 |
|
#define C_CSEFF 020 /* flag if efficacy set */ |
| 252 |
|
|
| 253 |
|
typedef struct { |
| 254 |
< |
int clock; /* incremented each change */ |
| 255 |
< |
short flags; /* what's been set */ |
| 256 |
< |
short ssamp[C_CNSS]; /* spectral samples, min wl to max */ |
| 257 |
< |
long ssum; /* straight sum of spectral values */ |
| 258 |
< |
float cx, cy; /* xy chromaticity value */ |
| 259 |
< |
float eff; /* efficacy (lumens/watt) */ |
| 254 |
> |
int clock; /* incremented each change */ |
| 255 |
> |
char *client_data; /* pointer to private client-owned data */ |
| 256 |
> |
short flags; /* what's been set */ |
| 257 |
> |
short ssamp[C_CNSS]; /* spectral samples, min wl to max */ |
| 258 |
> |
long ssum; /* straight sum of spectral values */ |
| 259 |
> |
float cx, cy; /* xy chromaticity value */ |
| 260 |
> |
float eff; /* efficacy (lumens/watt) */ |
| 261 |
|
} C_COLOR; |
| 262 |
|
|
| 263 |
< |
#define C_DEFCOLOR { 1, C_CDXY|C_CSXY|C_CSSPEC|C_CSEFF,\ |
| 263 |
> |
#define C_DEFCOLOR { 1, NULL, C_CDXY|C_CSXY|C_CSSPEC|C_CSEFF,\ |
| 264 |
|
{C_CMAXV,C_CMAXV,C_CMAXV,C_CMAXV,C_CMAXV,\ |
| 265 |
|
C_CMAXV,C_CMAXV,C_CMAXV,C_CMAXV,C_CMAXV,C_CMAXV,\ |
| 266 |
|
C_CMAXV,C_CMAXV,C_CMAXV,C_CMAXV,C_CMAXV,C_CMAXV,\ |
| 276 |
|
|
| 277 |
|
typedef struct { |
| 278 |
|
int clock; /* incremented each change -- resettable */ |
| 279 |
+ |
char *client_data; /* pointer to private client-owned data */ |
| 280 |
|
int sided; /* 1 if surface is 1-sided, 0 for 2-sided */ |
| 281 |
|
float nr, ni; /* index of refraction, real and imaginary */ |
| 282 |
|
float rd; /* diffuse reflectance */ |
| 295 |
|
|
| 296 |
|
typedef struct { |
| 297 |
|
int clock; /* incremented each change -- resettable */ |
| 298 |
+ |
char *client_data; /* pointer to private client-owned data */ |
| 299 |
|
FVECT p, n; /* point and normal */ |
| 300 |
|
} C_VERTEX; /* vertex context */ |
| 301 |
|
|
| 302 |
< |
#define C_DEFMATERIAL {1,0,1.,0.,0.,C_DEFCOLOR,0.,C_DEFCOLOR,0.,C_DEFCOLOR,\ |
| 303 |
< |
0.,C_DEFCOLOR,0.,0.,C_DEFCOLOR,0.} |
| 304 |
< |
#define C_DEFVERTEX {1,{0.,0.,0.},{0.,0.,0.}} |
| 302 |
> |
#define C_DEFMATERIAL {1,NULL,0,1.,0.,0.,C_DEFCOLOR,0.,C_DEFCOLOR,0.,\ |
| 303 |
> |
C_DEFCOLOR,0.,C_DEFCOLOR,0.,0.,C_DEFCOLOR,0.} |
| 304 |
> |
#define C_DEFVERTEX {1,NULL,{0.,0.,0.},{0.,0.,0.}} |
| 305 |
|
|
| 306 |
|
extern C_COLOR *c_ccolor; /* the current color */ |
| 307 |
|
extern char *c_ccname; /* current color name */ |
| 463 |
|
|
| 464 |
|
#ifndef PI |
| 465 |
|
#ifdef M_PI |
| 466 |
< |
#define PI M_PI |
| 466 |
> |
#define PI ((double)M_PI) |
| 467 |
|
#else |
| 468 |
|
#define PI 3.14159265358979323846 |
| 469 |
|
#endif |