12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- #ifndef PICTURE_ENVIRONMENT_H
- #define PICTURE_ENVIRONMENT_H
- #include "Platform/Platform.hpp"
- #include <Agents/Perception/Perception.hpp>
- #include <Control/EnvInputs.hpp>
-
- class Agent;
-
- class PictureEnvironment
- { // The class
- public: // Access specifier
- std::string fFilePath;
- sf::RenderWindow* fWindow;
- util::Platform* fPlatform;
- const sf::Vector2f fSize;
- sf::Vector2f fInitialSize;
- sf::Event fEvent;
- sf::RectangleShape fShape;
- EnvInputs fInputs;
-
- sf::Texture fTextureImage;
- sf::Image fImage;
- sf::Image fOriginalImage;
-
- std::vector<std::unique_ptr<Agent>> fAgents;
- std::list<Agent>::iterator fAgentsIterator;
-
- PictureEnvironment(std::string& iFilePath, sf::RenderWindow* iWindow, util::Platform* iPlatform, bool iDisplayOriginal);
- void getPerception(Perception* ioPercept, int iX, int iY);
- void makeAgents(int iNumber, int iDotSize, int iMoveSize);
- void makeRepaintAgents(int iNumber, int iDotSize, int iMoveSize, int iTolerance);
- void makePullPaintAgents(int iNumber, int iDotSize, int iMoveSize);
- void makeStraightRepaintAgents(int iNumber, int iDotSize, int iMoveSize, int iTolerance);
- bool paint(int iX, int iY, const sf::Color Color);
-
- sf::Uint32 getCell(int iX, int iY);
- sf::Uint32 getCellOriginal(int iX, int iY);
-
- int getWidth();
- int getHeight();
- bool loop();
- void displayLockInput();
-
- private:
- bool fDisplayOriginal;
- PictureEnvironment();
- };
-
- #endif // PICTURE_ENVIRONMENT_H
|