// Written by Curtis Olson, started June 2000.
//
-// Copyright (C) 2000 Curtis L. Olson - curt@flightgear.org
+// Copyright (C) 2000 Curtis L. Olson - http://www.flightgear.org/~curt
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// SG_USING_STD(cout);
// SG_USING_STD(endl);
+class SGCloudField;
/**
* A class layer to model a single cloud layer
/** get the cloud movement speed */
inline float getSpeed() { return speed; }
+ /**
+ * set the alpha component of the cloud base color. Normally this
+ * should be 1.0, but you can set it anywhere in the range of 0.0
+ * to 1.0 to fade a cloud layer in or out.
+ * @param alpha cloud alpha value (0.0 to 1.0)
+ */
+ inline void setAlpha( float alpha ) {
+ if ( alpha < 0.0 ) { alpha = 0.0; }
+ if ( alpha > 1.0 ) { alpha = 1.0; }
+ cloud_alpha = alpha;
+ }
+
/** build the cloud object */
void rebuild();
ssgLeaf *layer[4];
ssgStateSelector *state_sel;
+ float cloud_alpha; // 1.0 = drawn fully, 0.0 faded out completely
+
ssgColourArray *cl[4];
ssgVertexArray *vl[4];
ssgTexCoordArray *tl[4];
// position, not view position
// double xoff, yoff;
double last_lon, last_lat, last_course;
+
+ SGCloudField *layer3D;
};