Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/ai/ai_module.h @ 10472

Last change on this file since 10472 was 10376, checked in by patrick, 18 years ago

merged branche ai to trunk

File size: 1.6 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;}
[10349]18        inline void setMaxSpeed(float maxSpeed){this->maxSpeed=maxSpeed;}
19        inline void setAttackDistance(float attackDistance){this->attackDistance=attackDistance;}
[10177]20
[10226]21        inline Vector getPosition(){return npc->getAbsCoor();}
22        inline Vector getMovement(){return movement;}
23        inline Vector getView(){return view;}
24        inline WorldEntity* getNPC(){return npc;}
25        inline WorldEntity* getTarget(){return target;}
26        inline float getWeight(){return weight;}
27        inline float getMaxAcceleration(){return accelerationMax;}
[10349]28        inline float getMaxSpeed(){return maxSpeed;}
29        inline float getAttackDistance(){return attackDistance;}
[10244]30        inline float getNPCRadius(){return getRadius(npc);}
[10226]31
[10244]32        inline bool done(){return taskComplete;}
33
[10226]34        void getAttributesFrom(AIModule* oldModule);
35
[10061]36 protected:
[10226]37        float getRadius(WorldEntity* object);
[10177]38
[10138]39        Vector destination;
[10158]40        Vector destinationMovement;
[10226]41        Vector destinationView;
42
[10244]43        bool taskComplete;
[10158]44        Vector movement;
[10226]45        Vector view;
[10177]46
[10226]47        WorldEntity* npc;
48        WorldEntity* target;
49
[10177]50        float weight;
[10349]51        float maxSpeed;
52        float attackDistance;
[10226]53        float accelerationMax;
[10029]54};
55
56#endif /* _AI_MODULE_H */
Note: See TracBrowser for help on using the repository browser.