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
51 lines
1.2 KiB
//----------------------------------------------------------------------------
|
|
// Laser Guard Ltd.
|
|
// Copyright © 2000-2002. All Rights Reserved.
|
|
// Version 1.0 01/01/2000
|
|
// Last modification: 08/10/2003
|
|
// PROJECT:
|
|
// SUBSYSTEM:
|
|
// FILE: LgDPolygon.h
|
|
// AUTHOR: Sergey Chizhevskiy
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Header file of LgDPolygon.h
|
|
//----------------------------------------------------------------------------
|
|
#ifndef __LG__D__POLYGON__H__INCLUDED__
|
|
#define __LG__D__POLYGON__H__INCLUDED__
|
|
|
|
#include "LgAux.h"
|
|
#include "Templ.h"
|
|
|
|
struct CLgDLinePoint : CLgDPoint
|
|
{
|
|
BOOL bBegin;
|
|
};
|
|
|
|
class CLgDLinePointArray : public CLgArray<CLgDLinePoint>
|
|
{
|
|
};
|
|
|
|
class CLgDPolygon :
|
|
public CLgArray<CLgDPoint,CLgDPoint&>
|
|
{
|
|
public:
|
|
CLgDPolygon();
|
|
virtual ~CLgDPolygon();
|
|
|
|
public:
|
|
CLgDPolygon& operator = ( CLgDPolygon& polygon );
|
|
|
|
public:
|
|
BOOL CrossProduct( CLgDPoint dp1, CLgDPoint dp2, CLgDLinePointArray &array, BOOL bGlueLines = FALSE );
|
|
|
|
BOOL PtInPolygon( CLgDPoint pt );
|
|
|
|
INT Minimize();
|
|
|
|
private:
|
|
BOOL CrossProduct_( CLgDPoint dp1, CLgDPoint dp2, CLgDLinePointArray &array, BOOL bGlueLines );
|
|
BOOL PtInPolygon_( CLgDPoint pt );
|
|
};
|
|
|
|
#endif
|