HOG2
|
#include <GreedyDMUnit.h>
Public Member Functions | |
GreedyDMUnit (xyLoc &startLoc) | |
~GreedyDMUnit () | |
virtual const char * | GetName () |
virtual bool | MakeMove (environment *theEnv, OccupancyInterface< xyLoc, tDirection > *, SimulationInfo< xyLoc, tDirection, environment > *, tDirection &a) |
virtual void | UpdateLocation (environment *, xyLoc &newloc, bool success, SimulationInfo< xyLoc, tDirection, environment > *) |
virtual void | GetLocation (xyLoc &l) |
virtual void | OpenGLDraw (const environment *theEnv, const SimulationInfo< xyLoc, tDirection, environment > *) const |
virtual void | GetGoal (xyLoc &s) |
void | SetEnvironment (WeightedMap2DEnvironment *w) |
Public Member Functions inherited from Unit< xyLoc, tDirection, environment > | |
Unit () | |
virtual | ~Unit () |
virtual bool | Done () |
virtual double | GetSpeed () |
void | SetSpeed (double s) |
virtual void | LogStats (StatCollection *) |
log an stats that may have been computed during the last run More... | |
virtual void | LogFinalStats (StatCollection *) |
log any final one-time stats before a simulation is ended More... | |
virtual void | SetColor (GLfloat _r, GLfloat _g, GLfloat _b) |
virtual void | GetColor (GLfloat &_r, GLfloat &_g, GLfloat &_b) const |
UnitGroup< xyLoc, tDirection, environment > * | GetUnitGroup () |
void | SetUnitGroup (UnitGroup< xyLoc, tDirection, environment > *_group) |
virtual unsigned int | GetNum () |
virtual void | SetNum (unsigned int num) |
virtual void | StartNewTrial (StatCollection *) |
virtual int | GetPriority () |
virtual void | SetPriority (int val) |
Private Attributes | |
xyLoc | loc |
xyLoc | prevLoc |
WeightedMap2DEnvironment * | wme |
Definition at line 5 of file GreedyDMUnit.h.
|
inline |
Definition at line 8 of file GreedyDMUnit.h.
|
inline |
Definition at line 9 of file GreedyDMUnit.h.
|
inlinevirtual |
Reimplemented from Unit< xyLoc, tDirection, environment >.
Definition at line 128 of file GreedyDMUnit.h.
References GreedyDMUnit< environment >::loc.
|
inlinevirtual |
Implements Unit< xyLoc, tDirection, environment >.
Definition at line 122 of file GreedyDMUnit.h.
References GreedyDMUnit< environment >::loc.
|
inlinevirtual |
Implements Unit< xyLoc, tDirection, environment >.
Definition at line 11 of file GreedyDMUnit.h.
|
inlinevirtual |
Implements Unit< xyLoc, tDirection, environment >.
Definition at line 13 of file GreedyDMUnit.h.
References WeightedMap2DEnvironment::GetAngle(), WeightedMap2DEnvironment::GetAngleFromDirection(), kE, kN, kNE, kNW, kS, kSE, kStay, kSW, kW, GreedyDMUnit< environment >::wme, xyLoc::x, Vector2D::x, loc::x, xyLoc::y, Vector2D::y, and loc::y.
|
inlinevirtual |
Implements Unit< xyLoc, tDirection, environment >.
Definition at line 125 of file GreedyDMUnit.h.
|
inline |
Definition at line 131 of file GreedyDMUnit.h.
References GreedyDMUnit< environment >::wme.
|
inlinevirtual |
Implements Unit< xyLoc, tDirection, environment >.
Definition at line 113 of file GreedyDMUnit.h.
References GreedyDMUnit< environment >::loc, and GreedyDMUnit< environment >::prevLoc.
|
private |
Definition at line 134 of file GreedyDMUnit.h.
Referenced by GreedyDMUnit< environment >::GetGoal(), GreedyDMUnit< environment >::GetLocation(), and GreedyDMUnit< environment >::UpdateLocation().
|
private |
Definition at line 134 of file GreedyDMUnit.h.
Referenced by GreedyDMUnit< environment >::UpdateLocation().
|
private |
Definition at line 135 of file GreedyDMUnit.h.
Referenced by GreedyDMUnit< environment >::MakeMove(), and GreedyDMUnit< environment >::SetEnvironment().