HOG2
Public Member Functions | List of all members
SteeringEnvironment Class Reference

#include <SteeringEnvironment.h>

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

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

Detailed Description

Definition at line 48 of file SteeringEnvironment.h.

Constructor & Destructor Documentation

◆ SteeringEnvironment()

SteeringEnvironment::SteeringEnvironment ( )
inline

Definition at line 51 of file SteeringEnvironment.h.

Member Function Documentation

◆ ApplyAction()

void SteeringEnvironment::ApplyAction ( steeringState s,
steeringAction  a 
) const
virtual

◆ GCost() [1/2]

double SteeringEnvironment::GCost ( const steeringState node,
const steeringAction act 
) const
virtual

◆ GCost() [2/2]

double SteeringEnvironment::GCost ( const steeringState node1,
const steeringState node2 
) const
virtual

◆ GetAction()

steeringAction SteeringEnvironment::GetAction ( const steeringState s1,
const steeringState s2 
) const
virtual

Reimplemented from SearchEnvironment< steeringState, steeringAction >.

Definition at line 41 of file SteeringEnvironment.cpp.

◆ GetActionHash()

uint64_t SteeringEnvironment::GetActionHash ( steeringAction  act) const
virtual

◆ GetActions()

void SteeringEnvironment::GetActions ( const steeringState nodeID,
std::vector< steeringAction > &  actions 
) const
virtual

Implements SearchEnvironment< steeringState, steeringAction >.

Definition at line 27 of file SteeringEnvironment.cpp.

Referenced by GetSuccessors().

◆ GetNextState()

void SteeringEnvironment::GetNextState ( const steeringState s1,
steeringAction  a,
steeringState s2 
) const
virtual

Reimplemented from SearchEnvironment< steeringState, steeringAction >.

Definition at line 85 of file SteeringEnvironment.cpp.

References ApplyAction().

◆ GetStateHash()

uint64_t SteeringEnvironment::GetStateHash ( const steeringState node) const
virtual

◆ GetSuccessors()

void SteeringEnvironment::GetSuccessors ( const steeringState nodeID,
std::vector< steeringState > &  neighbors 
) const
virtual

◆ GoalTest() [1/2]

virtual bool SteeringEnvironment::GoalTest ( const steeringState node) const
inlinevirtual

◆ GoalTest() [2/2]

bool SteeringEnvironment::GoalTest ( const steeringState node,
const steeringState goal 
) const
virtual

◆ HCost() [1/2]

virtual double SteeringEnvironment::HCost ( const steeringState node) const
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.

◆ HCost() [2/2]

double SteeringEnvironment::HCost ( const steeringState node1,
const steeringState node2 
) const
virtual

Heuristic value between two arbitrary nodes.

Implements SearchEnvironment< steeringState, steeringAction >.

Definition at line 95 of file SteeringEnvironment.cpp.

Referenced by HCost().

◆ InvertAction()

bool SteeringEnvironment::InvertAction ( steeringAction a) const
virtual

◆ OpenGLDraw() [1/4]

void SteeringEnvironment::OpenGLDraw ( ) const
virtual

Definition at line 113 of file SteeringEnvironment.cpp.

◆ OpenGLDraw() [2/4]

void SteeringEnvironment::OpenGLDraw ( const steeringState s) const
virtual

◆ OpenGLDraw() [3/4]

void SteeringEnvironment::OpenGLDraw ( const steeringState ,
const steeringAction  
) const
virtual

Reimplemented from SearchEnvironment< steeringState, steeringAction >.

Definition at line 221 of file SteeringEnvironment.cpp.

◆ OpenGLDraw() [4/4]

void SteeringEnvironment::OpenGLDraw ( const steeringState s1,
const steeringState s2,
float  mix 
) const
virtual

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