~nightshade-dev/nightshade/trunk

« back to all changes in this revision

Viewing changes to src/core.h

  • Committer: Trystan Larey-Williams
  • Date: 2011-06-01 23:25:13 UTC
  • mfrom: (128.15.20 trunk)
  • Revision ID: tlareywi@trystan.digitaliseducation-20110601232513-xpimcjm6immeonp0
local merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
1097
1097
                return atmosphere->getFadeDuration();
1098
1098
        }
1099
1099
 
1100
 
        //! Set light pollution luminance (in cd/m^2???)
1101
 
        void setLightPollutionLuminance(float lum) {
 
1100
        //! Set light pollution limiting magnitude (naked eye)
 
1101
        void setLightPollutionLimitingMagnitude(float mag) {
 
1102
                lightPollutionLimitingMagnitude = mag;
 
1103
                float ln = log(mag);
 
1104
                float lum = 30.0842967491175 -19.9408790405749*ln +2.12969160094949*ln*ln - .2206;
1102
1105
                atmosphere->setLightPollutionLuminance(lum);
1103
1106
        }
1104
 
        //! Get light pollution luminance
1105
 
        float getLightPollutionLuminance(void) const {
1106
 
                return atmosphere->getLightPollutionLuminance();
 
1107
        //! Get light pollution limiting magnitude
 
1108
        float getLightPollutionLimitingMagnitude(void) const {
 
1109
                return lightPollutionLimitingMagnitude;
1107
1110
        }
1108
1111
 
1109
1112
        ///////////////////////////////////////////////////////////////////////////////////////
1333
1336
 
1334
1337
        // Manage geodesic grid
1335
1338
        GeodesicGrid* geodesic_grid;
 
1339
 
 
1340
        float lightPollutionLimitingMagnitude;  // Defined naked eye limiting magnitude (due to light pollution)
1336
1341
};
1337
1342
 
1338
1343
#endif // _CORE_H_