From 202e9571540cb12b66e06a4c26fe89a7876bbf95 Mon Sep 17 00:00:00 2001 From: Stuart Buchanan Date: Fri, 22 Apr 2011 21:06:28 +0100 Subject: [PATCH] Further updates to 3D clouds --- src/Environment/fgclouds.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Environment/fgclouds.cxx b/src/Environment/fgclouds.cxx index ccd21e0ce..6bd1d5aa7 100644 --- a/src/Environment/fgclouds.cxx +++ b/src/Environment/fgclouds.cxx @@ -357,12 +357,18 @@ bool FGClouds::get_3dClouds() const float lon = arg->getFloatValue("lon-deg", 0.0f); float lat = arg->getFloatValue("lat-deg", 0.0f); float alt = arg->getFloatValue("alt-ft", 0.0f); + float x = arg->getFloatValue("x-offset-m", 0.0f); + float y = arg->getFloatValue("y-offset-m", 0.0f); + - // Adding a 3D cloud immediately makes this layer 3D. - thesky->get_cloud_layer(l)->set_enable3dClouds(true); SGCloudField *layer = thesky->get_cloud_layer(l)->get_layer3D(); SGNewCloud cld = SGNewCloud(texture_root, arg); - return layer->addCloud(lon, lat, alt, index, cld.genCloud()); + bool success = layer->addCloud(lon, lat, alt, x, y, index, cld.genCloud()); + + // Adding a 3D cloud immediately makes this layer 3D. + thesky->get_cloud_layer(l)->set_enable3dClouds(true); + + return success; } /** -- 2.39.5