no find Stars #2394
Unanswered
luohuiiqng
asked this question in
Support Q&A
no find Stars
#2394
Replies: 1 comment
-
Please share your platform, version, and a complete .cpp that will reproduce the issue. Thanks. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
After adding the sky, only the sun and moon are observed, no stars are seen.
ref_ptr ViewerWidget::addSky()
{
osgEarth::DateTime dateTime(2023, 12, 5, 20);
ref_ptr sky_node = SkyNode::create();
osgEarth::Util::SkyOptions skyOptions;
osgEarth::Util::Ephemeris* ephemeris = new osgEarth::Util::Ephemeris;
sky_node->setMoonVisible(true);
sky_node->setName("sky");
sky_node->setDateTime(dateTime);
sky_node->setLighting(true);
sky_node->attach(m_viewer, 0);
sky_node->setSunVisible(true);
sky_node->setStarsVisible(true);
sky_node->setEphemeris(ephemeris);
bool re = sky_node->getStarsVisible();
}
Beta Was this translation helpful? Give feedback.
All reactions