Hi,

Besides adding the triangles, as a primitive set, you also have to set the 
vertex array dor the geometry, like this:


Code:
triangleGeometry->setVertexArray(points);



This should make it visible, but the surface will look flat, as the 
triangulation does not generate normals for the triangles; you could use the 
SmoothingVisitor to do this, so your code should look like this:


Code:
osg::Geometry* triangleGeometry = new osg::Geometry();
triangleGeometry->addPrimitiveSet(d);
triangleGeometry->setVertexArray(points);

osg::Geode* geode=new osg::Geode();
geode->addDrawable(triangleGeometry);

osgUtil::SmoothingVisitor sv;
geode->accept(sv); 



Cheers,
Nadia

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=14578#14578





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to