[osg-users] OSG Ellipsoid to Sphere Conversion

Robert Osfield robert.osfield at gmail.com
Mon Sep 26 11:10:15 PDT 2016


Hi Inna,

You don't say what you've tried, only that you tried something
relating changing from EllipsoidModel to Sphere, you don't say what
you changed the code to, what the result you got.

Without knowing what you are specifically having a problem with we
can't start helping you achieve what you want to achieve.

Robert.

On 26 September 2016 at 18:05, Inna Reddy <osgforum at tevs.eu> wrote:
> Hi all,
>
> I am a new bie here. I was playing with some examples. From the FadeText Example http://trac.openscenegraph.org/projects/osg//browser/OpenSceneGraph/trunk/examples/osgfadetext/osgfadetext.cpp .  In this example, I have the ellipsoid model from the lat, long and height. It's clear, then I tried to change this to Sphere. For me it seems, not possible to convert the Elliposid to sphere.
>
>
> Code:
> osgText::Text* createText(osg::EllipsoidModel* ellipsoid, double latitude, double longitude, double height, const std::string& str)
>         {
>
>                 double X, Y, Z;
>
>                 ellipsoid->convertLatLongHeightToXYZ(osg::DegreesToRadians(latitude), osg::DegreesToRadians(longitude), height, X, Y, Z);
>
>                 osgText::Text* text = new osgText::FadeText;
>                 text->setDrawMode(osgText::Text::TEXT | osgText::Text::BOUNDINGBOX);
>
>                 osg::Vec3 normal = ellipsoid->computeLocalUpVector(X, Y, Z);
>                 text->setCullCallback(new osg::ClusterCullingCallback(osg::Vec3(X, Y, Z), normal, 0.0));
>
>
>
> .......
>
>  I am out of ideas, to do this possible to make same thing with sphere. Could youe please some one help me to do this.
>
>
> thanks and cheers,
> Inna [/code]
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=68770#68770
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



More information about the osg-users mailing list