//---------------------------------------------------------------------------- // Laser Guard Ltd. // Copyright © 2000-2002. All Rights Reserved. // Version 1.0 01/01/2000 // Last modification: 08/10/2003 // PROJECT: // SUBSYSTEM: // FILE: LgDPolyPolygon.h // AUTHOR: Sergey Chizhevskiy // OVERVIEW // ~~~~~~~~ // Header file of LgDPolyPolygon.h //---------------------------------------------------------------------------- #ifndef __LG__D__POLY__POLYGON__H__INCLUDED__ #define __LG__D__POLY__POLYGON__H__INCLUDED__ #include "LgAux.h" #include "Templ.h" #include "LgDPolygon.h" template < class POLYGON > class CLgDPolyPolygon : public CLgArray { public: virtual ~CLgDPolyPolygon(){} public: BOOL CrossProduct( CLgDPoint dp1, CLgDPoint dp2, CLgDLinePointArray &array, BOOL bGlueLines = FALSE ) { for( INT i = 0; i < GetCount(); i++ ) GetAt(i).CrossProduct( dp1, dp2, array, bGlueLines ); return TRUE; } BOOL PtInPolygon( CLgDPoint pt ) { for( INT i = 0; i < GetCount(); i++ ) if( GetAt(i).PtInPolygon( pt ) ) return TRUE; return FALSE; } INT Minimize() { INT nCount = 0; for( INT i = 0; i < GetCount(); i++ ) nCount += GetAt(i).Minimize(); return nCount; } }; #endif