HOG2
Public Member Functions | Private Member Functions | List of all members
MCEnvironment Class Reference

#include <MotionCaptureMovement.h>

Inheritance diagram for MCEnvironment:
Inheritance graph
[legend]
Collaboration diagram for MCEnvironment:
Collaboration graph
[legend]

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< HeuristicTreeNodelookups
 
std::vector< Heuristic * > heuristics
 
uint64_t histogram [256]
 
- Protected Attributes inherited from SearchEnvironment< mcMovementState, mcMovementAction >
bool bValidSearchGoal
 
mcMovementState searchGoal
 
rgbColor color
 
GLfloat transparency
 

Detailed Description

Definition at line 39 of file MotionCaptureMovement.h.

Constructor & Destructor Documentation

◆ MCEnvironment()

MCEnvironment::MCEnvironment ( )
inline

Definition at line 42 of file MotionCaptureMovement.h.

Member Function Documentation

◆ ApplyAction()

void MCEnvironment::ApplyAction ( mcMovementState s,
mcMovementAction  a 
) const
virtual

◆ distance()

double MCEnvironment::distance ( const mcMovementState n1,
const mcMovementState n2 
) const
private

Definition at line 178 of file MotionCaptureMovement.cpp.

References mcMovementState::x, and mcMovementState::y.

Referenced by GCost(), GoalTest(), and HCost().

◆ GCost() [1/2]

double MCEnvironment::GCost ( const mcMovementState node,
const mcMovementAction act 
) const
virtual

◆ GCost() [2/2]

double MCEnvironment::GCost ( const mcMovementState node1,
const mcMovementState node2 
) const
virtual

◆ GetAction()

mcMovementAction MCEnvironment::GetAction ( const mcMovementState s1,
const mcMovementState s2 
) const
virtual

◆ GetActionHash()

uint64_t MCEnvironment::GetActionHash ( mcMovementAction  act) const
virtual

◆ GetActions()

void MCEnvironment::GetActions ( const mcMovementState nodeID,
std::vector< mcMovementAction > &  actions 
) const
virtual

◆ GetNextState()

void MCEnvironment::GetNextState ( const mcMovementState s1,
mcMovementAction  a,
mcMovementState s2 
) const
virtual

Reimplemented from SearchEnvironment< mcMovementState, mcMovementAction >.

Definition at line 131 of file MotionCaptureMovement.cpp.

References ApplyAction().

Referenced by GCost(), and GetAction().

◆ GetOpenGLCoord()

bool MCEnvironment::GetOpenGLCoord ( float  x_,
float  y_,
GLdouble &  x,
GLdouble &  y,
GLdouble &  z,
GLdouble &  radius 
) const
private

Definition at line 311 of file MotionCaptureMovement.cpp.

References worldSize.

Referenced by GLDrawLine(), and OpenGLDraw().

◆ GetStateHash()

uint64_t MCEnvironment::GetStateHash ( const mcMovementState node) const
virtual

◆ GetSuccessors()

void MCEnvironment::GetSuccessors ( const mcMovementState nodeID,
std::vector< mcMovementState > &  neighbors 
) const
virtual

◆ GLDrawLine()

void MCEnvironment::GLDrawLine ( const mcMovementState a,
const mcMovementState b 
) const
virtual

◆ GoalTest() [1/2]

virtual bool MCEnvironment::GoalTest ( const mcMovementState node) const
inlinevirtual

◆ GoalTest() [2/2]

bool MCEnvironment::GoalTest ( const mcMovementState node,
const mcMovementState goal 
) const
virtual

◆ HCost() [1/2]

virtual double MCEnvironment::HCost ( const mcMovementState node) const
inlinevirtual

◆ HCost() [2/2]

double MCEnvironment::HCost ( const mcMovementState node1,
const mcMovementState node2 
) const
virtual

Heuristic value between two arbitrary nodes.

Implements SearchEnvironment< mcMovementState, mcMovementAction >.

Definition at line 143 of file MotionCaptureMovement.cpp.

References distance().

Referenced by HCost().

◆ InvertAction()

bool MCEnvironment::InvertAction ( mcMovementAction a) const
virtual

◆ OpenGLDraw() [1/4]

virtual void MCEnvironment::OpenGLDraw ( ) const
inlinevirtual

Definition at line 74 of file MotionCaptureMovement.h.

◆ OpenGLDraw() [2/4]

void MCEnvironment::OpenGLDraw ( const mcMovementState l) const
virtual

◆ OpenGLDraw() [3/4]

void MCEnvironment::OpenGLDraw ( const mcMovementState l,
const mcMovementAction  
) const
virtual

◆ OpenGLDraw() [4/4]

void MCEnvironment::OpenGLDraw ( const mcMovementState oldState,
const mcMovementState newState,
float  perc 
) const
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.


The documentation for this class was generated from the following files: