Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/ai/src/ai/ai_module.h @ 10290

Last change on this file since 10290 was 10244, checked in by tfahrni, 17 years ago

tired

File size: 1.4 KB
RevLine 
[10029]1
2#ifndef _AI_MODULE_H
3#define _AI_MODULE_H
[10138]4#include "world_entity.h"
[10112]5class NPC2;
[10029]6
[10135]7class AIModule {
[10029]8 public:
[10244]9        inline AIModule(){taskComplete=false;}
[10138]10   virtual ~AIModule(){}
11   virtual void process(float dt){}
[10177]12
[10138]13        inline void setDestination(Vector destination){this->destination=destination;}
[10158]14        inline void setDestinationMovement(Vector destinationMovement){this->destinationMovement=destinationMovement;}
[10177]15        inline void setWeight(int weight){this->weight=weight;}
16        inline void setTarget(WorldEntity* target){this->target=target;}
[10226]17        inline void setNPC(WorldEntity* npc){this->npc=npc;}
[10177]18
[10226]19        inline Vector getPosition(){return npc->getAbsCoor();}
20        inline Vector getMovement(){return movement;}
21        inline Vector getView(){return view;}
22        inline WorldEntity* getNPC(){return npc;}
23        inline WorldEntity* getTarget(){return target;}
24        inline float getWeight(){return weight;}
25        inline float getMaxAcceleration(){return accelerationMax;}
26        inline float getMaxSpeed(){return speedMax;}
[10244]27        inline float getNPCRadius(){return getRadius(npc);}
[10226]28
[10244]29        inline bool done(){return taskComplete;}
30
[10226]31        void getAttributesFrom(AIModule* oldModule);
32
[10061]33 protected:
[10226]34        float getRadius(WorldEntity* object);
[10177]35
[10138]36        Vector destination;
[10158]37        Vector destinationMovement;
[10226]38        Vector destinationView;
39
[10244]40        bool taskComplete;
[10158]41        Vector movement;
[10226]42        Vector view;
[10177]43
[10226]44        WorldEntity* npc;
45        WorldEntity* target;
46
[10177]47        float weight;
48        float speedMax;
[10226]49        float accelerationMax;
[10029]50};
51
52#endif /* _AI_MODULE_H */
Note: See TracBrowser for help on using the repository browser.