⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ptinpolygon.h

📁 测试点是否落在多边形内
💻 H
字号:
#pragma once

#define Global_Tolerance	1.0e-8

typedef struct _Point{
	double	x;
	double	y;
	_Point(){this->x = this->y = 0.0f;}
	_Point(double x, double y){this->x = x; this->y = y;}
	bool operator==(const _Point &pt) const
	{
		if(fabs(x-pt.x) < Global_Tolerance &&
			fabs(y-pt.y) < Global_Tolerance)
			return TRUE;
		else
			return FALSE;
	}
}Point;

int  PointInPolygon(const SHPObject *polygonObject, double x, double y);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -