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.

57 lines
1.3 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: LgDPolyPolygon.h
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of LgDPolyPolygon.h
  13. //----------------------------------------------------------------------------
  14. #ifndef __LG__D__POLY__POLYGON__H__INCLUDED__
  15. #define __LG__D__POLY__POLYGON__H__INCLUDED__
  16. #include "LgAux.h"
  17. #include "Templ.h"
  18. #include "LgDPolygon.h"
  19. template < class POLYGON >
  20. class CLgDPolyPolygon :
  21. public CLgArray<POLYGON>
  22. {
  23. public:
  24. virtual ~CLgDPolyPolygon(){}
  25. public:
  26. BOOL CrossProduct( CLgDPoint dp1, CLgDPoint dp2, CLgDLinePointArray &array, BOOL bGlueLines = FALSE )
  27. {
  28. for( INT i = 0; i < GetCount(); i++ )
  29. GetAt(i).CrossProduct( dp1, dp2, array, bGlueLines );
  30. return TRUE;
  31. }
  32. BOOL PtInPolygon( CLgDPoint pt )
  33. {
  34. for( INT i = 0; i < GetCount(); i++ )
  35. if( GetAt(i).PtInPolygon( pt ) )
  36. return TRUE;
  37. return FALSE;
  38. }
  39. INT Minimize()
  40. {
  41. INT nCount = 0;
  42. for( INT i = 0; i < GetCount(); i++ )
  43. nCount += GetAt(i).Minimize();
  44. return nCount;
  45. }
  46. };
  47. #endif