Re: [osg-users] OSG Ellipsoid to Sphere Conversion
Hi Mr. Robert, It worked for me. I have made Sphere from the osg Geometry. Thanks for the suggestion . ... Thank you! Cheers, Inna -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=68833#68833 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG Ellipsoid to Sphere Conversion
Hi Mr.Robert, I follow the idea given. I will get the grip on these topics and then , I will proceed towards goal TagCloud. Once again thanks for the suggestions. ... Thank you! Cheers, Inna -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=68787#68787 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG Ellipsoid to Sphere Conversion
Hi Inna, I'm still stuck on trying to work out what bits of help you need. Just repeating the same stuff but not providing additional information about what specifically your stuck on doesn't help us. The best I can do is suggest you have a look at other examples, for instance osggeometry illustrates how you set up geometry. The osgshape example illustrates how to create renderable versions of the shape primitives. The osgintersection example illustrates intersections. I think it would be worth you just learning more of the basics of what is available in the OSG then moving on to your final goal as you seem to have dived in to quickly and don't know enough of the basics. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG Ellipsoid to Sphere Conversion
Hi Mr. Wojtek, yes, Seems its valid one. I will test it as you suggested. Let me see :) Thank you! Cheers, Inna -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=68784#68784 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG Ellipsoid to Sphere Conversion
Hello Mr.robertosfield , yes, I would appreciate the help receiving from you guys. I want to draw text on the osg:: sphere, which is exactly like osg fade text example. From this , I want to make Tag cloud. I am taking it step by step. Hopefully, I am on the right track in achieving this. Then I have tried with the example provided by the OSG Fade text which uses the Ellipsoid. then I got confused to convert this ellipsoid example in to Sphere. How can I convert this to sphere and draw text on it. Can some one please tell me, how to make this ? or any guide lines helpful. Thank you! Cheers, Inna -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=68783#68783 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG Ellipsoid to Sphere Conversion
Hi Inna, On 26 September 2016 at 22:42, Inna Reddywrote: > Thanks for the reply. Sorry , Seems I explained very badly . Well , my issue > is that I want to make sphere and text on it. I was able to do with the > EllipsoidModel and using log , lat and height. I want to do the same with > same Sphere. But I dont have idea how to do with sphere the same thing. I > want to make sphere with radius which varys basing on the screen coordinates. > In osg::Sphere I can see setradius(), but how can i set radius to screen > coordinates ? The osg::Sphere class is just a shape primitive it just provides a position and a radius, the coordinate frame all depends on how you want to use that data. Computing positions on a sphere is easy, just a matter of sin and cos. Do you need help with this? There are plenty of guides on line on how to do trigonometry of spheres. Finally on the screen coordinate side, you'll need to give us some context. Are you trying to visualize the sphere? In screen coordinates? Or are you just trying to map mouse coordinates to an intersection point on geometry in the scene that you then attach a bit of text to? Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG Ellipsoid to Sphere Conversion
Hi, Not sure if this helps but I believe you may define own Ellipsoid with EllipsoidModel. Just define it with both Radii the same and voila you have the sphere ... Cheers, Wojtek Lewandowski 2016-09-26 23:54 GMT+02:00 Sebastian Messerschmidt < sebastian.messerschm...@gmx.de>: > Hi Inna, > > It still doesn't make a lot of sense, The ellipsoid model is to abstract > geographic coordinates to geocentric coords. Lat, long however is spherical > coordinates and can be mapped to an ellipsoid... > So please try to rephrase your question: What is it what you want to do, > or present some code that is not working for you. > > Cheers > Sebastian > >> Hi Mr. Robert, geoc >> >> Thanks for the reply. Sorry , Seems I explained very badly . Well , my >> issue is that I want to make sphere and text on it. I was able to do with >> the EllipsoidModel and using log , lat and height. I want to do the same >> with same Sphere. But I dont have idea how to do with sphere the same >> thing. I want to make sphere with radius which varys basing on the screen >> coordinates. In osg::Sphere I can see setradius(), but how can i set radius >> to screen coordinates ? >> >> ... >> >> Thank you! >> >> Cheers, >> Inna >> >> -- >> Read this topic online here: >> http://forum.openscenegraph.org/viewtopic.php?p=68777#68777 >> >> >> >> >> >> ___ >> osg-users mailing list >> osg-users@lists.openscenegraph.org >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG Ellipsoid to Sphere Conversion
Hi Inna, It still doesn't make a lot of sense, The ellipsoid model is to abstract geographic coordinates to geocentric coords. Lat, long however is spherical coordinates and can be mapped to an ellipsoid... So please try to rephrase your question: What is it what you want to do, or present some code that is not working for you. Cheers Sebastian Hi Mr. Robert, geoc Thanks for the reply. Sorry , Seems I explained very badly . Well , my issue is that I want to make sphere and text on it. I was able to do with the EllipsoidModel and using log , lat and height. I want to do the same with same Sphere. But I dont have idea how to do with sphere the same thing. I want to make sphere with radius which varys basing on the screen coordinates. In osg::Sphere I can see setradius(), but how can i set radius to screen coordinates ? ... Thank you! Cheers, Inna -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=68777#68777 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG Ellipsoid to Sphere Conversion
Hi Mr. Robert, Thanks for the reply. Sorry , Seems I explained very badly . Well , my issue is that I want to make sphere and text on it. I was able to do with the EllipsoidModel and using log , lat and height. I want to do the same with same Sphere. But I dont have idea how to do with sphere the same thing. I want to make sphere with radius which varys basing on the screen coordinates. In osg::Sphere I can see setradius(), but how can i set radius to screen coordinates ? ... Thank you! Cheers, Inna -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=68777#68777 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG Ellipsoid to Sphere Conversion
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 Reddywrote: > 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@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OSG Ellipsoid to Sphere Conversion
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@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org