home *** CD-ROM | disk | FTP | other *** search
/ Superpower (Alt) / SUPERPOWER.iso / q / source / xyview.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-08  |  1.1 KB  |  67 lines

  1.  
  2. #import <appkit/appkit.h>
  3. #import "mathlib.h"
  4. #import "SetBrush.h"
  5.  
  6. extern    id xyview_i;
  7.  
  8. #define    MINSCALE    0.125
  9. #define    MAXSCALE    2.0
  10.  
  11.  
  12. extern    vec3_t        xy_viewnormal;        // v_forward for xy view
  13. extern    float        xy_viewdist;        // clip behind this plane
  14.  
  15. extern    NXRect    xy_draw_rect;
  16.  
  17. void linestart (float r, float g, float b);
  18. void lineflush (void);
  19. void linecolor (float r, float g, float b);
  20.  
  21. void XYmoveto (vec3_t pt);
  22. void XYlineto (vec3_t pt);
  23.  
  24. typedef enum {dr_wire, dr_flat, dr_texture} drawmode_t;
  25.  
  26.  
  27. @interface XYView :  View
  28. {
  29.     NXRect        realbounds, newrect, combinedrect;
  30.     NXPoint        midpoint;
  31.     int            gridsize;
  32.     float        scale;
  33.  
  34. // for textured view
  35.     int            xywidth, xyheight;
  36.     float        *xyzbuffer;
  37.     unsigned    *xypicbuffer;
  38.  
  39.     drawmode_t    drawmode;
  40.  
  41. // UI links
  42.     id            mode_radio_i;    
  43. }
  44.  
  45. - (float)currentScale;
  46.  
  47. - setModeRadio: m;
  48.  
  49. - drawMode: sender;
  50. - setDrawMode: (drawmode_t)mode;
  51.  
  52. - newSuperBounds;
  53. - newRealBounds: (NXRect *)nb;
  54.  
  55. - addToScrollRange: (float)x :(float)y;
  56. - setOrigin: (NXPoint *)pt scale: (float)sc;
  57. - centerOn: (vec3_t)org;
  58.  
  59. - drawMode: sender;
  60.  
  61. - superviewChanged;
  62.  
  63. - (int)gridsize;
  64. - (float)snapToGrid: (float)f;
  65.  
  66. @end
  67.