//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
-// Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
//
SGNewCloud *aCloud;
sgVec3 eyePos;
float dist;
+ float heading;
+ float alt;
bool operator<(const culledCloud &b) const {
- return this->dist < b.dist;
+ return (this->dist < b.dist);
}
};
typedef vector<culledCloud> list_of_culledCloud;
+/**
+ * A layer of 3D clouds.
+ */
class SGCloudField {
private:
SGNewCloud *aCloud;
sgVec3 pos;
bool visible;
-// float dist;
-// bool culled;
-
-// bool operator<(const Cloud &b) {
-// return this->dist < b.dist;
-// }
};
sgMat4 transform;
double deltax, deltay, alt;
double last_lon, last_lat, last_course;
-
+ sgSphere field_sphere;
float last_density;
+ bool draw_in_3d;
public:
SGCloudField();
~SGCloudField();
+ void clear(void);
+
// add one cloud, data is not copied, ownership given
void addCloud( sgVec3 pos, SGNewCloud *cloud);
void buildTestLayer(void);
// Render a cloud field
- void Render(void);
+ void Render( float *sun_color );
// reposition the cloud layer at the specified origin and orientation
- void reposition( sgVec3 p, sgVec3 up, double lon, double lat, double alt, double dt);
+ void reposition( sgVec3 p, sgVec3 up, double lon, double lat, double alt, double dt, float direction, float speed);
+
+ bool is3D(void) { return draw_in_3d; }
// visibility distance for clouds in meters
static float CloudVis;
- static float density;
+ static sgVec3 view_vec, view_X, view_Y;
+ static float density;
+ static double timer_dt;
static double fieldSize;
static bool enable3D;