#ifndef INPOLY_H
#define INPOLY_H

/***************************************************************************
 *                                                                         *
 *   INPOLY.H                                                              *
 *                                                                         *
 *   Copyright (c) 1995-1996 Galacticomm, Inc.  Freeware source code.      *
 *                                                                         *
 *   Please feel free to use this source code for any purpose, commercial  *
 *   or otherwise, as long as you don't restrict anyone else's use of      *
 *   this source code.  Please give credit where credit is due.            *
 *                                                                         *
 *   Point-in-polygon algorithm, created especially for World-Wide Web     *
 *   servers to process image maps with mouse-clickable regions.           *
 *                                                                         *
 *   http://www.visibone.com/inpoly/inpoly.c                               *
 *                                                                         *
 *                                       6/19/95 - Bob Stein & Craig Yap   *
 *                                       stein@visibone.com                *
 *                                       craig@cse.fau.edu                 *
 *                                                                         *
 ***************************************************************************/

#include <QtCore/QtGlobal>

#ifdef INPOLY_DLL
#define INPOLY_DLLEXP Q_DECL_EXPORT
#else
#ifdef INPOLY_LOCAL
#define INPOLY_DLLEXP
#else
#define INPOLY_DLLEXP Q_DECL_IMPORT
#endif
#endif



INPOLY_DLLEXP
int                                /*   1=inside, 0=outside                */
inpolyd(                           /* is target point inside a 2D polygon? */
unsigned int **poly,            /*   polygon points, [0]=x, [1]=y       */
int npoints,                       /*   number of points in polygon        */
unsigned int xt,                   /*   x (horizontal) of target point     */
unsigned int yt)                   /*   y (vertical) of target point       */
;

INPOLY_DLLEXP
int                                /*   1=inside, 0=outside                */
inpolyf(                           /* is target point inside a 2D polygon? */
float *poly,		           /*   polygon points, [0]=x, [1]=y       */
int npoints,                       /*   number of points in polygon        */
float xt,			               /*   x (horizontal) of target point     */
float yt)                          /*   y (vertical) of target point       */
;

class QVector2D;
template<class elem> class QLinkedList;

INPOLY_DLLEXP
int                                /*   1=inside, 0=outside                */
inpolyp(                           /* is target point inside a 2D polygon? */
const QLinkedList<QVector2D> *poly,		           /*   polygon points, [0]=x, [1]=y       */
int npoints,                       /*   number of points in polygon        */
float xt,			               /*   x (horizontal) of target point     */
float yt)                          /*   y (vertical) of target point       */
;



#endif // INPOLY_H
