ZodiacalLight.hpp   ZodiacalLight.hpp 
skipping to change at line 28 skipping to change at line 28
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#ifndef _ZODIACALLIGHT_ #ifndef _ZODIACALLIGHT_
#define _ZODIACALLIGHT_ #define _ZODIACALLIGHT_
#include <QVector> #include <QVector>
#include "StelModule.hpp" #include "StelModule.hpp"
#include "VecMath.hpp" #include "VecMath.hpp"
#include "StelTextureTypes.hpp" #include "StelTextureTypes.hpp"
#include "StelLocation.hpp"
//! @class ZodiacalLight //! @class ZodiacalLight
//! Manages the displaying of the Zodiacal Light. The brightness values fol low the paper: //! Manages the displaying of the Zodiacal Light. The brightness values fol low the paper:
//! S. M. Kwon, S. S. Hong, J. L. Weinberg //! S. M. Kwon, S. S. Hong, J. L. Weinberg
//! An observational model of the zodiacal light brightness distribution //! An observational model of the zodiacal light brightness distribution
//! New Astronomy 10 (2004) 91-107. doi:10.1016/j.newast.2004.05.004 //! New Astronomy 10 (2004) 91-107. doi:10.1016/j.newast.2004.05.004
// GZ OCRed and hand-edited the table in Excel, first filling the missing d ata around the sun with values based on // GZ OCRed and hand-edited the table in Excel, first filling the missing d ata around the sun with values based on
// Leinert 1975: Zodiacal Light - A Measure of the Interplanetary Environme nt. Space Science Reviews 18, 281-339. // Leinert 1975: Zodiacal Light - A Measure of the Interplanetary Environme nt. Space Science Reviews 18, 281-339.
// From the combined table, I tried to create a texture. Image editing hide s the numbers, so I finally exported the // From the combined table, I tried to create a texture. Image editing hide s the numbers, so I finally exported the
// data (power 0.75) into a 3D surface which I edited in Sketchup: fill the data hole "mountain" with believeable values. // data (power 0.75) into a 3D surface which I edited in Sketchup: fill the data hole "mountain" with believeable values.
skipping to change at line 59 skipping to change at line 60
class ZodiacalLight : public StelModule class ZodiacalLight : public StelModule
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(bool flagZodiacalLightDisplayed Q_PROPERTY(bool flagZodiacalLightDisplayed
READ getFlagShow READ getFlagShow
WRITE setFlagShow WRITE setFlagShow
NOTIFY zodiacalLightDisplayedChanged) NOTIFY zodiacalLightDisplayedChanged)
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:
ZodiacalLight(); ZodiacalLight();
virtual ~ZodiacalLight(); virtual ~ZodiacalLight();
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Methods defined in the StelModule class // Methods defined in the StelModule class
//! Initialize the class. Here we load the texture for the Zodiacal Light and //! Initialize the class. Here we load the texture for the Zodiacal Light 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 Zodiacal Light is displayed or not, and the in tensity setting. //! determines if the Zodiacal Light is displayed or not, and the in tensity setting.
skipping to change at line 89 skipping to change at line 93
//! Used to determine the order in which the various modules are dra wn. MilkyWay=1, TOAST=7, we use 8. //! Used to determine the order in which the various modules are dra wn. MilkyWay=1, TOAST=7, we use 8.
//! Other actions return 0 for "nothing special". //! Other actions return 0 for "nothing special".
virtual double getCallOrder(StelModuleActionName actionName) const; virtual double getCallOrder(StelModuleActionName actionName) const;
//////////////////////////////////////////////////////////////////// /////////////////// //////////////////////////////////////////////////////////////////// ///////////////////
// Setter and getters // Setter and getters
public slots: public slots:
//! Get Zodiacal Light intensity. //! Get Zodiacal Light intensity.
double getIntensity() const {return intensity;} double getIntensity() const {return intensity;}
//! Set Zodiacal Light intensity. //! Set Zodiacal Light intensity. Default value: 1.
//! @param aintensity intensity of Zodiacal Light //! @param aintensity intensity of Zodiacal Light
void setIntensity(double aintensity) {if(aintensity!=intensity){inte nsity = aintensity; emit intensityChanged(intensity);}} void setIntensity(double aintensity) {if(aintensity!=intensity){inte nsity = aintensity; emit intensityChanged(intensity);}}
//! Get the color used for rendering the Zodiacal Light //! Get the color used for rendering the Zodiacal Light. It is modul ated 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 Zodiacal Light //! Sets the color to use for rendering the Zodiacal Light
//! @param c The color to use for rendering the Zodiacal Light //! @param c The color to use for rendering the Zodiacal Light. Defa ult (1.0, 1.0, 1.0).
//! @code //! @code
//! // example of usage in scripts //! // example of usage in scripts
//! ZodiacalLight.setColor(Vec3f(1.0,0.0,0.0)); //! ZodiacalLight.setColor(Vec3f(1.0,0.0,0.0));
//! @endcode //! @endcode
void setColor(const Vec3f& c) {color=c;} void setColor(const Vec3f& c) {if (c!=color) { color=c; emit colorCh anged(c);}}
//! Sets whether to show the Zodiacal Light //! Sets whether to show the Zodiacal Light
//! @code //! @code
//! // example of usage in scripts //! // example of usage in scripts
//! ZodiacalLight.setFlagShow(true); //! ZodiacalLight.setFlagShow(true);
//! @endcode //! @endcode
void setFlagShow(bool b); void setFlagShow(bool b);
//! Gets whether the Zodiacal Light is displayed //! Gets whether the Zodiacal Light is displayed
bool getFlagShow(void) const; bool getFlagShow(void) const;
private slots:
//! connect to StelCore to force-update ZL.
void handleLocationChanged(StelLocation loc);
signals: signals:
void zodiacalLightDisplayedChanged(const bool displayed); void zodiacalLightDisplayedChanged(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;
double lastJD; // keep date of last computation. Position will be up dated only if far enough away from last computation. double lastJD; // keep date of last computation. Position will be up dated only if far enough away from last computation.
struct StelVertexArray* vertexArray; struct StelVertexArray* vertexArray;
QVector<Vec3d> eclipticalVertices; QVector<Vec3d> eclipticalVertices;
 End of changes. 8 change blocks. 
6 lines changed or deleted 15 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/