X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=simgear%2Fsky%2Foursun.cxx;h=566bbcefc0e51b7f8b70fa90cf915a471f0d48a4;hb=1e53bedca5afda25517dabcfa298f13acab0d4bd;hp=6890b8b3ac4d1c32c2610b267e1a3d09a23d364e;hpb=7db73cd2150b69aa7ae38fa8a46862c8d12231b9;p=simgear.git diff --git a/simgear/sky/oursun.cxx b/simgear/sky/oursun.cxx index 6890b8b3..566bbcef 100644 --- a/simgear/sky/oursun.cxx +++ b/simgear/sky/oursun.cxx @@ -31,10 +31,9 @@ #include #include +#include #include -#include - #include "sphere.hxx" #include "oursun.hxx" @@ -294,7 +293,7 @@ ssgBranch * SGSun::build( FGPath path, double sun_size ) { // 90 degrees = sun rise/set // 180 degrees = darkest midnight bool SGSun::repaint( double sun_angle ) { - if ( sun_angle * RAD_TO_DEG < 100 ) { + if ( sun_angle * SGD_RADIANS_TO_DEGREES < 100 ) { // else sun is well below horizon (so no point in repainting it) // x_10 = sun_angle^10 @@ -348,13 +347,14 @@ bool SGSun::reposition( sgVec3 p, double angle, sgSetVec3( axis, 0.0, 0.0, -1.0 ); sgMakeRotMat4( GST, angle, axis ); - // xglRotatef(((RAD_TO_DEG * rightAscension)- 90.0), 0.0, 0.0, 1.0); + // xglRotatef( ((SGD_RADIANS_TO_DEGREES * rightAscension)- 90.0), + // 0.0, 0.0, 1.0); sgSetVec3( axis, 0.0, 0.0, 1.0 ); - sgMakeRotMat4( RA, (rightAscension * RAD_TO_DEG) - 90.0, axis ); + sgMakeRotMat4( RA, (rightAscension * SGD_RADIANS_TO_DEGREES) - 90.0, axis ); - // xglRotatef((RAD_TO_DEG * declination), 1.0, 0.0, 0.0); + // xglRotatef((SGD_RADIANS_TO_DEGREES * declination), 1.0, 0.0, 0.0); sgSetVec3( axis, 1.0, 0.0, 0.0 ); - sgMakeRotMat4( DEC, declination * RAD_TO_DEG, axis ); + sgMakeRotMat4( DEC, declination * SGD_RADIANS_TO_DEGREES, axis ); // xglTranslatef(0,sun_dist); sgSetVec3( v, 0.0, sun_dist, 0.0 );