HOG2
|
#include <SteeringEnvironment.h>
Public Member Functions | |
SteeringEnvironment () | |
virtual void | GetSuccessors (const steeringState &nodeID, std::vector< steeringState > &neighbors) const |
virtual void | GetActions (const steeringState &nodeID, std::vector< steeringAction > &actions) const |
virtual steeringAction | GetAction (const steeringState &s1, const steeringState &s2) const |
virtual void | ApplyAction (steeringState &s, steeringAction a) const |
virtual void | GetNextState (const steeringState &, steeringAction, steeringState &) const |
virtual bool | InvertAction (steeringAction &a) const |
virtual double | HCost (const steeringState &node1, const steeringState &node2) const |
Heuristic value between two arbitrary nodes. More... | |
virtual double | HCost (const steeringState &node) const |
Heuristic value between node and the stored goal. More... | |
virtual double | GCost (const steeringState &node1, const steeringState &node2) const |
virtual double | GCost (const steeringState &node, const steeringAction &act) const |
virtual bool | GoalTest (const steeringState &node, const steeringState &goal) const |
virtual bool | GoalTest (const steeringState &node) const |
Goal Test if the goal is stored. More... | |
virtual uint64_t | GetStateHash (const steeringState &node) const |
virtual uint64_t | GetActionHash (steeringAction act) const |
virtual void | OpenGLDraw () const |
virtual void | OpenGLDraw (const steeringState &) const |
virtual void | OpenGLDraw (const steeringState &, const steeringState &, float) const |
Draw the transition at some percentage 0...1 between two states. More... | |
virtual void | OpenGLDraw (const steeringState &, const steeringAction &) const |
Public Member Functions inherited from SearchEnvironment< steeringState, steeringAction > | |
virtual | ~SearchEnvironment () |
virtual int | GetNumSuccessors (const steeringState &stateID) const |
virtual void | UndoAction (steeringState &s, steeringAction a) const |
virtual void | StoreGoal (steeringState &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 steeringState &node1, const steeringState &node2, double parentHCost) const |
virtual uint64_t | GetMaxHash () const |
virtual void | GetStateFromHash (uint64_t parent, steeringState &s) const |
virtual double | GetPathLength (std::vector< steeringState > &neighbors) |
virtual double | GetPathLength (const steeringState &start, std::vector< steeringAction > &neighbors) |
virtual OccupancyInterface< steeringState, steeringAction > * | GetOccupancyInfo () |
virtual void | SetOccupancyInfo (OccupancyInterface< steeringState, steeringAction > *) |
virtual void | OpenGLDraw () const |
virtual void | GLLabelState (const steeringState &, const char *) const |
virtual void | GLDrawLine (const steeringState &x, const steeringState &y) const |
virtual void | GLDrawPath (const std::vector< steeringState > &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 | Draw (Graphics::Display &display) const |
virtual void | Draw (Graphics::Display &display, const steeringState &) const |
virtual void | DrawLine (Graphics::Display &display, const steeringState &x, const steeringState &y, float width=1.0) const |
Public Member Functions inherited from Heuristic< steeringState > | |
Heuristic () | |
virtual | ~Heuristic () |
Additional Inherited Members | |
Public Attributes inherited from Heuristic< steeringState > | |
std::vector< HeuristicTreeNode > | lookups |
std::vector< Heuristic * > | heuristics |
uint64_t | histogram [256] |
Protected Attributes inherited from SearchEnvironment< steeringState, steeringAction > | |
bool | bValidSearchGoal |
steeringState | searchGoal |
rgbColor | color |
GLfloat | transparency |
Definition at line 48 of file SteeringEnvironment.h.
|
inline |
Definition at line 51 of file SteeringEnvironment.h.
|
virtual |
Implements SearchEnvironment< steeringState, steeringAction >.
Definition at line 47 of file SteeringEnvironment.cpp.
References steeringAction::dh, steeringAction::dv, steeringState::heading, maxSpeed, TWOPI, steeringState::v, worldRadius, steeringState::x, and steeringState::y.
Referenced by GetNextState(), and GetSuccessors().
|
virtual |
Implements SearchEnvironment< steeringState, steeringAction >.
Definition at line 100 of file SteeringEnvironment.cpp.
|
virtual |
Implements SearchEnvironment< steeringState, steeringAction >.
Definition at line 98 of file SteeringEnvironment.cpp.
|
virtual |
Reimplemented from SearchEnvironment< steeringState, steeringAction >.
Definition at line 41 of file SteeringEnvironment.cpp.
|
virtual |
Implements SearchEnvironment< steeringState, steeringAction >.
Definition at line 109 of file SteeringEnvironment.cpp.
|
virtual |
Implements SearchEnvironment< steeringState, steeringAction >.
Definition at line 27 of file SteeringEnvironment.cpp.
Referenced by GetSuccessors().
|
virtual |
Reimplemented from SearchEnvironment< steeringState, steeringAction >.
Definition at line 85 of file SteeringEnvironment.cpp.
References ApplyAction().
|
virtual |
Implements SearchEnvironment< steeringState, steeringAction >.
Definition at line 106 of file SteeringEnvironment.cpp.
|
virtual |
Implements SearchEnvironment< steeringState, steeringAction >.
Definition at line 15 of file SteeringEnvironment.cpp.
References ApplyAction(), and GetActions().
|
inlinevirtual |
Goal Test if the goal is stored.
Reimplemented from SearchEnvironment< steeringState, steeringAction >.
Definition at line 75 of file SteeringEnvironment.h.
References SearchEnvironment< steeringState, steeringAction >::bValidSearchGoal, and SearchEnvironment< steeringState, steeringAction >::searchGoal.
|
virtual |
Implements SearchEnvironment< steeringState, steeringAction >.
Definition at line 102 of file SteeringEnvironment.cpp.
|
inlinevirtual |
Heuristic value between node and the stored goal.
Asserts that the goal is stored
Reimplemented from SearchEnvironment< steeringState, steeringAction >.
Definition at line 67 of file SteeringEnvironment.h.
References SearchEnvironment< steeringState, steeringAction >::bValidSearchGoal, HCost(), and SearchEnvironment< steeringState, steeringAction >::searchGoal.
|
virtual |
Heuristic value between two arbitrary nodes.
Implements SearchEnvironment< steeringState, steeringAction >.
Definition at line 95 of file SteeringEnvironment.cpp.
Referenced by HCost().
|
virtual |
Implements SearchEnvironment< steeringState, steeringAction >.
Definition at line 91 of file SteeringEnvironment.cpp.
|
virtual |
Definition at line 113 of file SteeringEnvironment.cpp.
|
virtual |
Reimplemented from SearchEnvironment< steeringState, steeringAction >.
Definition at line 126 of file SteeringEnvironment.cpp.
References SearchEnvironment< steeringState, steeringAction >::GetColor(), steeringState::heading, recVec::normalise(), TWOPI, worldRadius, steeringState::x, recVec::x, steeringState::y, recVec::y, and recVec::z.
|
virtual |
Reimplemented from SearchEnvironment< steeringState, steeringAction >.
Definition at line 221 of file SteeringEnvironment.cpp.
|
virtual |
Draw the transition at some percentage 0...1 between two states.
Reimplemented from SearchEnvironment< steeringState, steeringAction >.
Definition at line 174 of file SteeringEnvironment.cpp.
References SearchEnvironment< steeringState, steeringAction >::GetColor(), steeringState::heading, recVec::normalise(), TWOPI, worldRadius, steeringState::x, recVec::x, steeringState::y, recVec::y, and recVec::z.