ScummVM API documentation
flight_manager_base.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef TITANIC_FLIGHT_MANAGER_BASE_H
23 #define TITANIC_FLIGHT_MANAGER_BASE_H
24 
25 #include "titanic/star_control/fvector.h"
26 #include "titanic/star_control/orientation_changer.h"
27 #include "common/array.h"
28 
29 namespace Titanic {
30 
31 #define GAMMA_TABLE_SIZE 32
32 
33 class CErrorCode;
34 class FMatrix;
35 enum MoverState { NOT_ACTIVE = 0, MOVING = 1, DONE_MOVING = 2 };
36 
41 protected:
42  bool _active;
43  FVector _srcPos, _destPos;
44  double _distance;
45  FVector _direction;
46  bool _flight;
47  double _step;
48  double _step1;
49  int _accCount;
50  int _traCount;
51  int _decCount;
52  int _totCount;
53  double _gammaTable[GAMMA_TABLE_SIZE];
54  double _currentSpin;
55  double _spinStep;
56  COrientationChanger _orientationChanger;
57 public:
59  virtual ~CFlightManagerBase() {}
60 
64  void clear();
65 
69  void setPath(const FVector &from, const FVector &to);
70 
74  virtual MoverState move(CErrorCode &errorCode, FVector &pos, FMatrix &orientation) { return DONE_MOVING; }
75 
79  virtual void buildMotionTable(int sustain, int decay, float distance);
80 
81  bool isActive() const { return _active; }
82 };
83 
84 } // End of namespace Titanic
85 
86 #endif /* TITANIC_FLIGHT_MANAGER_BASE_H */
Definition: fmatrix.h:35
Definition: orientation_changer.h:30
virtual MoverState move(CErrorCode &errorCode, FVector &pos, FMatrix &orientation)
Definition: flight_manager_base.h:74
virtual void buildMotionTable(int sustain, int decay, float distance)
Definition: error_code.h:27
Definition: arm.h:30
Definition: flight_manager_base.h:40
void setPath(const FVector &from, const FVector &to)
Definition: fvector.h:36