Last change
on this file since 7134 was
5040,
checked in by bensch, 19 years ago
|
orxonox/trunk: inventing a new Way to get all the different kinds of User-Interface-Control below one hat.
This should be the ground-stone for all the different Camera-Modi as proposed in ticket:60 and ticket:61.
Maybe, there will be a better idea soon. In this case i would not implement, what i am doing here. :/
|
File size:
951 bytes
|
Line | |
---|
1 | /*! |
---|
2 | * @file user_control.h |
---|
3 | * @brief Control of the stearing device by the User |
---|
4 | */ |
---|
5 | |
---|
6 | #ifndef _USER_CONTROL_H |
---|
7 | #define _USER_CONTROL_H |
---|
8 | |
---|
9 | #include "base_object.h" |
---|
10 | |
---|
11 | typedef enum ControlType |
---|
12 | { |
---|
13 | CONTROL_AIM_MOVE_ON_SCREEN, |
---|
14 | CONTROL_AIM_STAYS_CENTERED, |
---|
15 | CONTROL_AIM_SMOOTHES_CAMERA, |
---|
16 | CONTROL_AIM_MOVES_SCREEN_ON_EDGE, |
---|
17 | }; |
---|
18 | |
---|
19 | // FORWARD DECLARATION |
---|
20 | class PNode; |
---|
21 | |
---|
22 | |
---|
23 | //! A Class the main input device uses for stearing the Ship/human/whatsoever through the level |
---|
24 | class UserControl : public BaseObject { |
---|
25 | |
---|
26 | public: |
---|
27 | UserControl(); |
---|
28 | virtual ~UserControl(); |
---|
29 | |
---|
30 | void setAffectedObjects(PNode* camera, PNode* target); |
---|
31 | void setFollowObject(PNode* follower); |
---|
32 | |
---|
33 | void setControlType(ControlType controlType); |
---|
34 | |
---|
35 | private: |
---|
36 | ControlType controlType; |
---|
37 | float speed; |
---|
38 | float suspense; |
---|
39 | |
---|
40 | PNode* camera; |
---|
41 | PNode* target; |
---|
42 | PNode* follower; |
---|
43 | |
---|
44 | }; |
---|
45 | |
---|
46 | #endif /* _USER_CONTROL_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.