home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / IRIT / POLY3DS.ZIP / VIEWOBJL.H < prev    next >
Encoding:
C/C++ Source or Header  |  1990-05-05  |  2.1 KB  |  56 lines

  1. /*****************************************************************************
  2. * General, local to module, definitions of View Object module.             *
  3. *****************************************************************************/
  4.  
  5. #ifndef    VIEW_OBJ_LH
  6. #define    VIEW_OBJ_LH
  7.  
  8. /* Interactive menu setup structure: */
  9. #define INTERACT_NUM_OF_STRINGS 3
  10. #define INTERACT_NUM_OF_SUB_WINDOWS 16
  11. #define INTERACT_SUB_WINDOW_HEIGHT 0.04          /* Actually half Height/Width. */
  12. #define INTERACT_SUB_WINDOW_WIDTH  0.3
  13.  
  14. #define MAX_ROTATE_ANGLE    45.0 /* Max. rates used by interactive mode. */
  15. #define MAX_TRANSLATE_FACTOR    2.0
  16. #define MAX_SCALE_FACTOR    2.0
  17. #define MAX_PERSP_FACTOR    2.0
  18. #define PERSPECTIVE_DEFAULT    -5
  19.  
  20. typedef struct InteractString {
  21.     double X, Y;
  22.     int Color;
  23.     char *Str;
  24. } InteractString;
  25. typedef struct InteractSubWindow {
  26.     double X, Y;                       /* Center points. */
  27.     int Color,
  28.     TextInside; /* If TRUE, Str will be in window, otherwise left to it. */
  29.     char *Str;
  30. } InteractSubWindow;
  31. typedef struct InteractWindowStruct {     /* The interactive menu structures. */
  32.     /* Rotate, Translate, Scale strings: */
  33.     InteractString Strings[INTERACT_NUM_OF_STRINGS];
  34.     InteractSubWindow SubWindows[INTERACT_NUM_OF_SUB_WINDOWS];
  35. } InteractWindowStruct;
  36.  
  37. /* Prototypes for the View Object module: */
  38. static void InteractDrawMenu(void);
  39. static void InteractHandleInput(FileDescription **FD, int NumOfObj,
  40.                             char **Objects);
  41. static void InteractUpdateMenu(char *Str, int Entry);
  42. static void ViewGeomObjectList(FileDescription **FD, int NumOfObjects,
  43.                             char **Objects);
  44. static void SaveCurrentMat(void);
  45. static ObjectStruct *SearchObject(FileDescription **FD, char *Object);
  46. static void DrawAllObjects(FileDescription **FD);
  47. static void VisitObjectTree(BinTree *PBinTree);
  48. static void ViewOneObject(ObjectStruct *PObject);
  49. static void ViewOnePolygon(PolygonStruct *PPolygon);
  50. static void MyMoveTo(float Coord[3]);
  51. static void MyDrawTo(float Coord[3]);
  52. static void SetDrawColor(int Color);
  53. static void TestQuitView(void);
  54.  
  55. #endif    VIEW_OBJ_LH
  56.