mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-12 14:40:17 -06:00
use lightsource from model specification instead of (hardcoded) sun
This commit is contained in:
@@ -96,6 +96,11 @@ float SceneGraphLightSource::intensity() const {
|
||||
return _intensity;
|
||||
}
|
||||
|
||||
glm::dvec3 SceneGraphLightSource::positionWorldSpace() const
|
||||
{
|
||||
return _sceneGraphNode->modelTransform() * glm::dvec4(0.0, 0.0, 0.0, 1.0);
|
||||
}
|
||||
|
||||
glm::vec3 SceneGraphLightSource::directionViewSpace(const RenderData& renderData) const {
|
||||
if (!_sceneGraphNode) {
|
||||
return glm::vec3(0.f);
|
||||
|
||||
@@ -44,6 +44,7 @@ public:
|
||||
bool initialize() override;
|
||||
glm::vec3 directionViewSpace(const RenderData& renderData) const override;
|
||||
float intensity() const override;
|
||||
glm::dvec3 positionWorldSpace() const;
|
||||
|
||||
private:
|
||||
properties::FloatProperty _intensity;
|
||||
|
||||
Reference in New Issue
Block a user