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)
151 Mat4d getApproximateLinearTransfo()
const {
return postTransfoMat*preTransfoMat;}
157 float getPressure()
const {
return pressure;}
161 float getTemperature()
const {
return temperature;}
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 forward(Vec3d &altAzPos) const
Apply refraction.
void backward(const Vec3d &altAzPos, float *mag) const
Compute inverse extinction effect for arrays of size.
This class performs extinction computations, following literature from atmospheric optics and astrono...
void backward(Vec3d &altAzPos) const
Remove refraction from position ("reduce").
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.
void setPressure(float p_mbar)
Set surface air pressure (mbars), influences refraction computation.
void setPreTransfoMat(const Mat4d &m)
Set the transformation matrices used to transform input vector to AltAz frame.
Zero extinction: stars visible in full brightness.
QSharedPointer< ModelViewTranform > ModelViewTranformP
Shared pointer on a ModelViewTranform instance (implement reference counting)
void setTemperature(float t_C)
Set surface air temperature (degrees Celsius), influences refraction computation. ...
void forward(const Vec3d &altAzPos, float *mag) const
Compute extinction effect for arrays of size.
Mirror the extinction for the same altutide above the ground.