Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

KoduObject.h

Go to the documentation of this file.
00001 #ifndef KODU_OBJECT_H_
00002 #define KODU_OBJECT_H_
00003 
00004 // Tekkodu Library
00005 #include "Kodu/Primitives/PerceptionSearch.h"
00006 
00007 // Tekkotsu Library
00008 #include "DualCoding/ShapeRoot.h"
00009 #include "DualCoding/ShapeAprilTag.h"
00010 
00011 // C++ Library
00012 #include <string>
00013 
00014 namespace Kodu {
00015     //! Kodu Object class
00016     class KoduObject {
00017     public:
00018         //! Constructor
00019         KoduObject(const std::string& kColor, const std::string& kType, SearchLocation_t locationsToSearch,
00020             bool canBeLandmark);
00021 
00022         //! Copy constructor
00023         KoduObject(const KoduObject& kObject);
00024 
00025         //! Destructor
00026         ~KoduObject();
00027 
00028         //! Assignment operator
00029         KoduObject& operator=(const KoduObject& kObject);
00030 
00031         //! Returns the object's color
00032         const std::string& getColor() const;
00033 
00034         //! Returns the object's type
00035         const std::string& getType() const;
00036 
00037         //! Returns true if an object is a landmark or not
00038         bool isLandmark() const;
00039 
00040         //! Returns true if an object is movable
00041         bool isMovable() const;
00042 
00043         //! Returns true if an object can move throughout the environment (autonomously)
00044         bool hasMobility() const;
00045 
00046         //! Returns true if the agent found an object that met the search criteria (color, type, etc)
00047         bool foundValidMatch() const;
00048 
00049         //! Returns the object that matches the description
00050         const DualCoding::ShapeRoot& getObject() const;
00051 
00052         //! Returns the matching object's april tag
00053         const DualCoding::Shape<DualCoding::AprilTagData>& getObjectIdentifier() const;
00054 
00055         //! Stores the object that matches the search criteria
00056         void setObject(const DualCoding::ShapeRoot&);
00057 
00058         //! Stores the object's identifier
00059         void setObjectIdentifier(const DualCoding::Shape<DualCoding::AprilTagData>&);
00060 
00061     protected:
00062         std::string color;                  //!< the object's color
00063         std::string type;                   //!< the object's type (e.g. tree, rock, apple)
00064         SearchLocation_t searchLocations;   //!< the locations the perceiver should search for an object
00065         bool objectIsLandmark;              //!< can "this" object be used as a landmark
00066 
00067     public:
00068         DualCoding::ShapeRoot matchingObject; //!< the object that matches search criteria
00069         DualCoding::Shape<DualCoding::AprilTagData> matchingObjTag;
00070     };
00071 }
00072 
00073 #endif // end of KODU_OBJECT_H_

Tekkotsu v5.1CVS
Generated Mon May 9 04:58:43 2016 by Doxygen 1.6.3