sebastian.vesenmayer Posted February 12, 2019 Share Posted February 12, 2019 (edited) Hi, just tried to let the clouds vanish at the horizon. When using the c++ api, only the standard value of 6378.137 km is working correctly for the ellipsoid of the GeodeticPivot. When I slightly change it the clouds will vanish. I am using OpenGL and Unigine 2.7.2.1. m_cloudsGeodetic = Unigine::GeodeticPivot::create(); m_cloudsGeodetic->setOriginBasis(Unigine::GeodeticPivot::ORIGIN_BASIS_LOCAL); auto ellipsoid = m_cloudsGeodetic->getEllipsoid(); ellipsoid->setMode(Unigine::Ellipsoid::MODE_FAST); ellipsoid->setSemimajorAxis(6378137.); //coverage normal //ellipsoid->setSemimajorAxis(6378137.-500.); //coverage gets higly reduced //ellipsoid->setSemimajorAxis(6378137.+500.); //coverage normal //ellipsoid->setSemimajorAxis(6378137.+1000.); //no clouds visible anymore .... m_cloudsGeodetic->addChild(cloudLayer->getNode()); Did I miss something or is it a bug? Thanks Sebastian Edited February 12, 2019 by sebastian.vesenmayer Link to comment
andrey-kozlov Posted February 13, 2019 Share Posted February 13, 2019 Hello Sebastian, Ellipsoid for GeodeticPivot has kind of "value based" semantic. Modifying the ellipsoid directly leads the geodetic pivot to inconsistent state. Add this line: m_cloudsGeodetic->setEllipsoid(ellipsoid); It forces a geodetic pivot to update internal state according to the ellipsoid Link to comment
sebastian.vesenmayer Posted February 13, 2019 Author Share Posted February 13, 2019 Thank you this works. Can you please update the manual of the Unigine::GeodeticPivot class and write a notice to the setEllipsoid and getEllipsoid method? Link to comment
andrey-kozlov Posted February 13, 2019 Share Posted February 13, 2019 I've passed that to the documentation team. Link to comment
Recommended Posts