Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 21, 2011, 5:36:37 PM (13 years ago)
Author:
jo
Message:

Moved intern waypoint functionallity from the waypointController to its base class ArtificialController. Further usage of this is planned.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ai2/src/orxonox/controllers/ArtificialController.h

    r8763 r8769  
    8484                { return this->botlevel_; }
    8585            static void setAllBotLevel(float level);
     86            //WAYPOINT FUNCTIONS
     87            void addWaypoint(WorldEntity* waypoint);
     88            WorldEntity* getWaypoint(unsigned int index) const;
     89
     90            inline void setAccuracy(float accuracy)
     91                { this->squaredaccuracy_ = accuracy*accuracy; }
     92            inline float getAccuracy() const
     93                { return sqrt(this->squaredaccuracy_); }
     94            void updatePointsOfInterest(std::string name, float distance);
    8695
    8796        protected:
     
    149158            bool bShooting_;
    150159
    151             std::map<std::string, int> weaponModes_; //<! Links each "weapon" to it's weaponmode- managed by setupWeapons()
    152             //std::vector<int> projectiles_; //<! Displays amount of projectiles of each weapon. - managed by setupWeapons()
    153160            float botlevel_; //<! Makes the level of a bot configurable.
    154             float timeout_; //<! Timeout for rocket usage. (If a rocket misses, a bot should stop using it.)
    155 
    156161            enum Mode {DEFAULT, ROCKET, DEFENCE, MOVING};//TODO; implement DEFENCE, MOVING modes
    157162            Mode mode_; //TODO: replace single value with stack-like implementation: std::vector<Mode> mode_;
    158163            void setPreviousMode();
     164
     165            //WEAPONSYSTEM DATA
     166            std::map<std::string, int> weaponModes_; //<! Links each "weapon" to it's weaponmode- managed by setupWeapons()
     167            //std::vector<int> projectiles_; //<! Displays amount of projectiles of each weapon. - managed by setupWeapons()
     168            float timeout_; //<! Timeout for rocket usage. (If a rocket misses, a bot should stop using it.)
    159169            void setupWeapons(); //<! Defines which weapons are available for a bot. Is recalled whenever a bot was killed.
    160170            bool bSetupWorked; //<! If false, setupWeapons() is called.
    161171            int getFiremode(std::string name);
     172
     173            //WAYPOINT DATA
     174            std::vector<WorldEntity*> waypoints_;
     175            size_t currentWaypoint_;
     176            float squaredaccuracy_;
    162177    };
    163178}
Note: See TracChangeset for help on using the changeset viewer.