]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/sky/moon.hxx
Merge branch 'ehofman/sound'
[simgear.git] / simgear / scene / sky / moon.hxx
index 86968adbf8e03869e9b757c541b07d85877af661..5efd55757bca9f4beb1fda4617bcb0f9fbe2470f 100644 (file)
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 // Library General Public License for more details.
 //
-// You should have received a copy of the GNU Library General Public
-// License along with this library; if not, write to the
-// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-// Boston, MA  02111-1307, USA.
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //
 // $Id$
 
 #define _SG_MOON_HXX_
 
 
-#include <plib/ssg.h>
-
-#include <simgear/misc/sg_path.hxx>
+#include <osg/ref_ptr>
+#include <osg/MatrixTransform>
+#include <osg/Material>
 
+#include <simgear/math/SGMath.hxx>
+#include <simgear/structure/SGReferenced.hxx>
 
-class SGMoon {
+#include <simgear/misc/sg_path.hxx>
 
-    ssgTransform *moon_transform;
-    ssgSimpleState *orb_state;
-    ssgSimpleState *halo_state;
 
-    ssgColourArray *cl;
+class SGMoon : public SGReferenced {
 
-    ssgVertexArray *halo_vl;
-    ssgTexCoordArray *halo_tl;
+    osg::ref_ptr<osg::MatrixTransform> moon_transform;
+    osg::ref_ptr<osg::Material> orb_material;
 
     double prev_moon_angle;
 
@@ -57,7 +55,7 @@ public:
     ~SGMoon( void );
 
     // build the moon object
-    ssgBranch *build( SGPath path, double moon_size );
+    osg::Node *build( SGPath path, double moon_size );
 
     // repaint the moon colors based on current value of moon_anglein
     // degrees relative to verticle
@@ -70,8 +68,7 @@ public:
     // declination, offset by our current position (p) so that it
     // appears fixed at a great distance from the viewer.  Also add in
     // an optional rotation (i.e. for the current time of day.)
-    bool reposition( sgVec3 p, double angle,
-                    double rightAscension, double declination,
+    bool reposition( double rightAscension, double declination,
                     double moon_dist  );
 };