// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
-// $Id$
#ifdef HAVE_CONFIG_H
# include <simgear_config.h>
layer_coverage(SG_CLOUD_CLEAR),
scale(4000.0),
speed(0.0),
- direction(0.0)
+ direction(0.0),
+ last_course(0.0),
+ max_alpha(1.0)
{
// XXX
// Render bottoms before the rest of transparent objects (rendered
*/
inline void setAlpha( float alpha ) {
if ( alpha < 0.0 ) { alpha = 0.0; }
- if ( alpha > 1.0 ) { alpha = 1.0; }
+ if ( alpha > max_alpha ) { alpha = max_alpha; }
cloud_alpha = alpha;
}
+ inline void setMaxAlpha( float alpha ) {
+ if ( alpha < 0.0 ) { alpha = 0.0; }
+ if ( alpha > 1.0 ) { alpha = 1.0; }
+ max_alpha = alpha;
+ }
+
+ inline float getMaxAlpha() const {
+ return max_alpha;
+ }
+
/** build the cloud object */
void rebuild();
// double xoff, yoff;
SGGeod last_pos;
double last_course;
+ double max_alpha;
osg::Vec2 base;