4 |
|
*/ |
5 |
|
#ifndef _MGF_PARSER_H_ |
6 |
|
#define _MGF_PARSER_H_ |
7 |
– |
#ifdef __cplusplus |
8 |
– |
extern "C" { |
9 |
– |
#endif |
7 |
|
|
8 |
|
/* must include stdio.h and stdlib.h before us */ |
9 |
|
|
10 |
|
#include "ccolor.h" |
11 |
|
|
12 |
+ |
#ifdef __cplusplus |
13 |
+ |
extern "C" { |
14 |
+ |
#endif |
15 |
+ |
|
16 |
|
#define MG_VMAJOR 2 /* major version number */ |
17 |
|
#define MG_VMINOR 0 /* minor version number */ |
18 |
|
|
202 |
|
|
203 |
|
typedef struct { |
204 |
|
int clock; /* incremented each change -- resettable */ |
205 |
< |
char *client_data; /* pointer to private client-owned data */ |
205 |
> |
void *client_data; /* pointer to private client-owned data */ |
206 |
|
int sided; /* 1 if surface is 1-sided, 0 for 2-sided */ |
207 |
|
float nr, ni; /* index of refraction, real and imaginary */ |
208 |
|
float rd; /* diffuse reflectance */ |
221 |
|
|
222 |
|
typedef struct { |
223 |
|
int clock; /* incremented each change -- resettable */ |
224 |
< |
char *client_data; /* pointer to private client-owned data */ |
224 |
> |
void *client_data; /* pointer to private client-owned data */ |
225 |
|
FVECT p, n; /* point and normal */ |
226 |
|
} C_VERTEX; /* vertex context */ |
227 |
|
|
340 |
|
/* cvrgb.c */ |
341 |
|
extern void mgf2rgb(C_COLOR *cin, double intensity, float cout[3]); |
342 |
|
|
342 |
– |
|
343 |
|
/************************************************************************ |
344 |
|
* Miscellaneous definitions |
345 |
|
*/ |
350 |
|
#else |
351 |
|
#define PI 3.14159265358979323846 |
352 |
|
#endif |
353 |
– |
#endif |
354 |
– |
|
355 |
– |
#ifndef MEM_PTR |
356 |
– |
#define MEM_PTR void * |
353 |
|
#endif |
354 |
|
|
355 |
|
#ifdef __cplusplus |