Last change
on this file since 2964 was
2115,
checked in by chris, 20 years ago
|
orxonox/branches/chris: Managed to apply all that rotating and translating so that you now actually see the debug player following the track. You can even steer the spaceship via the keys now… unfortunately the coordinate transformations are still a mess. Even though mapping from Locations to Placements seems to work in general, applying the finetuned position and rotation still messes up the whole damn thing…
|
File size:
928 bytes
|
Line | |
---|
1 | /*! |
---|
2 | \file camera.h |
---|
3 | \brief Viewpoint controlling class definitions |
---|
4 | */ |
---|
5 | |
---|
6 | #ifndef CAMERA_H |
---|
7 | #define CAMERA_H |
---|
8 | |
---|
9 | #include "stdincl.h" |
---|
10 | |
---|
11 | class WorldEntity; |
---|
12 | |
---|
13 | //! Camera |
---|
14 | /** |
---|
15 | This class controls the viewpoint from which the World is rendered. To use the Camera it has |
---|
16 | to be bound to a WorldEntity which serves as the reference focus point. The Camera itself calls |
---|
17 | the WorldEntity::get_lookat() and World::calc_camera_pos() functions to calculate the position it |
---|
18 | currently should be in. |
---|
19 | */ |
---|
20 | class Camera { |
---|
21 | private: |
---|
22 | WorldEntity* bound; //!< the WorldEntity the Camera is bound to |
---|
23 | Placement actual_place; //!< the Camera's current position |
---|
24 | Placement desired_place; //!< where the Camera should be according to calculations |
---|
25 | |
---|
26 | void update_desired_place (); |
---|
27 | |
---|
28 | public: |
---|
29 | Camera (); |
---|
30 | ~Camera (); |
---|
31 | |
---|
32 | void time_slice (Uint32 deltaT); |
---|
33 | void apply (); |
---|
34 | void bind (WorldEntity* entity); |
---|
35 | void jump (Placement* plc); |
---|
36 | |
---|
37 | }; |
---|
38 | |
---|
39 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.