2005-05-15 09:26:17 +00:00
|
|
|
// Build a cloud layer based on metar
|
|
|
|
//
|
|
|
|
// Written by Harald JOHNSEN, started April 2005.
|
|
|
|
//
|
|
|
|
// Copyright (C) 2005 Harald JOHNSEN - hjohnsen@evc.net
|
|
|
|
//
|
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU General Public License as
|
|
|
|
// published by the Free Software Foundation; either version 2 of the
|
|
|
|
// License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful, but
|
|
|
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
// General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with this program; if not, write to the Free Software
|
2006-02-21 01:16:04 +00:00
|
|
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2005-05-15 09:26:17 +00:00
|
|
|
//
|
|
|
|
//
|
|
|
|
#ifndef _FGCLOUDS_HXX
|
|
|
|
#define _FGCLOUDS_HXX
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG
|
|
|
|
# include <config.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <simgear/compiler.h>
|
|
|
|
#include <simgear/sound/soundmgr_openal.hxx>
|
|
|
|
#include <Main/fg_props.hxx>
|
|
|
|
|
2008-07-25 18:38:29 +00:00
|
|
|
#include <string>
|
2005-05-15 09:26:17 +00:00
|
|
|
|
2008-07-27 16:25:13 +00:00
|
|
|
using std::string;
|
2005-05-15 09:26:17 +00:00
|
|
|
|
|
|
|
class SGNewCloud;
|
|
|
|
class SGCloudField;
|
|
|
|
class FGMetar;
|
2005-05-22 08:08:22 +00:00
|
|
|
class FGEnvironmentCtrl;
|
2005-05-15 09:26:17 +00:00
|
|
|
|
|
|
|
class FGClouds {
|
|
|
|
|
|
|
|
private:
|
2008-10-26 09:38:21 +00:00
|
|
|
void buildCloud(SGPropertyNode *cloud_def_root, SGPropertyNode *box_def_root, const string& name, sgVec3 pos, SGCloudField *layer);
|
|
|
|
void buildLayer(int iLayer, const string& name, double alt, double coverage);
|
2005-05-15 09:26:17 +00:00
|
|
|
|
2008-12-06 23:03:12 +00:00
|
|
|
void buildCloudLayers(void);
|
2005-05-15 09:26:17 +00:00
|
|
|
|
|
|
|
int update_event;
|
|
|
|
SGSoundSample *snd_lightning;
|
2008-11-06 21:58:50 +00:00
|
|
|
bool clouds_3d_enabled;
|
2005-05-15 09:26:17 +00:00
|
|
|
|
|
|
|
public:
|
2009-05-29 10:26:35 +00:00
|
|
|
FGClouds();
|
2005-05-15 09:26:17 +00:00
|
|
|
~FGClouds();
|
|
|
|
|
|
|
|
void init(void);
|
|
|
|
|
|
|
|
int get_update_event(void) const;
|
|
|
|
void set_update_event(int count);
|
2008-11-06 21:58:50 +00:00
|
|
|
bool get_3dClouds() const;
|
|
|
|
void set_3dClouds(bool enable);
|
2005-05-15 09:26:17 +00:00
|
|
|
};
|
|
|
|
|
2005-05-22 08:08:22 +00:00
|
|
|
#endif // _FGCLOUDS_HXX
|