OpenSceneGraph Sphere Geometry (not Geode) generation

530 Views Asked by At

I am very bad at OSG. I can make Sphere with Geode. My task is create OSG::Geometry Sphere with Vertex and Normals. Can anybody help me?

So not this way:

osg::Sphere* sphere = new osg::Sphere( osg::Vec3(0,0,0), 1.0);

1

There are 1 best solutions below

0
On

https://code.google.com/p/osgworks/source/browse/trunk/tests/sphere/sphere.cpp?r=39

There is code in osgWorks to do what you're asking. Either use this code, or examine it to see how you should do it yourself.