HOG2
|
#include <MotionCaptureMovement.h>
Public Member Functions | |
MCEnvironment () | |
virtual void | GetSuccessors (const mcMovementState &nodeID, std::vector< mcMovementState > &neighbors) const |
virtual void | GetActions (const mcMovementState &nodeID, std::vector< mcMovementAction > &actions) const |
virtual mcMovementAction | GetAction (const mcMovementState &s1, const mcMovementState &s2) const |
virtual void | ApplyAction (mcMovementState &s, mcMovementAction a) const |
virtual void | GetNextState (const mcMovementState &, mcMovementAction, mcMovementState &) const |
virtual bool | InvertAction (mcMovementAction &a) const |
virtual double | HCost (const mcMovementState &node1, const mcMovementState &node2) const |
Heuristic value between two arbitrary nodes. More... | |
virtual double | HCost (const mcMovementState &node) const |
Heuristic value between node and the stored goal. More... | |
virtual double | GCost (const mcMovementState &node1, const mcMovementState &node2) const |
virtual double | GCost (const mcMovementState &node, const mcMovementAction &act) const |
virtual bool | GoalTest (const mcMovementState &node, const mcMovementState &goal) const |
virtual bool | GoalTest (const mcMovementState &node) const |
Goal Test if the goal is stored. More... | |
virtual uint64_t | GetStateHash (const mcMovementState &node) const |
virtual uint64_t | GetActionHash (mcMovementAction act) const |
virtual void | OpenGLDraw () const |
virtual void | OpenGLDraw (const mcMovementState &) const |
virtual void | OpenGLDraw (const mcMovementState &, const mcMovementState &, float) const |
Draw the transition at some percentage 0...1 between two states. More... | |
virtual void | OpenGLDraw (const mcMovementState &, const mcMovementAction &) const |
void | GLDrawLine (const mcMovementState &a, const mcMovementState &b) const |
Public Member Functions inherited from SearchEnvironment< mcMovementState, mcMovementAction > | |
virtual | ~SearchEnvironment () |
virtual int | GetNumSuccessors (const mcMovementState &stateID) const |
virtual void | UndoAction (mcMovementState &s, mcMovementAction a) const |
virtual void | StoreGoal (mcMovementState &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 mcMovementState &node1, const mcMovementState &node2, double parentHCost) const |
virtual uint64_t | GetMaxHash () const |
virtual void | GetStateFromHash (uint64_t parent, mcMovementState &s) const |
virtual double | GetPathLength (std::vector< mcMovementState > &neighbors) |
virtual double | GetPathLength (const mcMovementState &start, std::vector< mcMovementAction > &neighbors) |
virtual OccupancyInterface< mcMovementState, mcMovementAction > * | GetOccupancyInfo () |
virtual void | SetOccupancyInfo (OccupancyInterface< mcMovementState, mcMovementAction > *) |
virtual void | OpenGLDraw () const |
virtual void | GLLabelState (const mcMovementState &, const char *) const |
virtual void | GLDrawPath (const std::vector< mcMovementState > &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 mcMovementState &) const |
virtual void | DrawLine (Graphics::Display &display, const mcMovementState &x, const mcMovementState &y, float width=1.0) const |
Public Member Functions inherited from Heuristic< mcMovementState > | |
Heuristic () | |
virtual | ~Heuristic () |
Private Member Functions | |
double | distance (const mcMovementState &n1, const mcMovementState &n2) const |
bool | GetOpenGLCoord (float x_, float y_, GLdouble &x, GLdouble &y, GLdouble &z, GLdouble &radius) const |
Additional Inherited Members | |
Public Attributes inherited from Heuristic< mcMovementState > | |
std::vector< HeuristicTreeNode > | lookups |
std::vector< Heuristic * > | heuristics |
uint64_t | histogram [256] |
Protected Attributes inherited from SearchEnvironment< mcMovementState, mcMovementAction > | |
bool | bValidSearchGoal |
mcMovementState | searchGoal |
rgbColor | color |
GLfloat | transparency |
Definition at line 39 of file MotionCaptureMovement.h.
|
inline |
Definition at line 42 of file MotionCaptureMovement.h.
|
virtual |
Implements SearchEnvironment< mcMovementState, mcMovementAction >.
Definition at line 119 of file MotionCaptureMovement.cpp.
References d, mcMovementState::heading, mcData::headingOffset, TWOPI, mcMovementState::x, mcData::xOffset, mcMovementState::y, and mcData::zOffset.
Referenced by GetNextState(), and GetSuccessors().
|
private |
Definition at line 178 of file MotionCaptureMovement.cpp.
References mcMovementState::x, and mcMovementState::y.
Referenced by GCost(), GoalTest(), and HCost().
|
virtual |
Implements SearchEnvironment< mcMovementState, mcMovementAction >.
Definition at line 153 of file MotionCaptureMovement.cpp.
References distance(), and GetNextState().
|
virtual |
Implements SearchEnvironment< mcMovementState, mcMovementAction >.
Definition at line 148 of file MotionCaptureMovement.cpp.
References distance().
|
virtual |
Reimplemented from SearchEnvironment< mcMovementState, mcMovementAction >.
Definition at line 102 of file MotionCaptureMovement.cpp.
References GetNextState(), GetSuccessors(), and numActions.
|
virtual |
Implements SearchEnvironment< mcMovementState, mcMovementAction >.
Definition at line 173 of file MotionCaptureMovement.cpp.
|
virtual |
Implements SearchEnvironment< mcMovementState, mcMovementAction >.
Definition at line 79 of file MotionCaptureMovement.cpp.
References d, mcMovementState::heading, numActions, TWOPI, worldSize, mcMovementState::x, mcData::xOffset, mcMovementState::y, and mcData::zOffset.
|
virtual |
Reimplemented from SearchEnvironment< mcMovementState, mcMovementAction >.
Definition at line 131 of file MotionCaptureMovement.cpp.
References ApplyAction().
Referenced by GCost(), and GetAction().
|
private |
Definition at line 311 of file MotionCaptureMovement.cpp.
References worldSize.
Referenced by GLDrawLine(), and OpenGLDraw().
|
virtual |
Implements SearchEnvironment< mcMovementState, mcMovementAction >.
Definition at line 165 of file MotionCaptureMovement.cpp.
References worldSize.
|
virtual |
Implements SearchEnvironment< mcMovementState, mcMovementAction >.
Definition at line 55 of file MotionCaptureMovement.cpp.
References ApplyAction(), numActions, worldSize, mcMovementState::x, and mcMovementState::y.
Referenced by GetAction().
|
virtual |
Reimplemented from SearchEnvironment< mcMovementState, mcMovementAction >.
Definition at line 295 of file MotionCaptureMovement.cpp.
References SearchEnvironment< mcMovementState, mcMovementAction >::GetColor(), GetOpenGLCoord(), mcMovementState::x, and mcMovementState::y.
|
inlinevirtual |
Goal Test if the goal is stored.
Reimplemented from SearchEnvironment< mcMovementState, mcMovementAction >.
Definition at line 66 of file MotionCaptureMovement.h.
References SearchEnvironment< mcMovementState, mcMovementAction >::bValidSearchGoal, and SearchEnvironment< mcMovementState, mcMovementAction >::searchGoal.
|
virtual |
Implements SearchEnvironment< mcMovementState, mcMovementAction >.
Definition at line 160 of file MotionCaptureMovement.cpp.
References distance(), goalTolerance, and mcMovementState::heading.
|
inlinevirtual |
Heuristic value between node and the stored goal.
Asserts that the goal is stored
Reimplemented from SearchEnvironment< mcMovementState, mcMovementAction >.
Definition at line 58 of file MotionCaptureMovement.h.
References SearchEnvironment< mcMovementState, mcMovementAction >::bValidSearchGoal, HCost(), and SearchEnvironment< mcMovementState, mcMovementAction >::searchGoal.
|
virtual |
Heuristic value between two arbitrary nodes.
Implements SearchEnvironment< mcMovementState, mcMovementAction >.
Definition at line 143 of file MotionCaptureMovement.cpp.
References distance().
Referenced by HCost().
|
virtual |
Implements SearchEnvironment< mcMovementState, mcMovementAction >.
Definition at line 137 of file MotionCaptureMovement.cpp.
|
inlinevirtual |
Definition at line 74 of file MotionCaptureMovement.h.
|
virtual |
Reimplemented from SearchEnvironment< mcMovementState, mcMovementAction >.
Definition at line 247 of file MotionCaptureMovement.cpp.
References SearchEnvironment< mcMovementState, mcMovementAction >::GetColor(), GetOpenGLCoord(), mcMovementState::heading, recVec::normalise(), TWOPI, mcMovementState::x, recVec::x, mcMovementState::y, recVec::y, and recVec::z.
|
virtual |
Reimplemented from SearchEnvironment< mcMovementState, mcMovementAction >.
Definition at line 286 of file MotionCaptureMovement.cpp.
References DrawSphere(), GetOpenGLCoord(), mcMovementState::x, and mcMovementState::y.
|
virtual |
Draw the transition at some percentage 0...1 between two states.
** Draw the transition at some percentage 0...1 between two states */
Reimplemented from SearchEnvironment< mcMovementState, mcMovementAction >.
Definition at line 204 of file MotionCaptureMovement.cpp.
References SearchEnvironment< mcMovementState, mcMovementAction >::GetColor(), GetOpenGLCoord(), mcMovementState::heading, if(), TWOPI, mcMovementState::x, and mcMovementState::y.