cell.h

来自「source code to compute the visibility po」· C头文件 代码 · 共 80 行

H
80
字号
/* Brian O'Connor * * cell.h: functions & data structures for creating cell decomposition */#ifndef CELL_H#define CELL_H#include "input.h"#include "line.h"//#define CELL_INTS  150#define CELL_INTS  250class Obstacle;class PInfo;class VPoly;class PGAdjInfo;/* all obstacles in the world */class WorldInfo {public:	int nObs;	Obstacle *robot;	Obstacle **obs;	Obstacle *border;};/* all obstacle edges */class EdgeInfo {public:	~EdgeInfo();	int nEdges;	int firstEdge; /* edge where we start iterations */	Line **edges;};class CellEdge: public Line {public:	CellEdge(Point *p1, Point *p2) : Line(p1, p2) { adjInfo = NULL; };	CellEdge *dual;	Cell *cell;	Cell *dualCell;	PGAdjInfo *adjInfo; // for graph search};class Cell {/* incomplete */public:	int nEdges;	int nGapEdges;	CellEdge **edges;	Point *pt; /* pt for roadmap */	VPoly *vPoly; /* visibility polygon from roadmap pt */};class CellInfo {public:	int nEdges;	CellEdge **edges;	int nCells;	Cell **cells;};void BuildDecomposition(char *file, PInfo *pInfo);void RebuildDecomposition(PInfo *pInfo1, PInfo *pInfo2);int OpenEdgeTest(Obstacle *ob, Point *p1, Point *p2);int InsideTest(Line *l, Point *p1, Point *p2);int IsPointAdjacent(Obstacle *ob, Point *p1, Point *p2);void RemoveCell(CellInfo *cells, int i);#endif /* CELL_H */

⌨️ 快捷键说明

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