home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / System / Mesa-3.1 / src-glu / tess_typedefs.h < prev    next >
C/C++ Source or Header  |  1999-12-06  |  3KB  |  109 lines

  1. /* $Id: tess_typedefs.h,v 1.9.2.5 1999/12/05 17:01:17 gareth Exp $ */
  2.  
  3. /*
  4.  * Mesa 3-D graphics library
  5.  * Version:  3.1
  6.  *
  7.  * Copyright (C) 1999  Brian Paul   All Rights Reserved.
  8.  *
  9.  * Permission is hereby granted, free of charge, to any person obtaining a
  10.  * copy of this software and associated documentation files (the "Software"),
  11.  * to deal in the Software without restriction, including without limitation
  12.  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  13.  * and/or sell copies of the Software, and to permit persons to whom the
  14.  * Software is furnished to do so, subject to the following conditions:
  15.  *
  16.  * The above copyright notice and this permission notice shall be included
  17.  * in all copies or substantial portions of the Software.
  18.  *
  19.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  20.  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  21.  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
  22.  * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  23.  * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  24.  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  25.  */
  26.  
  27. /*****************************************************************************
  28.  *
  29.  * GLU 1.3 Polygon Tessellation by Gareth Hughes <garethh@bell-labs.com>
  30.  *
  31.  *****************************************************************************/
  32.  
  33. #ifndef __GLU_TESS_TYPEDEFS_H__
  34. #define __GLU_TESS_TYPEDEFS_H__
  35.  
  36. #include <stdarg.h>
  37. #include <stdio.h>
  38.  
  39. #include "gluP.h"
  40.  
  41. #include "tess_hash.h"
  42.  
  43. #ifdef __cplusplus
  44. extern "C" {
  45. #endif
  46.  
  47. /*****************************************************************************
  48.  * Tessellation type definitions:
  49.  *****************************************************************************/
  50. typedef struct
  51. {
  52.     void (GLCALLBACK *begin)( GLenum );
  53.     void (GLCALLBACK *beginData)( GLenum , void * );
  54.     void (GLCALLBACK *edgeFlag)( GLboolean );
  55.     void (GLCALLBACK *edgeFlagData)( GLboolean , void * );
  56.     void (GLCALLBACK *vertex)( void * );
  57.     void (GLCALLBACK *vertexData)( void *, void * );
  58.     void (GLCALLBACK *end)( void );
  59.     void (GLCALLBACK *endData)( void * );
  60.     void (GLCALLBACK *error)( GLenum );
  61.     void (GLCALLBACK *errorData)( GLenum , void * );
  62.     void (GLCALLBACK *combine)( GLdouble[3], void *[4],
  63.                 GLfloat[4], void ** );
  64.     void (GLCALLBACK *combineData)( GLdouble[3], void *[4],
  65.                     GLfloat[4], void **,
  66.                     void * );
  67. } tess_callbacks_t;
  68.  
  69. typedef struct
  70. {
  71.     GLdouble        normal[3];
  72.     GLdouble        dist;
  73. } tess_plane_t;
  74.  
  75. typedef struct vertex_s
  76. {
  77.     GLint        index;
  78.     void        *data;
  79.     GLdouble        coords[3];
  80.     GLdouble        v[2];
  81.     GLboolean        edge_flag;
  82.     GLdouble        side;
  83.     GLdouble        angle;
  84.     struct vertex_s    *next, *prev;
  85. } tess_vertex_t;
  86.  
  87. typedef struct contour_s
  88. {
  89.     GLenum        type;
  90.     tess_plane_t    plane;
  91.     GLdouble        area;
  92.     GLenum        orientation;
  93.     GLuint        label;
  94.     GLint        winding;
  95.     GLdouble        rotx, roty;
  96.     GLdouble        mins[2], maxs[2];
  97.     GLint        num_vertices;
  98.     tess_vertex_t    *vertices, *last_vertex;
  99.     hashtable_t        *reflex_vertices;
  100.     struct contour_s    *parent;
  101.     struct contour_s    *next, *prev;
  102. } tess_contour_t;
  103.  
  104. #ifdef __cplusplus
  105. }
  106. #endif
  107.  
  108. #endif /* __GLU_TESS_TYPEDEFS_H__ */
  109.