From 1223b4af9e589e721e2f7c5bb4c2f7e1821b6e89 Mon Sep 17 00:00:00 2001 From: Torsten Dreyer Date: Fri, 26 Nov 2010 19:26:12 +0100 Subject: [PATCH] Expose visibility within cloudlayers to the property-tree --- src/Environment/environment_mgr.cxx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/Environment/environment_mgr.cxx b/src/Environment/environment_mgr.cxx index 5b79b25d0..7b276eb62 100644 --- a/src/Environment/environment_mgr.cxx +++ b/src/Environment/environment_mgr.cxx @@ -152,6 +152,11 @@ FGEnvironmentMgr::bind () &FGEnvironmentMgr::get_cloud_layer_coverage_type, &FGEnvironmentMgr::set_cloud_layer_coverage_type); + _tiedProperties.Tie( layerNode->getNode( "visibility-m",true), this, i, + &FGEnvironmentMgr::get_cloud_layer_visibility_m, + &FGEnvironmentMgr::set_cloud_layer_visibility_m); + + } _tiedProperties.setRoot( fgGetNode("/sim/rendering", true ) ); @@ -315,6 +320,19 @@ FGEnvironmentMgr::get_cloud_layer_coverage_type (int index) const return thesky->get_cloud_layer(index)->getCoverage(); } +double +FGEnvironmentMgr::get_cloud_layer_visibility_m (int index) const +{ + return thesky->get_cloud_layer(index)->getVisibility_m(); +} + +void +FGEnvironmentMgr::set_cloud_layer_visibility_m (int index, double visibility_m) +{ + thesky->get_cloud_layer(index)->setVisibility_m(visibility_m); +} + + void FGEnvironmentMgr::set_cloud_layer_coverage_type (int index, int type )