How do I use this osgEarth::GeoPoint::createLocalToworld function?

classic Classic list List threaded Threaded
5 messages Options
Mirro187 Mirro187
Reply | Threaded
Open this post in threaded view
|

How do I use this osgEarth::GeoPoint::createLocalToworld function?

win10&osg3.6.4&osgearth2.10.0
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: How do I use this osgEarth::GeoPoint::createLocalToworld function?

What you are trying to do?
Glenn Waldron / Pelican Mapping
Mirro187 Mirro187
Reply | Threaded
Open this post in threaded view
|

Re: How do I use this osgEarth::GeoPoint::createLocalToworld function?

Thank you for your question and answer.
I would like to ask why the osg::AutoTransform disappears after using the set setAutoRotateMode method to be true.

    std::string timesFont("fonts/arial.ttf");

    osgText::Text* text = new osgText::Text;
    text->setCharacterSize(characterSize);
    text->setText(message);
    text->setFont(timesFont);
    text->setAlignment(osgText::Text::CENTER_CENTER);

    osg::Geode* geode = new osg::Geode;
    geode->addDrawable(text);
    geode->getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::OFF);

    osg::AutoTransform* at = new osg::AutoTransform;
    at->addChild(geode);

    at->setAutoRotateMode(osg::AutoTransform::ROTATE_TO_SCREEN);
    at->setAutoScaleToScreen(true);
    at->setMinimumScale(minScale);
    at->setMaximumScale(maxScale);
    at->setPosition(position);
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: How do I use this osgEarth::GeoPoint::createLocalToworld function?

What does this have to do with GeoPoint::createLocalToworld?

This looks like an OSG question; I suggest you ask over on the OSG mailing list.
https://groups.google.com/g/osg-users
Glenn Waldron / Pelican Mapping
Mirro187 Mirro187
Reply | Threaded
Open this post in threaded view
|

Re: How do I use this osgEarth::GeoPoint::createLocalToworld function?

sorry,osg::AutoTransform has nothing to do with osgEarth::GeoPoint::createLocalToworld.

it is strange that . There is no problem with using it in osg.but osg::AutoTransform disappears after using the set setAutoRotateMode method to be true in osgEarth.