Back to index

radiance  4R0+20100331
Classes | Defines | Typedefs | Functions
warp3d.h File Reference
#include "lookup.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  grid3d
struct  WARP3D


#define W3EXACT   01 /* no interpolation (slow) */
#define W3FAST   02 /* discontinuous approx. (fast) */
#define W3OK   0 /* normal return status */
#define W3GAMUT   01 /* out of gamut */
#define W3BADMAP   02 /* singular map */
#define W3ERROR   04 /* system error (check errno) */
#define GNBITS   6 /* number of bits per grid size <= 8 */
#define MAXGN   (1<<GNBITS) /* maximum grid dimension */
#define W3VCPY(v1, v2)   ((v1)[0]=(v2)[0],(v1)[1]=(v2)[1],(v1)[2]=(v2)[2])


typedef unsigned char GNDX [3]
typedef float W3VEC [3]


int warp3d (W3VEC po, W3VEC pi, WARP3D *wp)
int add3dpt (WARP3D *wp, W3VEC pti, W3VEC pto)
WARP3Dnew3dw (int flgs)
WARP3Dload3dw (char *fn, WARP3D *wp)
void free3dw (WARP3D *wp)
int set3dwfl (WARP3D *wp, int flgs)

Class Documentation

struct grid3d

Definition at line 31 of file warp3d.h.

Collaboration diagram for grid3d:
Class Members
unsigned char flags
W3VEC gmin
W3VEC gstep
LUTAB gtab
struct WARP3D

Definition at line 38 of file warp3d.h.

Class Members
double d2max
double d2min
W3VEC * ip
W3VEC llim
int npts
W3VEC * ov
W3VEC ulim

Define Documentation

#define GNBITS   6 /* number of bits per grid size <= 8 */

Definition at line 24 of file warp3d.h.

#define MAXGN   (1<<GNBITS) /* maximum grid dimension */

Definition at line 25 of file warp3d.h.

#define W3BADMAP   02 /* singular map */

Definition at line 21 of file warp3d.h.

#define W3ERROR   04 /* system error (check errno) */

Definition at line 22 of file warp3d.h.

#define W3EXACT   01 /* no interpolation (slow) */

Definition at line 15 of file warp3d.h.

#define W3FAST   02 /* discontinuous approx. (fast) */

Definition at line 16 of file warp3d.h.

#define W3GAMUT   01 /* out of gamut */

Definition at line 20 of file warp3d.h.

#define W3OK   0 /* normal return status */

Definition at line 19 of file warp3d.h.

#define W3VCPY (   v1,
)    ((v1)[0]=(v2)[0],(v1)[1]=(v2)[1],(v1)[2]=(v2)[2])

Definition at line 53 of file warp3d.h.

Typedef Documentation

typedef unsigned char GNDX[3]

Definition at line 27 of file warp3d.h.

typedef float W3VEC[3]

Definition at line 29 of file warp3d.h.

Function Documentation

int add3dpt ( WARP3D wp,
W3VEC  pti,
W3VEC  pto 
void free3dw ( WARP3D wp)
WARP3D* load3dw ( char *  fn,
WARP3D wp 

Definition at line 251 of file warp3d.c.

       FILE   *fp;
       W3VEC  inp, outp;

       if ((fp = fopen(fn, "r")) == NULL) {
              eputs(": cannot open\n");
       if (wp == NULL && (wp = new3dw(0)) == NULL)
              goto memerr;
       while (fgetvec(fp, inp) && fgetvec(fp, outp))
              if (!add3dpt(wp, inp, outp))
                     goto memerr;
       if (!feof(fp)) {
              wputs(": non-number in 3D warp file\n");
       goto cleanup;
       eputs("load3dw: out of memory\n");

Here is the call graph for this function:

Here is the caller graph for this function:

WARP3D* new3dw ( int  flgs)

Definition at line 228 of file warp3d.c.

       register WARP3D  *wp;

       if ((flgs & (W3EXACT|W3FAST)) == (W3EXACT|W3FAST)) {
              eputs("new3dw: only one of W3EXACT or W3FAST\n");
       if ((wp = (WARP3D *)malloc(sizeof(WARP3D))) == NULL) {
              eputs("new3dw: no memory\n");
       wp->ip = wp->ov = NULL;
       wp->npts = 0;
       wp->grid.flags = flgs;
       wp->[0] = wp->[1] = wp->[2] = 0;

Here is the call graph for this function:

Here is the caller graph for this function:

int set3dwfl ( WARP3D wp,
int  flgs 
int warp3d ( W3VEC  po,
W3VEC  pi,
WARP3D wp