Go to the documentation of this file.
16 return (l1.
t == l2.
t) && (l1.
l == l2.
l);
54 for (
unsigned int x = 0; x < n.size(); x++)
60 newLoc.
t = nodeID.
t+1;
61 neighbors.push_back(newLoc);
69 newLoc.
t = nodeID.
t+1;
70 neighbors.push_back(newLoc);
82 for (
unsigned int x = 0; x <
constraints.size(); x++)
132 double res2 = (node2.
t>node1.
t)?(node2.
t-node1.
t):0;
134 return max(res1, res2);
139 return (
node.l == goal.
l &&
node.t >= goal.
t);
165 for (
unsigned int x = 0; x <
constraints.size(); x++)
167 GLdouble xx, yy, zz, rad;
169 glColor4f(1.0, 0.0, 0.0, 0.5);
180 GLdouble xx, yy, zz, rad;
182 glColor4f(r, g, b, t);
193 GLdouble xx, yy, zz, rad;
199 glColor4f(r, g, b, t);
201 glVertex3f(xx, yy, zz-x.
t*rad);
203 glVertex3f(xx, yy, zz-y.
t*rad);
virtual bool InvertAction(tDirection &a) const
virtual void ApplyAction(xytLoc &s, tDirection a) const
virtual uint64_t GetStateHash(const xytLoc &node) const
bool operator==(const xytLoc &l1, const xytLoc &l2)
virtual void UndoAction(xytLoc &s, tDirection a) const
virtual void GLDrawLine(const xytLoc &x, const xytLoc &y) const
virtual void UndoAction(state &s, action a) const
bool ViolatesConstraint(const xyLoc &from, const xyLoc &to, int time) const
void DrawSphere(GLdouble _x, GLdouble _y, GLdouble _z, GLdouble tRadius)
virtual void OpenGLDraw() const
void AddConstraint(constraint c)
virtual bool GoalTest(const xytLoc &node, const xytLoc &goal) const
virtual void ApplyAction(xyLoc &s, tDirection dir) const
virtual double HCost(const xytLoc &node1, const xytLoc &node2) const
Heuristic value between two arbitrary nodes.
virtual bool InvertAction(tDirection &a) const
virtual tDirection GetAction(const xytLoc &s1, const xytLoc &s2) const
virtual rgbColor GetColor() const
virtual uint64_t GetActionHash(tDirection act) const
virtual double HCost(const xyLoc &) const
Heuristic value between node and the stored goal.
virtual void GetSuccessors(const xyLoc &nodeID, std::vector< xyLoc > &neighbors) const
void GetActions(const xyLoc &nodeID, std::vector< tDirection > &actions) const
std::vector< constraint > constraints
bool GetOpenGLCoord(int _x, int _y, GLdouble &x, GLdouble &y, GLdouble &z, GLdouble &radius) const
Get the openGL coordinates of a given tile.
virtual void GetActions(const xytLoc &nodeID, std::vector< tDirection > &actions) const
virtual void OpenGLDraw() const
Map2DConstrainedEnvironment(Map *m)
Nodes to be stored within a Graph.
tDirection GetAction(const xyLoc &s1, const xyLoc &s2) const
A tile-based representation of the world.
virtual void GetSuccessors(const xytLoc &nodeID, std::vector< xytLoc > &neighbors) const