~ubuntu-branches/debian/squeeze/stellarium/squeeze

« back to all changes in this revision

Viewing changes to src/MappingClasses.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Cédric Delfosse
  • Date: 2008-05-19 21:28:23 UTC
  • mfrom: (3.1.5 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080519212823-m5nfiuntxstxzxj7
Tags: 0.9.1-4
Add libxcursor-dev, libxfixes-dev, libxinerama-dev, libqt4-opengl-dev to
build-deps (Closes: #479906)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _MAPPING_CLASSES_HPP_
 
2
#define _MAPPING_CLASSES_HPP_
 
3
 
 
4
#include "Mapping.hpp"
 
5
 
 
6
class MappingPerspective : public Mapping
 
7
{
 
8
public:
 
9
    MappingPerspective(void);
 
10
        std::string getName(void) const {return "perspective";} 
 
11
        static Mapping *getMapping(void) {return &instance;}
 
12
private:
 
13
        static MappingPerspective instance;
 
14
        bool forward(Vec3d &win) const;
 
15
        bool backward(Vec3d &v) const;
 
16
        double fovToViewScalingFactor(double fov) const;
 
17
        double viewScalingFactorToFov(double vsf) const;
 
18
        double deltaZoom(double fov) const;
 
19
};
 
20
 
 
21
class MappingEqualArea : public Mapping
 
22
{
 
23
public:
 
24
    MappingEqualArea(void);
 
25
        std::string getName(void) const {return "equal_area";} 
 
26
        static Mapping *getMapping(void) {return &instance;}
 
27
private:
 
28
        static MappingEqualArea instance;
 
29
        bool forward(Vec3d &win) const;
 
30
        bool backward(Vec3d &v) const;
 
31
        double fovToViewScalingFactor(double fov) const;
 
32
        double viewScalingFactorToFov(double vsf) const;
 
33
        double deltaZoom(double fov) const;
 
34
};
 
35
 
 
36
class MappingStereographic : public Mapping
 
37
{
 
38
public:
 
39
    MappingStereographic(void);
 
40
        std::string getName(void) const {return "stereographic";} 
 
41
        static Mapping *getMapping(void) {return &instance;}
 
42
private:
 
43
        static MappingStereographic instance;
 
44
        bool forward(Vec3d &win) const;
 
45
        bool backward(Vec3d &v) const;
 
46
        double fovToViewScalingFactor(double fov) const;
 
47
        double viewScalingFactorToFov(double vsf) const;
 
48
        double deltaZoom(double fov) const;
 
49
};
 
50
 
 
51
class MappingFisheye : public Mapping
 
52
{
 
53
public:
 
54
    MappingFisheye(void);
 
55
        std::string getName(void) const {return "fisheye";} 
 
56
        static Mapping *getMapping(void) {return &instance;}
 
57
private:
 
58
        static MappingFisheye instance;
 
59
        bool forward(Vec3d &win) const;
 
60
        bool backward(Vec3d &v) const;
 
61
        double fovToViewScalingFactor(double fov) const;
 
62
        double viewScalingFactorToFov(double vsf) const;
 
63
        double deltaZoom(double fov) const;
 
64
};
 
65
 
 
66
class MappingCylinder : public Mapping
 
67
{
 
68
public:
 
69
    MappingCylinder(void);
 
70
        std::string getName(void) const {return "cylinder";} 
 
71
        static Mapping *getMapping(void) {return &instance;}
 
72
private:
 
73
        static MappingCylinder instance;
 
74
        bool forward(Vec3d &win) const;
 
75
        bool backward(Vec3d &v) const;
 
76
        double fovToViewScalingFactor(double fov) const;
 
77
        double viewScalingFactorToFov(double vsf) const;
 
78
        double deltaZoom(double fov) const;
 
79
};
 
80
 
 
81
class MappingOrthographic : public Mapping
 
82
{
 
83
public:
 
84
    MappingOrthographic(void);
 
85
        std::string getName(void) const {return "orthographic";} 
 
86
        static Mapping *getMapping(void) {return &instance;}
 
87
private:
 
88
        static MappingOrthographic instance;
 
89
        bool forward(Vec3d &win) const;
 
90
        bool backward(Vec3d &v) const;
 
91
        double fovToViewScalingFactor(double fov) const;
 
92
        double viewScalingFactorToFov(double vsf) const;
 
93
        double deltaZoom(double fov) const;
 
94
};
 
95
 
 
96
#endif