annotate engine/core/pathfinder/routepather/routepathersearch.h @ 697:ecaa4d98f05f tip

Abstracted the GUI code and refactored the GUIChan-specific code into its own module. * Most of the GUIChan code has been refactored into its own gui/guichan module. However, references to the GuiFont class still persist in the Engine and GuiManager code and these will need further refactoring. * GuiManager is now an abstract base class which specific implementations (e.g. GUIChan) should subclass. * The GUIChan GUI code is now a concrete implementation of GuiManager, most of which is in the new GuiChanGuiManager class. * The GUI code in the Console class has been refactored out of the Console and into the GUIChan module as its own GuiChanConsoleWidget class. The rest of the Console class related to executing commands was left largely unchanged. * Existing client code may need to downcast the GuiManager pointer received from FIFE::Engine::getGuiManager() to GuiChanGuiManager, since not all functionality is represented in the GuiManager abstract base class. Python client code can use the new GuiChanGuiManager.castTo static method for this purpose.
author M. George Hansen <technopolitica@gmail.com>
date Sat, 18 Jun 2011 00:28:40 -1000
parents 64738befdf3b
children
rev   line source
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
1 /***************************************************************************
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
2 * Copyright (C) 2005-2008 by the FIFE team *
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
3 * http://www.fifengine.de *
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
4 * This file is part of FIFE. *
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
5 * *
46
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
6 * FIFE is free software; you can redistribute it and/or *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
7 * modify it under the terms of the GNU Lesser General Public *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
8 * License as published by the Free Software Foundation; either *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
9 * version 2.1 of the License, or (at your option) any later version. *
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
10 * *
46
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
11 * This library is distributed in the hope that it will be useful, *
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
46
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
14 * Lesser General Public License for more details. *
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
15 * *
46
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
16 * You should have received a copy of the GNU Lesser General Public *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
17 * License along with this library; if not, write to the *
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
18 * Free Software Foundation, Inc., *
46
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
20 ***************************************************************************/
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
21
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
22 #ifndef FIFE_PATHFINDER_ROUTEPATHERSEARCH
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
23 #define FIFE_PATHFINDER_ROUTEPATHERSEARCH
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
24
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
25 // Standard C++ library includes
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
26
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
27 // 3rd party library includes
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
28
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
29 // FIFE includes
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
30 // These includes are split up in two parts, separated by one empty line
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
31 // First block: files included from the FIFE root src directory
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
32 // Second block: files included from the same folder
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
33 #include "util/structures/priorityqueue.h"
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
34
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
35 namespace FIFE {
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
36
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
37 class Map;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
38 class SearchSpace;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
39 class Heuristic;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
40
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
41 /** RoutePatherSearch using A*
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
42 *
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
43 * For now this class uses offline A*, however eventually this will be switched over to RTA*.
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
44 */
310
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
45 class RoutePatherSearch {
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
46 public:
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
47 RoutePatherSearch(const int session_id, const Location& from, const Location& to, SearchSpace* searchSpace);
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
48
310
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
49 typedef std::list<Location> Path;
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
50 /** An enumeration of the different status the search can be in.
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
51 *
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
52 */
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
53 enum SearchStatus {
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
54 search_status_failed,
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
55 search_status_complete,
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
56 search_status_incomplete
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
57 };
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
58
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
59 virtual void updateSearch();
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
60
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
61 virtual Path calcPath();
310
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
62
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
63 /** Retrieves the session id.
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
64 *
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
65 * @return The searches session id in the pather.
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
66 */
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
67 int getSessionId() const {
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
68 return m_sessionId;
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
69 }
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
70
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
71 /** Retrieves the pather.
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
72 *
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
73 * @return A pointer to the abstract pather which
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
74 */
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
75 SearchSpace* getSearchSpace() const {
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
76 return m_searchspace;
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
77 }
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
78
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
79 /** A small function which returns the current status of the search.
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
80 *
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
81 * @return An integer value representing the status, which is enumerated by this class.
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
82 */
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
83 int getSearchStatus() const {
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
84 return m_status;
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
85 }
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
86
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
87 protected:
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
88 /** Sets the current status of the search.
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
89 *
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
90 * @param status The status to set.
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
91 */
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
92 void setSearchStatus(const SearchStatus status) {
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
93 m_status = status;
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
94 }
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
95
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
96 private:
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
97 //A location object representing where the search started.
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
98 Location m_to;
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
99
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
100 //A location object representing where the search ended.
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
101 Location m_from;
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
102
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
103 //An integer containing the session id for this search.
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
104 int m_sessionId;
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
105
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
106 //A pointer to the pather that owns this search.
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
107 SearchSpace* m_searchspace;
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
108
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
109 //An enumeration of the searches current status.
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
110 SearchStatus m_status;
378
64738befdf3b bringing in the changes from the build_system_rework branch in preparation for the 0.3.0 release. This commit will require the Jan2010 devkit. Clients will also need to be modified to the new way to import fife.
vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 310
diff changeset
111
64738befdf3b bringing in the changes from the build_system_rework branch in preparation for the 0.3.0 release. This commit will require the Jan2010 devkit. Clients will also need to be modified to the new way to import fife.
vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 310
diff changeset
112 //The start coordinate as an int.
64738befdf3b bringing in the changes from the build_system_rework branch in preparation for the 0.3.0 release. This commit will require the Jan2010 devkit. Clients will also need to be modified to the new way to import fife.
vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 310
diff changeset
113 int m_startCoordInt;
64738befdf3b bringing in the changes from the build_system_rework branch in preparation for the 0.3.0 release. This commit will require the Jan2010 devkit. Clients will also need to be modified to the new way to import fife.
vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 310
diff changeset
114
64738befdf3b bringing in the changes from the build_system_rework branch in preparation for the 0.3.0 release. This commit will require the Jan2010 devkit. Clients will also need to be modified to the new way to import fife.
vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 310
diff changeset
115 //The destination coordinate as an int.
64738befdf3b bringing in the changes from the build_system_rework branch in preparation for the 0.3.0 release. This commit will require the Jan2010 devkit. Clients will also need to be modified to the new way to import fife.
vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 310
diff changeset
116 int m_destCoordInt;
64738befdf3b bringing in the changes from the build_system_rework branch in preparation for the 0.3.0 release. This commit will require the Jan2010 devkit. Clients will also need to be modified to the new way to import fife.
vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 310
diff changeset
117
64738befdf3b bringing in the changes from the build_system_rework branch in preparation for the 0.3.0 release. This commit will require the Jan2010 devkit. Clients will also need to be modified to the new way to import fife.
vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 310
diff changeset
118 //The next coordinate to check out.
64738befdf3b bringing in the changes from the build_system_rework branch in preparation for the 0.3.0 release. This commit will require the Jan2010 devkit. Clients will also need to be modified to the new way to import fife.
vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 310
diff changeset
119 int m_next;
310
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
120
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
121 //The class to use to calculate the heuristic value.
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
122 Heuristic* m_heuristic;
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
123
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
124 //The shortest path tree.
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
125 std::vector<int> m_spt;
310
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
126
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
127 //The search frontier.
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
128 std::vector<int> m_sf;
310
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
129
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
130 //A table to hold the costs.
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
131 std::vector<float> m_gCosts;
310
8afb9b443f66 merged the pathfinding branch to trunk
wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 300
diff changeset
132
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
133 //priority queue to hold nodes on the sf in order.
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
134 PriorityQueue<int, float> m_sortedfrontier;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
135 };
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
136 }
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
137 #endif