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.

69 lines
1.8 KiB

  1. #ifndef __glugridtrimvertex_h_
  2. #define __glugridtrimvertex_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. * gridtrimvertex.h - $Revision: 1.1 $
  16. */
  17. #include "mystdlib.h"
  18. #include "bufpool.h"
  19. #include "trimvert.h"
  20. #include "gridvert.h"
  21. class GridTrimVertex : public PooledObj
  22. {
  23. private:
  24. TrimVertex dummyt;
  25. GridVertex dummyg;
  26. public:
  27. GridTrimVertex() { g = 0; t = 0; }
  28. TrimVertex *t;
  29. GridVertex *g;
  30. inline void set( long, long );
  31. inline void set( REAL, REAL );
  32. inline void set( TrimVertex * );
  33. inline void clear( void ) { t = 0; g = 0; };
  34. inline int isGridVert() { return g ? 1 : 0 ; }
  35. inline int isTrimVert() { return t ? 1 : 0 ; }
  36. inline void output();
  37. };
  38. inline void
  39. GridTrimVertex::set( long x, long y )
  40. {
  41. g = &dummyg;
  42. dummyg.gparam[0] = x;
  43. dummyg.gparam[1] = y;
  44. }
  45. inline void
  46. GridTrimVertex::set( REAL x, REAL y )
  47. {
  48. g = 0;
  49. t = &dummyt;
  50. dummyt.param[0] = x;
  51. dummyt.param[1] = y;
  52. dummyt.nuid = 0;
  53. }
  54. inline void
  55. GridTrimVertex::set( TrimVertex *v )
  56. {
  57. g = 0;
  58. t = v;
  59. }
  60. typedef GridTrimVertex *GridTrimVertex_p;
  61. #endif /* __glugridtrimvertex_h_ */