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
62 return _skyStage->getSunIntensity();62 return _skyStage->getSunIntensity();
63}63}
64 64
65void SceneScriptingInterface::setSunAmbientIntensity(float intensity) {
66 _skyStage->setSunAmbientIntensity(intensity);
67}
68
69float SceneScriptingInterface::getSunAmbientIntensity() const {
70 return _skyStage->getSunAmbientIntensity();
71}
72
73void SceneScriptingInterface::setSunDirection(const glm::vec3& direction) {
74 _skyStage->setSunDirection(direction);
75}
76
77const glm::vec3& SceneScriptingInterface::getSunDirection() const {
78 return _skyStage->getSunDirection();
79}
80
81void SceneScriptingInterface::setStageEarthSunModelEnable(bool isEnabled) {
82 _skyStage->setEarthSunModelEnable(isEnabled);
83}
84
85bool SceneScriptingInterface::isStageEarthSunModelEnabled() const {
86 return _skyStage->isEarthSunModelEnabled();
87}
88
65model::SunSkyStagePointer SceneScriptingInterface::getSkyStage() const {89model::SunSkyStagePointer SceneScriptingInterface::getSkyStage() const {
66 return _skyStage;90 return _skyStage;
67}91}