| 2 |
|
/* |
| 3 |
|
* Definitions and declarations for 32-bit vector normal encode/decode |
| 4 |
|
* |
| 5 |
< |
* Include after stdio.h and fvect.h |
| 5 |
> |
* Include after rtio.h and fvect.h |
| 6 |
|
* Includes resolu.h |
| 7 |
|
*/ |
| 8 |
|
|
| 17 |
|
|
| 18 |
|
#define NORMAL32FMT "32-bit_encoded_normal" |
| 19 |
|
|
| 20 |
< |
#define HF_HEADIN 0x1 |
| 21 |
< |
#define HF_HEADOUT 0x2 |
| 22 |
< |
#define HF_RESIN 0x4 |
| 23 |
< |
#define HF_RESOUT 0x8 |
| 24 |
< |
#define HF_ALL 0xf |
| 25 |
< |
#define HF_ENCODE 0x10 |
| 20 |
> |
#define HF_HEADIN 0x1 /* expect input header */ |
| 21 |
> |
#define HF_HEADOUT 0x2 /* write header to stdout */ |
| 22 |
> |
#define HF_RESIN 0x4 /* expect resolution string */ |
| 23 |
> |
#define HF_RESOUT 0x8 /* write resolution to stdout */ |
| 24 |
> |
#define HF_STDERR 0x10 /* report errors to stderr */ |
| 25 |
> |
#define HF_ALL 0x1f /* all flags above */ |
| 26 |
> |
#define HF_ENCODE 0x20 /* we are encoding */ |
| 27 |
|
|
| 28 |
|
/* Structure for encoding/decoding normals */ |
| 29 |
|
typedef struct { |
| 30 |
|
FILE *finp; /* input stream */ |
| 31 |
|
const char *inpname; /* input name */ |
| 32 |
< |
int format; /* decoded format */ |
| 32 |
> |
short format; /* decoded format */ |
| 33 |
> |
short swapped; /* byte-swapped input */ |
| 34 |
|
long dstart; /* start of data */ |
| 35 |
|
long curpos; /* current input position */ |
| 36 |
< |
int hdrflags; /* header i/o flags */ |
| 36 |
> |
short hdrflags; /* header i/o flags */ |
| 37 |
|
char inpfmt[MAXFMTLEN]; /* format from header */ |
| 38 |
|
RESOLU res; /* input resolution */ |
| 39 |
|
} NORMCODEC; |