23 #ifndef _REFRACTIONEXTINCTION_HPP_ 24 #define _REFRACTIONEXTINCTION_HPP_ 31 #include "VecMath.hpp" 32 #include "StelProjector.hpp" 63 Q_ASSERT(std::fabs(altAzPos.length()-1.f)<0.001f);
64 *mag += airmass(altAzPos[2],
false) * ext_coeff;
69 Q_ASSERT(std::fabs(altAzPos.length()-1.f)<0.001f);
70 *mag += airmass(altAzPos[2],
false) * ext_coeff;
78 *mag -= airmass(altAzPos[2],
false) * ext_coeff;
83 *mag -= airmass(altAzPos[2],
false) * ext_coeff;
89 float getExtinctionCoefficient()
const {
return ext_coeff;}
102 float airmass(
float cosZ,
const bool apparent_z=
true)
const;
146 void combine(
const Mat4d& m)
148 setPreTransfoMat(preTransfoMat*m);
151 Mat4d getApproximateLinearTransfo()
const {
return postTransfoMat*preTransfoMat;}
156 void setPressure(
float p_mbar);
157 float getPressure()
const {
return pressure;}
160 void setTemperature(
float t_C);
161 float getTemperature()
const {
return temperature;}
164 void setPreTransfoMat(
const Mat4d& m);
165 void setPostTransfoMat(
const Mat4d& m);
169 void updatePrecomputed();
171 void innerRefractionForward(
Vec3d& altAzPos)
const;
172 void innerRefractionBackward(
Vec3d& altAzPos)
const;
180 float press_temp_corr;
184 Mat4d invertPreTransfoMat;
185 Mat4f preTransfoMatf;
186 Mat4f invertPreTransfoMatf;
189 Mat4d postTransfoMat;
190 Mat4d invertPostTransfoMat;
191 Mat4f postTransfoMatf;
192 Mat4f invertPostTransfoMatf;
195 #endif // _REFRACTIONEXTINCTION_HPP_ void setExtinctionCoefficient(float k)
Set visual extinction coefficient (mag/airmass), influences extinction computation.
void backward(const Vec3d &altAzPos, float *mag) const
Compute inverse extinction effect for arrays of size num position vectors and magnitudes.
This class performs extinction computations, following literature from atmospheric optics and astrono...
This class performs refraction computations, following literature from atmospheric optics and astrono...
UndergroundExtinctionMode
Define the extinction strategy for rendering underground objects (useful when ground is not rendered)...
Maximum extinction: coef 42, i.e practically invisible.
Zero extinction: stars visible in full brightness.
QSharedPointer< ModelViewTranform > ModelViewTranformP
Shared pointer on a ModelViewTranform instance (implement reference counting)
void forward(const Vec3d &altAzPos, float *mag) const
Compute extinction effect for arrays of size num position vectors and magnitudes. ...
Mirror the extinction for the same altutide above the ground.