ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/px/warp3d.h
Revision: 3.3
Committed: Sat Feb 22 02:07:28 2003 UTC (21 years, 2 months ago) by greg
Content type: text/plain
Branch: MAIN
CVS Tags: rad3R5
Changes since 3.2: +1 -4 lines
Log Message:
Changes and check-in for 3.5 release
Includes new source files and modifications not recorded for many years
See ray/doc/notes/ReleaseNotes for notes between 3.1 and 3.5 release

File Contents

# Content
1 /* RCSid: $Id$ */
2 /*
3 * Header file for 3D warping routines.
4 */
5
6 #include "lookup.h"
7
8 /* interpolation flags */
9 #define W3EXACT 01 /* no interpolation (slow) */
10 #define W3FAST 02 /* discontinuous approx. (fast) */
11
12 /* return flags for warp3d() */
13 #define W3OK 0 /* normal return status */
14 #define W3GAMUT 01 /* out of gamut */
15 #define W3BADMAP 02 /* singular map */
16 #define W3ERROR 04 /* system error (check errno) */
17
18 #define GNBITS 6 /* number of bits per grid size <= 8 */
19 #define MAXGN (1<<GNBITS) /* maximum grid dimension */
20
21 typedef unsigned char GNDX[3]; /* grid index type */
22
23 typedef float W3VEC[3]; /* vector type for 3D warp maps */
24
25 struct grid3d {
26 unsigned char flags; /* interpolation flags */
27 GNDX gn; /* grid dimensions */
28 W3VEC gmin, gstep; /* grid corner and voxel size */
29 LUTAB gtab; /* grid lookup table */
30 }; /* a regular, sparse warping grid */
31
32 typedef struct {
33 W3VEC *ip, *ov; /* discrete input/displ. pairs */
34 int npts; /* number of point pairs */
35 W3VEC llim, ulim; /* lower and upper input limits */
36 double d2min, d2max; /* min. and max. point distance^2 */
37 struct grid3d grid; /* point conversion grid */
38 } WARP3D; /* a warp map */
39
40 extern WARP3D *new3dw(), *load3dw();
41
42 #define W3VCPY(v1,v2) ((v1)[0]=(v2)[0],(v1)[1]=(v2)[1],(v1)[2]=(v2)[2])