openscenegraph - Ellipsoid to Sphere in OSG -


i have been practicing openscenegraph examples provided osg. 1 of example, came across text on ellipsoid.

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); 

this works in case.then thought same sphere. in example, ellipsoid drawn basing on lat, long , height. want draw sphere radius depends on window size / screen size. unfortunately failed see converts screen coordinates sphere size in osg::sphere class.

some 1 can me, solve this. there might thing converts this, may did not come across because of less experience.

cheers, inna.

osg::sphere not geospatial model osg::ellipsoidmodel.

just create osg::ellipsoidmodel both radii (equator , polar) same sphere radius wish, , use osg::ellipsoidmodel.


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -