]> git.mxchange.org Git - simgear.git/blobdiff - simgear/sky/oursun.cxx
Minor tidying up of interface.
[simgear.git] / simgear / sky / oursun.cxx
index 6890b8b3ac4d1c32c2610b267e1a3d09a23d364e..566bbcefc0e51b7f8b70fa90cf915a471f0d48a4 100644 (file)
 #include <stdio.h>
 #include <iostream>
 
+#include <plib/sg.h>
 #include <plib/ssg.h>
 
-#include <simgear/constants.h>
-
 #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 );