MilkyWay.hpp   MilkyWay.hpp 
skipping to change at line 39 skipping to change at line 39
class MilkyWay : public StelModule class MilkyWay : public StelModule
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(bool flagMilkyWayDisplayed Q_PROPERTY(bool flagMilkyWayDisplayed
READ getFlagShow READ getFlagShow
WRITE setFlagShow WRITE setFlagShow
NOTIFY milkyWayDisplayedChanged) NOTIFY milkyWayDisplayedChanged)
Q_PROPERTY(double intensity Q_PROPERTY(double intensity
READ getIntensity READ getIntensity
WRITE setIntensity WRITE setIntensity
NOTIFY intensityChanged NOTIFY intensityChanged)
) Q_PROPERTY(Vec3f color
READ getColor
WRITE setColor
NOTIFY colorChanged)
public: public:
MilkyWay(); MilkyWay();
virtual ~MilkyWay(); virtual ~MilkyWay();
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Methods defined in the StelModule class // Methods defined in the StelModule class
//! Initialize the class. Here we load the texture for the Milky Wa y and //! Initialize the class. Here we load the texture for the Milky Wa y and
//! get the display settings from application settings, namely the f lag which //! get the display settings from application settings, namely the f lag which
//! determines if the Milky Way is displayed or not, and the intensi ty setting. //! determines if the Milky Way is displayed or not, and the intensi ty setting.
virtual void init(); virtual void init();
skipping to change at line 69 skipping to change at line 71
//! actionDraw returns 1 (because this is background, very early dra wing). //! actionDraw returns 1 (because this is background, very early dra wing).
//! Other actions return 0 for no action. //! Other actions return 0 for no action.
virtual double getCallOrder(StelModuleActionName actionName) const; virtual double getCallOrder(StelModuleActionName actionName) const;
//////////////////////////////////////////////////////////////////// /////////////////// //////////////////////////////////////////////////////////////////// ///////////////////
// Setter and getters // Setter and getters
public slots: public slots:
//! Get Milky Way intensity. //! Get Milky Way intensity.
double getIntensity() const {return intensity;} double getIntensity() const {return intensity;}
//! Set Milky Way intensity. //! Set Milky Way intensity. Default value: 1.
void setIntensity(double aintensity) {if(aintensity!=intensity){ int ensity = aintensity; emit intensityChanged(intensity); }} void setIntensity(double aintensity) {if(aintensity!=intensity){ int ensity = aintensity; emit intensityChanged(intensity); }}
//! Get the color used for rendering the milky way //! Get the color used for rendering the Milky Way. It is modulated by intensity, light pollution and atmospheric extinction.
Vec3f getColor() const {return color;} Vec3f getColor() const {return color;}
//! Sets the color to use for rendering the milky way //! Sets the color to use for rendering the Milky Way
void setColor(const Vec3f& c) {color=c;} //! @param c The color to use for rendering the Milky Way. Default (
1.0, 1.0, 1.0)
//! @code
//! // example of usage in scripts
//! MilkyWay.setColor(Vec3f(0.7,1.0,0.8));
//! @endcode
void setColor(const Vec3f& c) {if (c!=color) { color=c; emit colorCh
anged(c);}}
//! Sets whether to show the Milky Way //! Sets whether to show the Milky Way
void setFlagShow(bool b); void setFlagShow(bool b);
//! Gets whether the Milky Way is displayed //! Gets whether the Milky Way is displayed
bool getFlagShow(void) const; bool getFlagShow(void) const;
signals: signals:
void milkyWayDisplayedChanged(const bool displayed); void milkyWayDisplayedChanged(const bool displayed);
void intensityChanged(double intensity); void intensityChanged(double intensity);
void colorChanged(Vec3f color);
private: private:
StelTextureSP tex; StelTextureSP tex;
Vec3f color; // global color Vec3f color; // global color
double intensity; double intensity;
class LinearFader* fader; class LinearFader* fader;
struct StelVertexArray* vertexArray; struct StelVertexArray* vertexArray;
}; };
 End of changes. 5 change blocks. 
7 lines changed or deleted 17 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/