Comet.hpp   Comet.hpp 
skipping to change at line 45 skipping to change at line 45
2014-11: GZ: tail extinction, better brightness balance. 2014-11: GZ: tail extinction, better brightness balance.
*/ */
class Comet : public Planet class Comet : public Planet
{ {
public: public:
friend class SolarSystem; // Solar System initializes static constants. friend class SolarSystem; // Solar System initializes static constants.
Comet(const QString& englishName, Comet(const QString& englishName,
int flagLighting, int flagLighting,
double radius, double radius,
double oblateness, double oblateness,
Vec3f color, Vec3f halocolor,
float albedo, float albedo,
const QString& texMapName, const QString& texMapName,
posFuncType _coordFunc, posFuncType _coordFunc,
void* userDataPtr, void* userDataPtr,
OsculatingFunctType *osculatingFunc, OsculatingFunctType *osculatingFunc,
bool closeOrbit, bool closeOrbit,
bool hidden, bool hidden,
const QString &pTypeStr, const QString &pTypeStr,
float dustTailWidthFact=1.5f, float dustTailWidthFact=1.5f,
float dustTailLengthFact=0.4f, float dustTailLengthFact=0.4f,
skipping to change at line 99 skipping to change at line 99
//! different distances from the Sun. They are not used in the same way //! different distances from the Sun. They are not used in the same way
//! as the same parameters in MinorPlanet. //! as the same parameters in MinorPlanet.
void setAbsoluteMagnitudeAndSlope(const double magnitude, const doub le slope); void setAbsoluteMagnitudeAndSlope(const double magnitude, const doub le slope);
//! set value for semi-major axis in AU //! set value for semi-major axis in AU
void setSemiMajorAxis(const double value); void setSemiMajorAxis(const double value);
//! get sidereal period for comet, days, or returns 0 if not possibl e (paraboloid, hyperboloid orbit) //! get sidereal period for comet, days, or returns 0 if not possibl e (paraboloid, hyperboloid orbit)
virtual double getSiderealPeriod() const; virtual double getSiderealPeriod() const;
//! GZ: override from Planet: extend with tail details.
//virtual void computePosition(const double date);
//! re-implementation of Planet's draw() //! re-implementation of Planet's draw()
virtual void draw(StelCore* core, float maxMagLabels, const QFont& p lanetNameFont); virtual void draw(StelCore* core, float maxMagLabels, const QFont& p lanetNameFont);
// re-implementation of Planet's update() to prepare tails (extincti on etc). @param deltaTime: ms (since last call) // re-implementation of Planet's update() to prepare tails (extincti on etc). @param deltaTime: ms (since last call)
// TODO: computePosition can be removed and things added here!
virtual void update(int deltaTime); virtual void update(int deltaTime);
private: private:
//! @returns estimates for (Coma diameter [AU], gas tail length [AU] ). //! @returns estimates for (Coma diameter [AU], gas tail length [AU] ).
//! Using the formula from Guide found by the GSoC2012 initiative at http://www.projectpluto.com/update7b.htm#comet_tail_formula //! Using the formula from Guide found by the GSoC2012 initiative at http://www.projectpluto.com/update7b.htm#comet_tail_formula
Vec2f getComaDiameterAndTailLengthAU(); Vec2f getComaDiameterAndTailLengthAU();
void drawTail(StelCore* core, StelProjector::ModelViewTranformP tran sfo, bool gas); void drawTail(StelCore* core, StelProjector::ModelViewTranformP tran sfo, bool gas);
void drawComa(StelCore* core, StelProjector::ModelViewTranformP tran sfo); void drawComa(StelCore* core, StelProjector::ModelViewTranformP tran sfo);
//! compute a coma, faked as simple disk to be tilted towards the ob server. //! compute a coma, faked as simple disk to be tilted towards the ob server.
skipping to change at line 142 skipping to change at line 138
double absoluteMagnitude; double absoluteMagnitude;
double slopeParameter; double slopeParameter;
double semiMajorAxis; double semiMajorAxis;
bool isCometFragment; bool isCometFragment;
bool nameIsProvisionalDesignation; bool nameIsProvisionalDesignation;
//GZ Tail additions //GZ Tail additions
Vec2f tailFactors; // result of latest call to getComaDiameterAndTai lLengthAU(); Results cached here for infostring. [0]=Coma diameter, [1] gas tail length. Vec2f tailFactors; // result of latest call to getComaDiameterAndTai lLengthAU(); Results cached here for infostring. [0]=Coma diameter, [1] gas tail length.
bool tailActive; //! true if there is a tail long eno ugh to be worth drawing. Drawing tails is quite costly. bool tailActive; //! true if there is a tail long eno ugh to be worth drawing. Drawing tails is quite costly.
bool tailBright; //! true if tail is bright enough to draw. bool tailBright; //! true if tail is bright enough to draw.
double deltaJDtail; //! like deltaJD, but time differenc double deltaJDEtail; //! like deltaJDE, but time differen
e between tail geometry updates. ce between tail geometry updates.
double lastJDtail; //! like lastJD, but time of last ta double lastJDEtail; //! like lastJDE, but time of last t
il geometry update. ail geometry update.
Mat4d gasTailRot; //! rotation matrix for gas tail par abola Mat4d gasTailRot; //! rotation matrix for gas tail par abola
Mat4d dustTailRot; //! rotation matrix for the skewed d ust tail parabola Mat4d dustTailRot; //! rotation matrix for the skewed d ust tail parabola
float dustTailWidthFactor; //!< empirical individual broadening of the dust tail end, compared to the gas tail end. Actually, dust tail wi dth=2*comaWidth*dustTailWidthFactor. Default 1.5 float dustTailWidthFactor; //!< empirical individual broadening of the dust tail end, compared to the gas tail end. Actually, dust tail wi dth=2*comaWidth*dustTailWidthFactor. Default 1.5
float dustTailLengthFactor; //!< empirical individual length of dust tail relative to gas tail. Taken from ssystem.ini, typical value 0.3.. 0.5, default 0.4 float dustTailLengthFactor; //!< empirical individual length of dust tail relative to gas tail. Taken from ssystem.ini, typical value 0.3.. 0.5, default 0.4
float dustTailBrightnessFactor; //!< empirical individual brightness of dust tail relative to gas tail. Taken from ssystem.ini, default 1.5 float dustTailBrightnessFactor; //!< empirical individual brightness of dust tail relative to gas tail. Taken from ssystem.ini, default 1.5
QVector<double> comaVertexArr; QVector<double> comaVertexArr;
QVector<float> comaTexCoordArr; // --> 2014-08: could also be decla red static, but it is filled by StelPainter... QVector<float> comaTexCoordArr; // --> 2014-08: could also be decla red static, but it is filled by StelPainter...
// These are to avoid having index arrays for each comet when all ar e equal. // These are to avoid having index arrays for each comet when all ar e equal.
static bool createTailIndices; static bool createTailIndices;
 End of changes. 4 change blocks. 
9 lines changed or deleted 5 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/