Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/AI_HS15/src/orxonox/controllers/DivisionController.h @ 10709

Last change on this file since 10709 was 10709, checked in by gania, 9 years ago

Restructured

File size: 3.0 KB
Line 
1/*
2 *   ORXONOX - the hottest 3D action shooter ever to exist
3 *                    > www.orxonox.net <
4 *
5 *
6 *   License notice:
7 *
8 *   This program is free software; you can redistribute it and/or
9 *   modify it under the terms of the GNU General Public License
10 *   as published by the Free Software Foundation; either version 2
11 *   of the License, or (at your option) any later version.
12 *
13 *   This program is distributed in the hope that it will be useful,
14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 *   GNU General Public License for more details.
17 *
18 *   You should have received a copy of the GNU General Public License
19 *   along with this program; if not, write to the Free Software
20 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 *
22 *   Author:
23 *      Fabian 'x3n' Landau
24 *   Co-authors:
25 *      Dominik Solenicki
26 *
27 */
28
29#ifndef _DivisionController_H__
30#define _DivisionController_H__
31
32#include "controllers/LeaderController.h"
33
34
35
36namespace orxonox
37{
38    class _OrxonoxExport DivisionController : public LeaderController
39    {
40        public:
41                DivisionController(Context* context);
42                virtual ~DivisionController();
43
44                //virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
45
46                //Using british military aircraft formations
47                enum FormationMode {VEE,FINGER4,DIAMOND, WALL};
48                void setFormationMode(FormationMode val);
49                inline FormationMode getFormationMode() const
50                        { return this->formationMode_; }
51                        virtual void setLeader(LeaderController* leader);
52
53                       
54
55        protected:
56
57                //Target enemy, set by fleet controller.
58                WeakPtr<Pawn> target_;
59                bool bHasTargetPosition_;
60                        Vector3 targetPosition_;
61                        bool bHasTargetOrientation_;
62                        Quaternion targetOrientation_;
63                        FormationMode formationMode_;
64                       
65                        /*void setTargetPosition(const Vector3& target);
66                        void searchRandomTargetPosition();
67
68                        void setTargetOrientation(const Quaternion& orient);
69                        void setTargetOrientation(Pawn* target);
70
71                        virtual void positionReached() {}
72
73
74
75                        void setTarget(Pawn* target);
76
77                        void searchNewTarget();
78                    void forgetTarget();
79
80                        void targetDied();
81                        bool bShooting_;
82                        void aimAtTarget();
83
84            bool isCloseAtTarget(float distance) const;
85            bool isLookingAtTarget(float angle) const;
86
87                //Has nothing to do with desiredRelativePosition_,
88                //is set by fleet controller.
89                Vector3* desiredAbsolutePosition_;
90
91                enum Maneuver {NONE, SPIN, TURN180};
92                Maneuver maneuver_;
93
94                void moveToPosition(const Vector3& target);
95                    void moveToTargetPosition();
96                    void absoluteMoveToPosition(const Vector3& target);
97                    void copyOrientation(const Quaternion& orient);
98                    void copyTargetOrientation();
99
100                        void turn180Init();
101                    void spinInit();
102                    void spin();
103                void turn180();*/
104
105                LeaderController* leader_;
106               
107
108           
109        private:
110    };
111}
112
113#endif /* _DivisionController_H__ */
Note: See TracBrowser for help on using the repository browser.