Add camera view direction to camera topic (#3741)

* Add camera view direction to camera topic
* Add subsolar coordinates to topic

---------

Co-authored-by: Alexander Bock <alexander.bock@liu.se>
Co-authored-by: Ylva Selling <ylva.selling@gmail.com>
This commit is contained in:
Andreas Engberg
2025-07-16 13:21:12 +02:00
committed by GitHub
parent 6a1568ec15
commit 4dffe7c7b2
4 changed files with 115 additions and 5 deletions

View File

@@ -71,6 +71,19 @@ glm::vec3 cartesianCoordinatesFromGeo(const SceneGraphNode& sgn, double latitude
*/
glm::dvec3 geoPositionFromCamera();
/**
* Returns the camera view direction relative to the current anchor node as geodetic
* coordinates. The returned value contains the latitude and longitude in degrees in the
* x, and y-coordinate respectively.
*/
glm::dvec3 geoViewFromCamera();
/**
* Return the coordinates where the sun is at its zenith at the current anchor at the
* current time. The returned value contains the latitude and longitude in degrees.
*/
glm::dvec2 subSolarCoordinates();
/**
* Returns the height of the camera relative to the provided SceneGraphNode \p sgn in
* meters. If \p useHeightMap is provided as `true` and \p sgn is a globe with an existing