triangulate.h

来自「一个开源的嵌入式flash播放器的源代码」· C头文件 代码 · 共 65 行

H
65
字号
// triangulate.h	-- Thatcher Ulrich 2004// This source code has been donated to the Public Domain.  Do// whatever you want with it.// Code to triangulate arbitrary 2D polygonal regions.#ifndef TRIANGULATE_H#define TRIANGULATE_H#include "base/container.h"#include "base/tu_types.h"namespace triangulate{	// Input is a list of closed paths that form the overall	// region.  The region does not need to be connected, and may	// contain holes/islands.  The paths should not intersect each	// other, or themselves.	// 	// The paths should be in counter-clockwise orientation,	// meaning that the inside of the shape is to the left of the	// directed path.  So a closed region is in CCW order, while	// an island inside a closed region is in CW (reverse) order.	//	// The output is a triangle list; each tri consists of 6	// coords: (x0, y0, x1, y1, x2, y2).	// Version using float coords	void	compute(		array<float>* results,		int path_count,		const array<float> paths[],		int debug_halt_step = -1,		array<float>* debug_remaining_loop = NULL);	// Version using short coords	void	compute(		array<sint16>* results,	// indexed trilist		int path_count,		const array<sint16> paths[],		int debug_halt_step = -1,		array<sint16>* debug_remaining_loop = NULL);	// Version using int coords	void	compute(		array<sint32>* results,	// indexed trilist		int path_count,		const array<sint32> paths[],		int debug_halt_step = -1,		array<sint32>* debug_remaining_loop = NULL);}#endif // TRIANGULATE// Local Variables:// mode: C++// c-basic-offset: 8 // tab-width: 8// indent-tabs-mode: t// End:

⌨️ 快捷键说明

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