// 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
// 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
// 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);
};