VisualNavErrMonTask.h
Go to the documentation of this file.00001 #ifndef VISUAL_NAV_ERR_MON_TASK_H_
00002 #define VISUAL_NAV_ERR_MON_TASK_H_
00003
00004
00005
00006 #include <vector>
00007
00008
00009 #include "DualCoding/ShapeRoot.h"
00010
00011 namespace Kodu {
00012
00013
00014 class PerceptualTaskBase;
00015
00016
00017
00018
00019
00020
00021 class VisualNavErrMonTask : public PerceptualTaskBase {
00022 public:
00023
00024 VisualNavErrMonTask(const DualCoding::ShapeRoot& kTargetShape)
00025 : PerceptualTaskBase(PT_VIS_NAV_ERR_MON, ++idCount),
00026 errorCount(0),
00027 targets(),
00028 agentLastOrientation(0.0f)
00029 {
00030 targets.push_back(kTargetShape);
00031 std::cout << "Created VisualNavErrorMonTask #" << id << " to track " << kTargetShape << std::endl;
00032 }
00033
00034
00035 VisualNavErrMonTask(const std::vector<DualCoding::ShapeRoot>& kTargetShapes)
00036 : PerceptualTaskBase(PT_VIS_NAV_ERR_MON, ++idCount),
00037 errorCount(0),
00038 targets(kTargetShapes),
00039 agentLastOrientation(0.0f)
00040 { }
00041
00042
00043 VisualNavErrMonTask(const VisualNavErrMonTask& kTask)
00044 : PerceptualTaskBase(kTask),
00045 errorCount(kTask.errorCount),
00046 targets(kTask.targets),
00047 agentLastOrientation(kTask.agentLastOrientation)
00048 { }
00049
00050
00051 ~VisualNavErrMonTask() {
00052
00053 }
00054
00055
00056 VisualNavErrMonTask& operator=(const VisualNavErrMonTask& kTask) {
00057 if (this != &kTask) {
00058 PerceptualTaskBase::operator=(kTask);
00059 errorCount = kTask.errorCount;
00060 targets = kTask.targets;
00061 agentLastOrientation = kTask.agentLastOrientation;
00062 }
00063 return *this;
00064 }
00065
00066
00067 virtual bool canExecute(const KoduWorld&);
00068
00069
00070 virtual void examineTaskResults();
00071
00072
00073 virtual const DualCoding::MapBuilderRequest& getMapBuilderRequest();
00074
00075
00076 virtual bool taskIsComplete(const KoduWorld&);
00077
00078
00079
00080
00081 private:
00082 static unsigned int idCount;
00083 unsigned int errorCount;
00084 std::vector<DualCoding::ShapeRoot> targets;
00085 float agentLastOrientation;
00086 };
00087
00088 }
00089
00090 #endif // VISUAL_NAV_ERR_MON_TASK_H_