diff --git a/docs-mini/README.properties b/docs-mini/README.properties index 18ff23f3e..2271bb424 100644 --- a/docs-mini/README.properties +++ b/docs-mini/README.properties @@ -233,3 +233,18 @@ propeller: /engines/engine[%d]/rpm /engines/engine[%d]/pitch /engines/engine[%d]/torque + + +================================================================================ +LIGHT +================================================================================ +/sim/time/sun-angle-rad +/rendering/scene/ambient-r +/rendering/scene/ambient-g +/rendering/scene/ambient-b +/rendering/scene/diffuse-r +/rendering/scene/diffuse-g +/rendering/scene/diffuse-b +/rendering/scene/specular-r +/rendering/scene/specular-g +/rendering/scene/specular-b diff --git a/src/Time/light.cxx b/src/Time/light.cxx index 46e607b16..be7fabbcf 100644 --- a/src/Time/light.cxx +++ b/src/Time/light.cxx @@ -132,11 +132,29 @@ void FGLight::reinit () { void FGLight::bind () { SGPropertyNode *prop = globals->get_props(); prop->tie("/sim/time/sun-angle-rad",SGRawValuePointer(&_sun_angle)); + prop->tie("/rendering/scene/ambient-r",SGRawValuePointer(&_scene_ambient[0])); + prop->tie("/rendering/scene/ambient-g",SGRawValuePointer(&_scene_ambient[1])); + prop->tie("/rendering/scene/ambient-b",SGRawValuePointer(&_scene_ambient[2])); + prop->tie("/rendering/scene/diffuse-r",SGRawValuePointer(&_scene_diffuse[0])); + prop->tie("/rendering/scene/diffuse-g",SGRawValuePointer(&_scene_diffuse[1])); + prop->tie("/rendering/scene/diffuse-b",SGRawValuePointer(&_scene_diffuse[2])); + prop->tie("/rendering/scene/specular-r",SGRawValuePointer(&_scene_specular[0])); + prop->tie("/rendering/scene/specular-g",SGRawValuePointer(&_scene_specular[1])); + prop->tie("/rendering/scene/specular-b",SGRawValuePointer(&_scene_specular[2])); } void FGLight::unbind () { SGPropertyNode *prop = globals->get_props(); prop->untie("/sim/time/sun-angle-rad"); + prop->untie("/rendering/scene/ambient-r"); + prop->untie("/rendering/scene/ambient-g"); + prop->untie("/rendering/scene/ambient-b"); + prop->untie("/rendering/scene/diffuse-r"); + prop->untie("/rendering/scene/diffuse-g"); + prop->untie("/rendering/scene/diffuse-b"); + prop->untie("/rendering/scene/specular-r"); + prop->untie("/rendering/scene/specular-g"); + prop->untie("/rendering/scene/specular-b"); }