HOG2
|
#include <DynamicWeightedGrid.h>
Public Member Functions | |
DynamicWeightedGridEnvironment (const char *map) | |
DynamicWeightedGridEnvironment (int width, int height) | |
void | GetSuccessors (const xyLoc &nodeID, std::vector< xyLoc > &neighbors) const |
void | GetActions (const xyLoc &nodeID, std::vector< tDirection > &actions) const |
void | ApplyAction (xyLoc &s, tDirection a) const |
bool | InvertAction (tDirection &a) const |
tDirection | GetAction (const xyLoc &s1, const xyLoc &s2) const |
double | HCost (const xyLoc &node1, const xyLoc &node2) const |
Heuristic value between two arbitrary nodes. More... | |
double | GCost (const xyLoc &node1, const xyLoc &node2) const |
double | GCost (const xyLoc &node, const tDirection &act) const |
bool | GoalTest (const xyLoc &node, const xyLoc &goal) const |
uint64_t | GetStateHash (const xyLoc &node) const |
uint64_t | GetMaxHash () const |
uint64_t | GetActionHash (tDirection act) const |
void | Draw (Graphics::Display &display) const |
void | Draw (Graphics::Display &display, const xyLoc &) const |
void | OpenGLDraw () const |
void | OpenGLDraw (const xyLoc &) const |
void | OpenGLDraw (const xyLoc &, const tDirection &) const |
void | GLDrawLine (const xyLoc &x, const xyLoc &y) const |
void | SetCosts (std::vector< double > &c) |
void | SetCost (TerrainType t, double cost) |
std::vector< double > & | GetCosts () |
void | SetTerrainType (const xyLoc &l, TerrainType t) |
Public Member Functions inherited from SearchEnvironment< xyLoc, tDirection > | |
virtual | ~SearchEnvironment () |
virtual int | GetNumSuccessors (const xyLoc &stateID) const |
virtual void | UndoAction (xyLoc &s, tDirection a) const |
virtual void | GetNextState (const xyLoc &s1, tDirection a, xyLoc &s2) const |
virtual void | StoreGoal (xyLoc &s) |
Stores the goal for use by single-state HCost. More... | |
virtual void | ClearGoal () |
Clears the goal from memory. More... | |
virtual bool | IsGoalStored () const |
Returns true if the goal is stored and false otherwise. More... | |
virtual double | HCost (const xyLoc &node1, const xyLoc &node2, double parentHCost) const |
virtual double | HCost (const xyLoc &node) const |
Heuristic value between node and the stored goal. More... | |
virtual bool | GoalTest (const xyLoc &node) const |
Goal Test if the goal is stored. More... | |
virtual uint64_t | GetMaxHash () const |
virtual void | GetStateFromHash (uint64_t parent, xyLoc &s) const |
virtual double | GetPathLength (std::vector< xyLoc > &neighbors) |
virtual double | GetPathLength (const xyLoc &start, std::vector< tDirection > &neighbors) |
virtual OccupancyInterface< xyLoc, tDirection > * | GetOccupancyInfo () |
virtual void | SetOccupancyInfo (OccupancyInterface< xyLoc, tDirection > *) |
virtual void | OpenGLDraw () const |
virtual void | OpenGLDraw (const xyLoc &, const xyLoc &, float) const |
Draw the transition at some percentage 0...1 between two states. More... | |
virtual void | GLLabelState (const xyLoc &, const char *) const |
virtual void | GLDrawPath (const std::vector< xyLoc > &x) const |
virtual void | SetColor (const rgbColor &r) const |
virtual void | SetColor (GLfloat rr, GLfloat g, GLfloat b, GLfloat t=1.0) const |
virtual void | GetColor (GLfloat &rr, GLfloat &g, GLfloat &b, GLfloat &t) const |
virtual rgbColor | GetColor () const |
virtual void | DrawLine (Graphics::Display &display, const xyLoc &x, const xyLoc &y, float width=1.0) const |
Public Member Functions inherited from Heuristic< xyLoc > | |
Heuristic () | |
virtual | ~Heuristic () |
Private Member Functions | |
void | GetCoordinate (const xyLoc &l, float &x, float &y, float &r) const |
Private Attributes | |
std::vector< double > | costs |
std::vector< uint8_t > | terrain |
int | mWidth |
int | mHeight |
Additional Inherited Members | |
Public Attributes inherited from Heuristic< xyLoc > | |
std::vector< HeuristicTreeNode > | lookups |
std::vector< Heuristic * > | heuristics |
uint64_t | histogram [256] |
Protected Attributes inherited from SearchEnvironment< xyLoc, tDirection > | |
bool | bValidSearchGoal |
xyLoc | searchGoal |
rgbColor | color |
GLfloat | transparency |
Definition at line 211 of file DynamicWeightedGrid.h.
DWG::DynamicWeightedGridEnvironment::DynamicWeightedGridEnvironment | ( | const char * | map | ) |
Definition at line 17 of file DynamicWeightedGrid.cpp.
DWG::DynamicWeightedGridEnvironment::DynamicWeightedGridEnvironment | ( | int | width, |
int | height | ||
) |
Definition at line 54 of file DynamicWeightedGrid.cpp.
References height, DWG::kGround, mHeight, mWidth, terrain, and width.
|
virtual |
|
virtual |
Reimplemented from SearchEnvironment< xyLoc, tDirection >.
Definition at line 248 of file DynamicWeightedGrid.cpp.
|
virtual |
Reimplemented from SearchEnvironment< xyLoc, tDirection >.
Definition at line 253 of file DynamicWeightedGrid.cpp.
References Graphics::Display::FillCircle(), SearchEnvironment< xyLoc, tDirection >::GetColor(), and GetCoordinate().
|
virtual |
Implements SearchEnvironment< xyLoc, tDirection >.
Definition at line 226 of file DynamicWeightedGrid.cpp.
References ApplyAction(), and GCost().
|
virtual |
Implements SearchEnvironment< xyLoc, tDirection >.
Definition at line 215 of file DynamicWeightedGrid.cpp.
References mWidth, terrain, xyLoc::x, and xyLoc::y.
Referenced by GCost().
|
virtual |
Reimplemented from SearchEnvironment< xyLoc, tDirection >.
Definition at line 196 of file DynamicWeightedGrid.cpp.
|
virtual |
Implements SearchEnvironment< xyLoc, tDirection >.
Definition at line 243 of file DynamicWeightedGrid.cpp.
|
virtual |
|
private |
|
inline |
Definition at line 244 of file DynamicWeightedGrid.h.
References costs.
|
inline |
Definition at line 227 of file DynamicWeightedGrid.h.
|
virtual |
Implements SearchEnvironment< xyLoc, tDirection >.
Definition at line 238 of file DynamicWeightedGrid.cpp.
References mWidth.
|
virtual |
Implements SearchEnvironment< xyLoc, tDirection >.
Definition at line 76 of file DynamicWeightedGrid.cpp.
|
inlinevirtual |
Reimplemented from SearchEnvironment< xyLoc, tDirection >.
Definition at line 235 of file DynamicWeightedGrid.h.
|
virtual |
Implements SearchEnvironment< xyLoc, tDirection >.
Definition at line 233 of file DynamicWeightedGrid.cpp.
|
virtual |
Heuristic value between two arbitrary nodes.
Implements SearchEnvironment< xyLoc, tDirection >.
Definition at line 204 of file DynamicWeightedGrid.cpp.
|
virtual |
|
inline |
Definition at line 232 of file DynamicWeightedGrid.h.
|
inlinevirtual |
Reimplemented from SearchEnvironment< xyLoc, tDirection >.
Definition at line 233 of file DynamicWeightedGrid.h.
|
inlinevirtual |
Reimplemented from SearchEnvironment< xyLoc, tDirection >.
Definition at line 234 of file DynamicWeightedGrid.h.
|
inline |
Definition at line 240 of file DynamicWeightedGrid.h.
|
inline |
Definition at line 236 of file DynamicWeightedGrid.h.
|
inline |
|
private |
Definition at line 254 of file DynamicWeightedGrid.h.
Referenced by GetCosts().
|
private |
Definition at line 256 of file DynamicWeightedGrid.h.
Referenced by DynamicWeightedGridEnvironment(), GetActions(), GetCoordinate(), GetMaxHash(), and GetSuccessors().
|
private |
Definition at line 256 of file DynamicWeightedGrid.h.
Referenced by DynamicWeightedGridEnvironment(), GCost(), GetActions(), GetCoordinate(), GetMaxHash(), GetStateHash(), GetSuccessors(), and SetTerrainType().
|
private |
Definition at line 255 of file DynamicWeightedGrid.h.
Referenced by DynamicWeightedGridEnvironment(), GCost(), and SetTerrainType().