mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 03:00:58 -06:00
Update SceneGraphNode to have a full transformation defined in terms of translation, scale and rotation.
This commit is contained in:
@@ -211,11 +211,10 @@ void RenderableModel::render(const RenderData& data) {
|
||||
glm::dmat4 modelTransform =
|
||||
glm::translate(glm::dmat4(1.0), data.positionVec3) * // Translation
|
||||
glm::dmat4(data.rotation) * // Spice rotation
|
||||
glm::dmat4(glm::scale(glm::dmat4(1.0), glm::dvec3(data.scale)));
|
||||
debugModelRotation; // debug model rotation controlled from GUI
|
||||
glm::dmat4 modelViewTransform = data.camera.combinedViewMatrix() * modelTransform;
|
||||
|
||||
|
||||
|
||||
glm::vec3 directionToSun = glm::normalize(_sunPos - data.positionVec3);
|
||||
glm::vec3 directionToSunViewSpace = glm::mat3(data.camera.combinedViewMatrix()) * directionToSun;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user