home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / Mesa-1.2.1 / widgets / include / GL / MesaWorkstationP.h < prev   
Encoding:
C/C++ Source or Header  |  1995-07-05  |  2.5 KB  |  118 lines

  1. /* MesaWorkstationP.h -- Private header file for the Mesa Workstation widget
  2.    Copyright (C) 1995 Thorsten.Ohl @ Physik.TH-Darmstadt.de
  3.  
  4.    This library is free software; you can redistribute it and/or
  5.    modify it under the terms of the GNU Library General Public
  6.    License as published by the Free Software Foundation; either
  7.    version 2 of the License, or (at your option) any later version.
  8.  
  9.    This library is distributed in the hope that it will be useful,
  10.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.    GNU Library General Public License for more details.
  13.  
  14.    You should have received a copy of the GNU Library General Public
  15.    License along with this library; if not, write to the Free Software
  16.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18.    $Id: MesaWorkstationP.h,v 1.8 1995/05/19 20:30:59 ohl Exp $
  19.  */
  20.  
  21. #ifndef _MesaWorkstationP_h
  22. #define _MesaWorkstationP_h
  23.  
  24. #include <GL/MesaDrawingAreaP.h>
  25. #include <GL/MesaWorkstation.h>
  26.  
  27. typedef enum { NOPROJ, PROJ_MATRIX, PROJ_LIST, FRUSTUM, ORTHO } projtype;
  28.  
  29. typedef    struct
  30. {
  31.   GLdouble left, right;
  32.   GLdouble bottom, top;
  33.   GLdouble near, far;
  34. }
  35. volume;
  36.   
  37. typedef struct
  38. {
  39.   projtype type;
  40.   GLuint list;
  41.   union
  42.     {
  43.       GLdouble m[16];
  44.       volume vol;
  45.     }
  46.   u;
  47. }
  48. projection;
  49.  
  50. typedef enum { NOVIEW, VIEW_MATRIX, VIEW_LIST, LOOK_AT, POLAR } viewtype;
  51.  
  52. typedef    struct
  53. {
  54.   GLdouble eyex, eyey, eyez;
  55.   GLdouble ctrx, ctry, ctrz;
  56.   GLdouble upx, upy, upz;
  57. }
  58. look_at;
  59.   
  60. typedef    struct
  61. {
  62.   GLdouble r;
  63.   GLdouble theta;
  64.   GLdouble phi;
  65. }
  66. polar;
  67.  
  68. typedef struct
  69. {
  70.   viewtype type;
  71.   GLuint list;
  72.   union
  73.     {
  74.       GLdouble m[16];
  75.       look_at look_at;
  76.       polar polar;
  77.     }
  78.   u;
  79. }
  80. view;
  81.  
  82. typedef struct
  83.   {
  84.     char *RCS_Id;
  85.   }
  86. MesaWorkstationClassPart;
  87.  
  88. typedef struct _MesaWorkstationClassRec
  89.   {
  90.     CoreClassPart core_class;
  91.     GLwDrawingAreaClassPart glwDrawingArea_class;
  92.     MesaDrawingAreaClassPart mesaDrawingArea_class;
  93.     MesaWorkstationClassPart mesaWorkstation_class;
  94.   }
  95. MesaWorkstationClassRec;
  96. extern MesaWorkstationClassRec mesaWorkstationClassRec;
  97.  
  98. typedef struct
  99.   {
  100.     projection projection;
  101.     view view;
  102.     GLuint *objects;
  103.     GLuint *next_object;
  104.     size_t allocated_objects;
  105.   }
  106. MesaWorkstationPart;
  107.  
  108. typedef struct _MesaWorkstationRec
  109.   {
  110.     CorePart core;
  111.     GLwDrawingAreaPart glwDrawingArea;
  112.     MesaDrawingAreaPart mesaDrawingArea;
  113.     MesaWorkstationPart mesaWorkstation;
  114.   }
  115. MesaWorkstationRec;
  116.  
  117. #endif /* _MesaWorkstationP_h */
  118.