[Kstars-devel] Re: KDE/kdeedu/kstars/kstars/projections

Henry de Valence hdevalence at gmail.com
Sat Feb 12 20:03:51 CET 2011


Is there a reason why the onVisibleHemisphere code was changed?

On 12 February 2011 09:58, Jérôme Sonrier <jsid at emor3j.fr.eu.org> wrote:
> SVN commit 1220031 by jsonrier:
>
> Repair equirectangular projection.
>
> Signatures of Projector::toScreenVec and EquirectangularProjector::toScreenVec was not exactly the same : overriding wasn't acheived.
>
>
> CCMAIL: kstars-devel at kde.org
>
>
>
>  M  +2 -3      equirectangularprojector.cpp
>  M  +1 -1      equirectangularprojector.h
>
>
> --- trunk/KDE/kdeedu/kstars/kstars/projections/equirectangularprojector.cpp #1220030:1220031
> @@ -40,7 +40,7 @@
>     return 1.0;
>  }
>
> -Vector2f EquirectangularProjector::toScreenVec(SkyPoint* o, bool oRefract, bool* onVisibleHemisphere) const
> +Vector2f EquirectangularProjector::toScreenVec(const SkyPoint* o, bool oRefract, bool* onVisibleHemisphere) const
>  {
>     double Y, dX;
>     Vector2f p;
> @@ -65,8 +65,7 @@
>     p[0] = 0.5*m_vp.width - m_vp.zoomFactor*dX;
>
>     if ( onVisibleHemisphere )
> -        //Is fabs(dX) < M_PI/2?
> -        *onVisibleHemisphere = dX*dX < M_PI*M_PI/4.;
> +        *onVisibleHemisphere = true;
>
>     return p;
>  }
> --- trunk/KDE/kdeedu/kstars/kstars/projections/equirectangularprojector.h #1220030:1220031
> @@ -31,7 +31,7 @@
>     virtual SkyMap::Projection type() const;
>     virtual double radius() const;
>     virtual bool unusablePoint( const QPointF& p) const;
> -    virtual Vector2f toScreenVec(SkyPoint* o, bool oRefract = true, bool* onVisibleHemisphere = 0) const;
> +    virtual Vector2f toScreenVec(const SkyPoint* o, bool oRefract = true, bool* onVisibleHemisphere = 0) const;
>     virtual SkyPoint fromScreen(const QPointF& p, dms* LST, const dms* lat) const;
>     virtual QVector< Vector2f > groundPoly(SkyPoint* labelpoint = 0, bool* drawLabel = 0) const;
>  };
> _______________________________________________
> Kstars-devel mailing list
> Kstars-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kstars-devel
>


More information about the Kstars-devel mailing list