]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/sky/dome.hxx
Merge branch 'next' of git.gitorious.org:fg/simgear into next
[simgear.git] / simgear / scene / sky / dome.hxx
index dfed58e19b72a3304cc73bc69ad312e04f044506..13fcf24366f7edd30bd138556886b76048f76b3c 100644 (file)
@@ -18,9 +18,6 @@
 // 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$
-
 
 #ifndef _SKYDOME_HXX
 #define _SKYDOME_HXX
 #include <simgear/structure/SGReferenced.hxx>
 #include <simgear/math/SGMath.hxx>
 
+namespace osg
+{
+class DrawElementsUShort;
+}
+
 class SGSkyDome : public SGReferenced {
     osg::ref_ptr<osg::MatrixTransform> dome_transform;
-
-    osg::ref_ptr<osg::Vec3Array> center_disk_vl;
-    osg::ref_ptr<osg::Vec3Array> center_disk_cl;
-
-    osg::ref_ptr<osg::Vec3Array> upper_ring_vl;
-    osg::ref_ptr<osg::Vec3Array> upper_ring_cl;
-
-    osg::ref_ptr<osg::Vec3Array> middle_ring_vl;
-    osg::ref_ptr<osg::Vec3Array> middle_ring_cl;
-
-    osg::ref_ptr<osg::Vec3Array> lower_ring_vl;
-    osg::ref_ptr<osg::Vec3Array> lower_ring_cl;
-
     double asl;
 
+    osg::ref_ptr<osg::Vec3Array> dome_vl;
+    osg::ref_ptr<osg::Vec3Array> dome_cl;
 public:
 
     // Constructor
@@ -73,8 +64,8 @@ public:
     // 0 degrees = high noon
     // 90 degrees = sun rise/set
     // 180 degrees = darkest midnight
-    bool repaint( const SGVec3f& sky_color, const SGVec3f& fog_color,
-                  double sun_angle, double vis );
+    bool repaint( const SGVec3f& sun_color, const SGVec3f& sky_color,
+                  const SGVec3f& fog_color, double sun_angle, double vis );
 
     // reposition the sky at the specified origin and orientation
     // lon specifies a rotation about the Z axis
@@ -83,6 +74,8 @@ public:
     // sunrise/set effects
     bool reposition( const SGVec3f& p, double asl,
                      double lon, double lat, double spin );
+private:
+    void makeDome(int rings, int bands, osg::DrawElementsUShort& elements);
 };