source: projectionDesigner/trunk/projdesigner/include/screen/ScreenDome.h @ 322

Last change on this file since 322 was 4, checked in by Torben Dannhauer, 15 years ago
File size: 3.7 KB
RevLine 
[4]1#ifndef _SCREEN_DOME_H_
2#define _SCREEN_DOME_H_
3
4#include "screen/ScreenShape.h"
5
6namespace projection
7{
8
9/**
10  * Dome screen class.
11  */
12class ScreenDome : public ScreenShape
13{
14public:
15
16    /**
17     * Constructor.
18     *
19     * @param pScreen Screen data.
20     */
21    ScreenDome(Screen* pScreen);
22
23    /**
24     * Destructor.
25     */
26    virtual ~ScreenDome();
27
28    /**
29     * Retrieve name of the sceen shape.
30     *
31     * @return Name of the screen shape.
32     */
33    QString getName() const { return "Dome"; }
34
35    /**
36     * Set radius of the dome screen.
37     *
38     * @param radius Radius of the dome screen.
39     */
40    void setRadius(double radius);
41
42    /**
43     * Retrieve radius of the dome screen.
44     *
45     * @return Radius of the dome screen.
46     */
47    double getRadius() const { return m_radius; }
48
49    /**
50     * Set elevation resolution of the dome screen.
51     *
52     * @param resolution Elevation resolution of the dome screen.
53     */
54    void setElevResolution(unsigned int resolution);
55
56    /**
57     * Retrieve elevation resolution of the dome screen.
58     *
59     * @return Elevation resolution of the dome screen.
60     */
61    unsigned int getElevResolution() const { return m_elevResolution; }
62
63    /**
64     * Set azimuth resolution of the dome screen.
65     *
66     * @param resolution Azimuth resolution of the dome screen.
67     */
68    void setAzimResolution(unsigned int resolution);
69
70    /**
71     * Retrieve azimuth resolution of the dome screen.
72     *
73     * @return Azimuth resolution of the dome screen.
74     */
75    unsigned int getAzimResolution() const { return m_azimResolution; }
76
77    /**
78     * Set subdivision steps of the dome screen.
79     *
80     * @param subdiv Subdivision steps of the dome screen.
81     */
82    void setSubdivision(unsigned int subdiv);
83
84    /**
85     * Retrieve subdivision steps of the dome screen.
86     *
87     * @return Subdivision steps of the dome screen.
88     */
89    unsigned int getSubdivision() const { return m_subdiv; }
90
91    /**
92     * Select full dome or half dome.
93     *
94     * @param bFullDome True to select a full dome, False to select a half dome.
95     */
96    void setFullDome(bool bFullDome);
97
98    /**
99     * Check whether full dome or half dome.
100     *
101     * @return True is a full dome, False is a half dome.
102     */
103    bool getFullDome() const { return m_bFullDome; }
104
105    /**
106     * Retrieve bounding box of the screen shape.
107     *
108     * @param min One corner of the screen shape.
109     * @param max Another corner of the screen shape.
110     */
111        void getBoundingBox(gmtl::Vec3f& min, gmtl::Vec3f& max);
112
113    /**
114     * Restore the screen shape from XML data.
115     *
116     * @param element Parent XML element of the screen shape data.
117     */
118        virtual bool initFromDOMElement(const QDomElement& element);
119
120    /**
121     * Store the current screen shape as XML data.
122     *
123     * @param name XML node name of the data.
124     * @param doc XML document to store the data.
125     * @return Current screen shape data as XML data.
126     */
127        virtual QDomElement domElement(const QString& name, QDomDocument& doc) const;
128
129protected:
130
131    /**
132     * Draw the shape model in inherited class.
133     *
134     * @param bFrame True to draw a wire frame mesh. False to draw as a polygon model.
135     */
136    void drawShape(bool bFrame);
137
138protected:
139
140    double m_radius;                //!< Radius.
141    unsigned int m_elevResolution;  //!< Elevation resolution.
142    unsigned int m_azimResolution;  //!< Azimuth resolution.
143    int m_subdiv;                   //!< Subdivision steps.
144    bool m_bFullDome;               //!< True is a full dome, False is a half dome.
145};
146
147}; // projection
148
149#endif // _SCREEN_DOME_H_
Note: See TracBrowser for help on using the repository browser.