home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / procssng / ccs / ccs-11tl.lha / lbl / hips / sources / 3dscale_geom / scaleg.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-30  |  1.0 KB  |  29 lines

  1. /* $Header: scaleg.h,v 3.0 88/10/10 13:52:11 ph Locked $ */
  2.  
  3. /* #define DEBUG  */
  4. #define UNDEF PIXEL_UNDEFINED
  5. #define Calloc(a,b) (b *) calloc((unsigned)(a), sizeof(b))
  6.  
  7. /* the mapping from discrete dest coord b to continuous source coord: */
  8. #define MAP(b, scale, offset)  ((b)+(offset))/(scale)
  9.  
  10.  
  11. typedef struct {    /* SOURCE TO DEST COORDINATE MAPPING */
  12.     double sx, sy, sz;    /* x and y scales */
  13.     double tx, ty, tz;    /* x and y translations */
  14.     double ux, uy, uz;    /* x and y offset used by MAP, private fields */
  15. } Mapping;
  16.  
  17. typedef struct {    /* ZOOM-SPECIFIC FILTER PARAMETERS */
  18.     double scale;    /* filter scale (spacing between centers in a space) */
  19.     double supp;    /* scaled filter support radius */
  20.     int wid;        /* filter width: max number of nonzero samples */
  21. } Filtpar;
  22.  
  23. /* see explanation in zoom.c */
  24.  
  25. extern int zoom_debug;
  26. extern int zoom_coerce;    /* simplify filters if possible? */
  27. extern int zoom_xy;    /* filter x before y (1) or vice versa (0)? */
  28. extern int zoom_trimzeros;    /* trim zeros from filter weight table? */
  29.