Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
2.5 KiB

  1. #ifndef __sweep_h_
  2. #define __sweep_h_
  3. /*
  4. ** Copyright 1994, Silicon Graphics, Inc.
  5. ** All Rights Reserved.
  6. **
  7. ** This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  8. ** the contents of this file may not be disclosed to third parties, copied or
  9. ** duplicated in any form, in whole or in part, without the prior written
  10. ** permission of Silicon Graphics, Inc.
  11. **
  12. ** RESTRICTED RIGHTS LEGEND:
  13. ** Use, duplication or disclosure by the Government is subject to restrictions
  14. ** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  15. ** and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  16. ** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  17. ** rights reserved under the Copyright Laws of the United States.
  18. **
  19. ** Author: Eric Veach, July 1994.
  20. */
  21. #include "mesh.h"
  22. /* __gl_computeInterior( tess ) computes the planar arrangement specified
  23. * by the given contours, and further subdivides this arrangement
  24. * into regions. Each region is marked "inside" if it belongs
  25. * to the polygon, according to the rule given by tess->windingRule.
  26. * Each interior region is guaranteed be monotone.
  27. */
  28. void __gl_computeInterior( GLUtesselator *tess );
  29. /* The following is here *only* for access by debugging routines */
  30. #include "dict.h"
  31. /* For each pair of adjacent edges crossing the sweep line, there is
  32. * an ActiveRegion to represent the region between them. The active
  33. * regions are kept in sorted order in a dynamic dictionary. As the
  34. * sweep line crosses each vertex, we update the affected regions.
  35. */
  36. struct ActiveRegion {
  37. GLUhalfEdge *eUp; /* upper edge, directed right to left */
  38. DictNode *nodeUp; /* dictionary node corresponding to eUp */
  39. int windingNumber; /* used to determine which regions are
  40. * inside the polygon */
  41. GLboolean inside; /* is this region inside the polygon? */
  42. GLboolean sentinel; /* marks fake edges at t = +/-infinity */
  43. GLboolean dirty; /* marks regions where the upper or lower
  44. * edge has changed, but we haven't checked
  45. * whether they intersect yet */
  46. GLboolean fixUpperEdge; /* marks temporary edges introduced when
  47. * we process a "right vertex" (one without
  48. * any edges leaving to the right) */
  49. };
  50. #define RegionBelow(r) ((ActiveRegion *) dictKey(dictPred((r)->nodeUp)))
  51. #define RegionAbove(r) ((ActiveRegion *) dictKey(dictSucc((r)->nodeUp)))
  52. #endif