]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/sky/cloud.cxx
Merge branch 'ehofman/sound'
[simgear.git] / simgear / scene / sky / cloud.cxx
index 3420b80b1137e6db34d2a38787653c5322ef8d42..68e41deb2b3c98eab8113c8afa5d8915476da126 100644 (file)
@@ -605,7 +605,7 @@ SGCloudLayer::rebuild()
 
 // repaint the cloud layer colors
 bool SGCloudLayer::repaint( const SGVec3f& fog_color ) {
-    osg::Vec4f combineColor(fog_color.osg(), cloud_alpha);
+    osg::Vec4f combineColor(toOsg(fog_color), cloud_alpha);
     osg::TexEnvCombine* combiner
         = dynamic_cast<osg::TexEnvCombine*>(layer_root->getStateSet()
                                             ->getTextureAttribute(1, osg::StateAttribute::TEXENV));
@@ -625,7 +625,7 @@ bool SGCloudLayer::reposition( const SGVec3f& p, const SGVec3f& up, double lon,
                               double alt, double dt )
 {
     // combine p and asl (meters) to get translation offset
-    osg::Vec3 asl_offset(up.osg());
+    osg::Vec3 asl_offset(toOsg(up));
     asl_offset.normalize();
     if ( alt <= layer_asl ) {
         asl_offset *= layer_asl;
@@ -635,7 +635,7 @@ bool SGCloudLayer::reposition( const SGVec3f& p, const SGVec3f& up, double lon,
 
     // cout << "asl_offset = " << asl_offset[0] << "," << asl_offset[1]
     //      << "," << asl_offset[2] << endl;
-    asl_offset += p.osg();
+    asl_offset += toOsg(p);
     // cout << "  asl_offset = " << asl_offset[0] << "," << asl_offset[1]
     //      << "," << asl_offset[2] << endl;
 
@@ -722,7 +722,7 @@ bool SGCloudLayer::reposition( const SGVec3f& p, const SGVec3f& up, double lon,
         double xoff = (ax + bx) / (2 * scale);
         double yoff = (ay + by) / (2 * scale);
 
-        const float layer_scale = layer_span / scale;
+//        const float layer_scale = layer_span / scale;
 
         // cout << "xoff = " << xoff << ", yoff = " << yoff << endl;
         base[0] += xoff;