struct QTREENODE
{
	QTREENODE();
	~QTREENODE();
	// Access children by name or by index
	union
	{
		QTREENODE* children[4];
		struct CHILDREN
		{
			QTREENODE* top_left;
			QTREENODE* top_right;
			QTREENODE* bottom_left;
			QTREENODE* bottom_right;
		} named;
	};
	// Calculates the center vertex of this quad tree cell
	VERTEX center(void) const { return VERTEX((min.x+max.x)*0.5f,(min.y+max.y)*0.5f); }
	VERTEX min,max; // Geometric extents
	bool occupied; // Raised if this cell is occupied (completely or partially) by an obstacle
	std::vector<qtreenode*> neighbours; // Adjacency information
	// Path finding info
	QTREENODE* path_previous_node;
	real total_g;
	real local_h;
};في 14 مارس 2009 04:40 ص، عقد عبد اللطيف حاجي علي حاجبيه بتفكير وقال:
حاول ما يلي: