History

Training Team: improving the sun lighting interface to javascript to enable / disable the earthSkyModel, assign explicitely the SUnDirection and getter, and expose a AmbientINtensity to control the amount of the ambient lighting contribution Expose these to javascript

Sam Gateau committed 11 years ago

Commit b5b146b1 parent d72bb7112 files · +111 −31Browse files

Showing the changes to libraries/script-engine/src/SceneScriptingInterface.cpp (1 of 12 files). Show all

Unified · Split

libraries/script-engine/src/SceneScriptingInterface.cpp+24−0
@@ -62,6 +62,30 @@ float SceneScriptingInterface::getSunIntensity() const { · 61 unmodified lines
6262 return _skyStage->getSunIntensity();
6363 }
6464
65+void SceneScriptingInterface::setSunAmbientIntensity(float intensity) {
66+ _skyStage->setSunAmbientIntensity(intensity);
67+}
68+
69+float SceneScriptingInterface::getSunAmbientIntensity() const {
70+ return _skyStage->getSunAmbientIntensity();
71+}
72+
73+void SceneScriptingInterface::setSunDirection(const glm::vec3& direction) {
74+ _skyStage->setSunDirection(direction);
75+}
76+
77+const glm::vec3& SceneScriptingInterface::getSunDirection() const {
78+ return _skyStage->getSunDirection();
79+}
80+
81+void SceneScriptingInterface::setStageEarthSunModelEnable(bool isEnabled) {
82+ _skyStage->setEarthSunModelEnable(isEnabled);
83+}
84+
85+bool SceneScriptingInterface::isStageEarthSunModelEnabled() const {
86+ return _skyStage->isEarthSunModelEnabled();
87+}
88+
6589 model::SunSkyStagePointer SceneScriptingInterface::getSkyStage() const {
6690 return _skyStage;
6791 }