]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/sky/dome.hxx
Fix a NaN at higher altitudes: sin_beta could become greater than 1.0 which is hard...
[simgear.git] / simgear / scene / sky / dome.hxx
index dfed58e19b72a3304cc73bc69ad312e04f044506..10e25af336d393bfa24bea0d4f15b5f7fb648831 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
@@ -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);
 };