Old fashion design for PC-104
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.

51 lines
1.2 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 01/01/2000
  5. // Last modification: 08/10/2003
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: LgDPolygon.h
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of LgDPolygon.h
  13. //----------------------------------------------------------------------------
  14. #ifndef __LG__D__POLYGON__H__INCLUDED__
  15. #define __LG__D__POLYGON__H__INCLUDED__
  16. #include "LgAux.h"
  17. #include "Templ.h"
  18. struct CLgDLinePoint : CLgDPoint
  19. {
  20. BOOL bBegin;
  21. };
  22. class CLgDLinePointArray : public CLgArray<CLgDLinePoint>
  23. {
  24. };
  25. class CLgDPolygon :
  26. public CLgArray<CLgDPoint,CLgDPoint&>
  27. {
  28. public:
  29. CLgDPolygon();
  30. virtual ~CLgDPolygon();
  31. public:
  32. CLgDPolygon& operator = ( CLgDPolygon& polygon );
  33. public:
  34. BOOL CrossProduct( CLgDPoint dp1, CLgDPoint dp2, CLgDLinePointArray &array, BOOL bGlueLines = FALSE );
  35. BOOL PtInPolygon( CLgDPoint pt );
  36. INT Minimize();
  37. private:
  38. BOOL CrossProduct_( CLgDPoint dp1, CLgDPoint dp2, CLgDLinePointArray &array, BOOL bGlueLines );
  39. BOOL PtInPolygon_( CLgDPoint pt );
  40. };
  41. #endif