#ifndef _SCREEN_DOME_H_ #define _SCREEN_DOME_H_ #include "screen/ScreenShape.h" namespace projection { /** * Dome screen class. */ class ScreenDome : public ScreenShape { public: /** * Constructor. * * @param pScreen Screen data. */ ScreenDome(Screen* pScreen); /** * Destructor. */ virtual ~ScreenDome(); /** * Retrieve name of the sceen shape. * * @return Name of the screen shape. */ QString getName() const { return "Dome"; } /** * Set radius of the dome screen. * * @param radius Radius of the dome screen. */ void setRadius(double radius); /** * Retrieve radius of the dome screen. * * @return Radius of the dome screen. */ double getRadius() const { return m_radius; } /** * Set elevation resolution of the dome screen. * * @param resolution Elevation resolution of the dome screen. */ void setElevResolution(unsigned int resolution); /** * Retrieve elevation resolution of the dome screen. * * @return Elevation resolution of the dome screen. */ unsigned int getElevResolution() const { return m_elevResolution; } /** * Set azimuth resolution of the dome screen. * * @param resolution Azimuth resolution of the dome screen. */ void setAzimResolution(unsigned int resolution); /** * Retrieve azimuth resolution of the dome screen. * * @return Azimuth resolution of the dome screen. */ unsigned int getAzimResolution() const { return m_azimResolution; } /** * Set subdivision steps of the dome screen. * * @param subdiv Subdivision steps of the dome screen. */ void setSubdivision(unsigned int subdiv); /** * Retrieve subdivision steps of the dome screen. * * @return Subdivision steps of the dome screen. */ unsigned int getSubdivision() const { return m_subdiv; } /** * Select full dome or half dome. * * @param bFullDome True to select a full dome, False to select a half dome. */ void setFullDome(bool bFullDome); /** * Check whether full dome or half dome. * * @return True is a full dome, False is a half dome. */ bool getFullDome() const { return m_bFullDome; } /** * Retrieve bounding box of the screen shape. * * @param min One corner of the screen shape. * @param max Another corner of the screen shape. */ void getBoundingBox(gmtl::Vec3f& min, gmtl::Vec3f& max); /** * Restore the screen shape from XML data. * * @param element Parent XML element of the screen shape data. */ virtual bool initFromDOMElement(const QDomElement& element); /** * Store the current screen shape as XML data. * * @param name XML node name of the data. * @param doc XML document to store the data. * @return Current screen shape data as XML data. */ virtual QDomElement domElement(const QString& name, QDomDocument& doc) const; protected: /** * Draw the shape model in inherited class. * * @param bFrame True to draw a wire frame mesh. False to draw as a polygon model. */ void drawShape(bool bFrame); protected: double m_radius; //!< Radius. unsigned int m_elevResolution; //!< Elevation resolution. unsigned int m_azimResolution; //!< Azimuth resolution. int m_subdiv; //!< Subdivision steps. bool m_bFullDome; //!< True is a full dome, False is a half dome. }; }; // projection #endif // _SCREEN_DOME_H_