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.

83 lines
2.1 KiB

  1. #ifndef __glutrimline_h_
  2. #define __glutrimline_h_
  3. /**************************************************************************
  4. * *
  5. * Copyright (C) 1992, Silicon Graphics, Inc. *
  6. * *
  7. * These coded instructions, statements, and computer programs contain *
  8. * unpublished proprietary information of Silicon Graphics, Inc., and *
  9. * are protected by Federal copyright law. They may not be disclosed *
  10. * to third parties or copied or duplicated in any form, in whole or *
  11. * in part, without the prior written consent of Silicon Graphics, Inc. *
  12. * *
  13. **************************************************************************/
  14. /*
  15. * trimline.h - $Revision: 1.1 $
  16. */
  17. class Arc;
  18. class Backend;
  19. #include "trimvert.h"
  20. #include "jarcloc.h"
  21. class Trimline {
  22. private:
  23. TrimVertex** pts;
  24. long numverts;
  25. long i;
  26. long size;
  27. Jarcloc jarcl;
  28. TrimVertex t, b;
  29. TrimVertex *tinterp, *binterp;
  30. void reset( void ) { numverts = 0; }
  31. inline void grow( long );
  32. inline void swap( void );
  33. inline void append( TrimVertex * );
  34. static long interpvert( TrimVertex *, TrimVertex *, TrimVertex *, REAL );
  35. public:
  36. Trimline();
  37. ~Trimline();
  38. void init( TrimVertex * );
  39. void init( long, Arc *, long );
  40. void getNextPt( void );
  41. void getPrevPt( void );
  42. void getNextPts( REAL, Backend & );
  43. void getPrevPts( REAL, Backend & );
  44. void getNextPts( Arc * );
  45. void getPrevPts( Arc * );
  46. inline TrimVertex * next( void );
  47. inline TrimVertex * prev( void );
  48. inline TrimVertex * first( void );
  49. inline TrimVertex * last( void );
  50. };
  51. inline TrimVertex *
  52. Trimline::next( void )
  53. {
  54. if( i < numverts) return pts[i++]; else return 0;
  55. }
  56. inline TrimVertex *
  57. Trimline::prev( void )
  58. {
  59. if( i >= 0 ) return pts[i--]; else return 0;
  60. }
  61. inline TrimVertex *
  62. Trimline::first( void )
  63. {
  64. i = 0; return pts[i];
  65. }
  66. inline TrimVertex *
  67. Trimline::last( void )
  68. {
  69. i = numverts; return pts[--i];
  70. }
  71. #endif /* __glutrimline_h_ */