~ubuntu-branches/debian/jessie/stellarium/jessie

« back to all changes in this revision

Viewing changes to src/core/modules/StarWrapper.hpp

  • Committer: Package Import Robot
  • Author(s): Tomasz Buchert
  • Date: 2012-05-18 13:26:18 UTC
  • mfrom: (1.2.7)
  • Revision ID: package-import@ubuntu.com-20120518132618-3uso09fo68c218cx
Tags: 0.11.2-1
* Imported Upstream version 0.11.1 and then 0.11.2 (Closes: #658431)
* Change maintainer (Closes: #668916)
* Machine-readable copyright file
* Bump Standards-Version to 3.9.3
* Update debhelper compat to 9
* Fix lintian duplicate-font-file warning
* Fix copyright-refers-to-symlink-license lintian tag
* Add lintian override for embedded-library error

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 *
15
15
 * You should have received a copy of the GNU General Public License
16
16
 * along with this program; if not, write to the Free Software
17
 
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
17
 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA  02110-1335, USA.
18
18
 */
19
19
 
20
20
#ifndef _STARWRAPPER_HPP_
85
85
        {
86
86
                return StelApp::getInstance().getVisionModeNight() ? Vec3f(0.8, 0.2, 0.2) : StelSkyDrawer::indexToColor(s->bV);
87
87
        }
88
 
        float getVMagnitude(const StelCore*) const
 
88
        float getVMagnitude(const StelCore* core, bool withExtinction=false) const
89
89
        {
90
 
                return 0.001f*a->mag_min + s->mag*(0.001f*a->mag_range)/a->mag_steps;
 
90
            float extinctionMag=0.0; // track magnitude loss
 
91
            if (withExtinction && core->getSkyDrawer()->getFlagHasAtmosphere())
 
92
            {
 
93
                double alt=getAltAzPosApparent(core)[2];
 
94
                core->getSkyDrawer()->getExtinction().forward(&alt, &extinctionMag);
 
95
            }
 
96
 
 
97
                return 0.001f*a->mag_min + s->mag*(0.001f*a->mag_range)/a->mag_steps  + extinctionMag;
91
98
        }
92
 
        float getSelectPriority(const StelCore* core) const {return getVMagnitude(core);}
 
99
        float getSelectPriority(const StelCore* core) const {return getVMagnitude(core, false);}
93
100
        float getBV(void) const {return s->getBV();}
94
101
        QString getEnglishName(void) const {return QString();}
95
102
        QString getNameI18n(void) const {return s->getNameI18n();}