~masgk3team/masgk3/roads

« back to all changes in this revision

Viewing changes to OH3DCamera.h

  • Committer: Michał Janiszewski
  • Date: 2011-06-15 08:25:23 UTC
  • Revision ID: janisozaur@gmail.com-20110615082523-5whlmiwbawtlb3cz
fix camera

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef OH3DCAMERA_H_INCLUDED
 
2
#define OH3DCAMERA_H_INCLUDED
 
3
 
 
4
#include <QVector3D>
 
5
 
 
6
// manages camera settings (including position of the viewer and perspective settings)
 
7
class OH3DCamera {
 
8
                                // position of the viewer
 
9
                float   x, y, z;
 
10
                float elevation, azimuth, distance;
 
11
 
 
12
                int mode;
 
13
 
 
14
        public:
 
15
                static const int OH3D_CAMERA_FREE = 0;
 
16
                static const int OH3D_CAMERA_CENT = 1;
 
17
 
 
18
                OH3DCamera(int _mode = OH3D_CAMERA_CENT);
 
19
                OH3DCamera(     float _x, float _y, float _z,
 
20
                                        float _elevation, float _azimuth, float _distance, int _mode = OH3D_CAMERA_FREE);
 
21
                ~OH3DCamera();
 
22
 
 
23
                // postitions the camera in the scene, according to the current settings
 
24
                void setCamera();
 
25
 
 
26
                void setMode(int mode);
 
27
 
 
28
                int getMode() const;
 
29
 
 
30
                void moveTo(float x, float y, float z);
 
31
                void move(float dx, float dy, float dz);
 
32
                void setAngles(float elevation, float azimuth);
 
33
                void getAngles(float & elevation, float & azimuth);
 
34
                void move(float d);
 
35
                void rotate(float angleX, float angleY);
 
36
                void setDistance(float distance);
 
37
                void changeDistance(float dd);
 
38
 
 
39
                void setInverse();
 
40
 
 
41
                QVector3D getPosition();
 
42
};
 
43
 
 
44
#endif // OH3DCAMERA_H_INCLUDED