home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Graphics / Plotting / NXplot3d.3.2 / Source / PControl.h < prev    next >
Encoding:
Text File  |  1994-09-26  |  3.6 KB  |  141 lines

  1. /* PControl.h  Copyright 1992 Steve Ludtke */
  2.  
  3. /* This object is basically just a switchboard for messages from various */
  4. /* controls <-> views. It helps to simplify the Plot3DView object */
  5.  
  6. #import <objc/Object.h>
  7. #import "Plot3DView.h"
  8. #import <appkit/color.h>
  9.  
  10. #define ANIM_spin    1
  11. #define ANIM_t        2
  12.  
  13. @interface PControl:Object
  14. {
  15. id minX;        /* min/max coords for currently displayed region */
  16. id maxX;
  17. id minY;
  18. id maxY;
  19. id minZ;
  20. id maxZ;
  21. id dminZ;
  22. id dmaxZ;
  23. id dzSwitch;
  24. id symsel;        /* Symbol selector Matrix */
  25. id color1;        /* colors for mapping */
  26. id color2;
  27. id color3;
  28. id color4;
  29. id color5;
  30. id alpha;
  31. id colortype;    /* type of mapping to use */
  32. id colorsel;    /* matrix of toggles */
  33. id ffSel;        /* formula/file switch */
  34. id varSli;        /* variable slider matrix */
  35. id varText;        /* varibale text matrix */
  36. id varMin;        /* variable min. matrix */
  37. id varMax;        /* variable max. matrix */
  38. id equation;        /* ScrollView containing the equation */
  39. id d3View;        /* Points to the Plot3DView object */
  40. id dView;        /* Points to the DensView object */
  41. id gridx;        /* Selector for # points (x & y) */
  42. id gridy;
  43. id camera;        /* renderman camera */
  44. id errMsg;        /* error/message panel objects */
  45. id errTitle;
  46. id errPan;
  47. id I_BOX;        /* display box for inspectors */
  48. id I_lim;        /* Limits inspector */
  49. id I_dis;        /* display options inspector */
  50. id I_pho;        /* photorealistic inspector */
  51. id autoCont;    /* auto contour switch */
  52. id levels;        /* contour level matrix */
  53. id animFlag;    /* animation flags */
  54. id animFrames;    /* #frames in anim */
  55. id demAsp;        /* DEM file fixed aspect ratio flag */
  56. int curPref;        /* Current data set displayed in the inspector */
  57. SetPref *pref;        /* Data set preferences (& data pointers) */
  58. char *bpath;        /* points to the path for the .app bundle */
  59. float sMM[4];        /* storage for store & recall */
  60. }
  61.  
  62. /* Initialization */
  63. -init;
  64.  
  65. /* Display preferences for selected data set. [[sender selectedCell] tag] */
  66. /* is used to decide which set to display */
  67. -disPref:sender;
  68.  
  69. /* Store preferences for current data set (OK button) */
  70. -stoPref:sender;
  71.  
  72. /* Read a data file into a data set */
  73. -readFile:sender;
  74.  
  75. /* Read a scatter data file into a data set */
  76. -readSFile:sender;
  77.  
  78. /* Read a processed DEM file into a data set */
  79. -readDEM:sender;
  80.  
  81. /* Return a data set to equation mode */
  82. -clearFile:sender;
  83.  
  84. /* Takes PControl min/max values and sends them to the Plot3DView */
  85. -setMinMax:sender;
  86.  
  87. /* Store current x/y min/max for later recall */
  88. -stoMM:sender;
  89.  
  90. /* recall x/y min/max */
  91. -rclMM:sender;
  92.  
  93. /* called by the Plot3DView to allow min/max Z values to be overrided */
  94. /* and/or displayed */
  95. -minmaxZ:(float *)minZ :(float *)maxZ;
  96.  
  97. /* zooms out by a fixed factor */
  98. -zoomOut:sender;
  99.  
  100. /* zooms in by a fixed factor */
  101. -zoomIn:sender;
  102.  
  103. /* This routine is called by the Plot3DView once after all the objects */
  104. /* have been initialized. It passes the preferences array.*/
  105. -startup:(SetPref *)Pref;
  106.  
  107. /* sets the PControl's max/min values */
  108. -setMM:(float)minX :(float)maxX :(float)minY :(float)maxY;
  109.  
  110. /* variable slider changed */
  111. -setVarS:sender;
  112.  
  113. /* variable text changed */
  114. -setVarT:sender;
  115.  
  116. /* new var min/max */
  117. -setVarMinMax:sender;
  118.  
  119. /* receives the zoomTo messages from the DensView. Note that passed */
  120. /* min/max values are from 0.0 to 1.0, not acutal units */
  121. -zoomTo:(float)minx :(float)miny :(float)maxx :(float)maxy;
  122.  
  123. /* update density plot , tick origin and spacing*/
  124. -updDen:(RtPoint)TickO :(RtPoint)TickS;
  125.  
  126. /* save contour/density plot to ~/plot3d.tiff */
  127. -dumpContour;
  128.  
  129. /* save an ascii data file of the data */
  130. -saveData:sender;
  131.  
  132. /* new inspector */
  133. -newInsp:sender;
  134.  
  135. /* Start rendering an animation */
  136. -makeAnim:sender;
  137.  
  138. -error:(char *)msg;
  139. -message:(char *)s1 :(char *)s2;
  140. @end
  141.