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

📄 globalfunctions.h

📁 VC实现等值线编成的COM组件的源程序代码
💻 H
字号:
#if !defined(XLD_GLOBALFUNCTIONS_H)
#define XLD_GLOBALFUNCTIONS_H

typedef enum trineighbor // 大于或等于0均为三角形的序号
{
	NEIGHBOR_NOT_EXISTED = -2,
	NEIGHBOR_UNKNOWN = -1
} TRINEIGHBOR ;

struct XYZ{			//定义点
	double x,y,z;
	
	bool operator==(const XYZ& right) const
	{
		if (x == right.x && y == right.y && z == right.z)
			return true;
		else
			return false;
	};

	XYZ(double x0, double y0, double z0 = 0 );
	XYZ();
} ;

struct TRIANGLE {	//	定义三角形
	int p1,p2,p3;	//	在顶点数组中的序号
	int t1;		//与此三角形共享边p2p3的另一个三角形
	int t2;		//与此三角形共享边p1p3的另一个三角形
	int t3;		//与此三角形共享边p1p2的另一个三角形

	TRIANGLE();
};

int compare( const void *elem1, const void *elem2 );

template<class T> bool ReMalloc(T **p, long len, long newlen)
{
	T *tmpP;
	tmpP = *p;
	if ( (*p = new T[newlen]) == NULL ) 
		return false;
	memcpy(*p, tmpP, sizeof(T) * len);
	delete []tmpP;
}

#endif

⌨️ 快捷键说明

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