1
0
Fork 0

Export the 2d cloudlayer transparency to the property tree

This commit is contained in:
Torsten Dreyer 2010-12-09 09:08:49 +01:00
parent d2bbaa69e0
commit 340bb58579
2 changed files with 18 additions and 1 deletions

View file

@ -156,7 +156,9 @@ FGEnvironmentMgr::bind ()
&FGEnvironmentMgr::get_cloud_layer_visibility_m,
&FGEnvironmentMgr::set_cloud_layer_visibility_m);
_tiedProperties.Tie( layerNode->getNode( "alpha",true), this, i,
&FGEnvironmentMgr::get_cloud_layer_maxalpha,
&FGEnvironmentMgr::set_cloud_layer_maxalpha);
}
_tiedProperties.setRoot( fgGetNode("/sim/rendering", true ) );
@ -332,6 +334,19 @@ FGEnvironmentMgr::set_cloud_layer_visibility_m (int index, double visibility_m)
thesky->get_cloud_layer(index)->setVisibility_m(visibility_m);
}
double
FGEnvironmentMgr::get_cloud_layer_maxalpha (int index ) const
{
return thesky->get_cloud_layer(index)->getMaxAlpha();
}
void
FGEnvironmentMgr::set_cloud_layer_maxalpha (int index, double maxalpha)
{
thesky->get_cloud_layer(index)->setMaxAlpha(maxalpha);
}
void

View file

@ -89,6 +89,8 @@ private:
void set_cloud_layer_coverage_type (int index, int type );
double get_cloud_layer_visibility_m (int index) const;
void set_cloud_layer_visibility_m (int index, double visibility_m);
double get_cloud_layer_maxalpha (int index ) const;
void set_cloud_layer_maxalpha (int index, double maxalpha);
FGEnvironment * _environment; // always the same, for now
FGClouds *fgClouds;