Ahem... And of course I add the indices to create the object:
// Create the triangles and "bottom" square
osg::DrawElementsUInt* pyramidBottom = new
osg::DrawElementsUInt(osg::PrimitiveSet::QUADS, 0);
pyramidBottom->push_back(0);
pyramidBottom->push_back(1);
pyramidBottom->push_back(2);
pyramidBottom->push_back(3);
pyramidGeometry->addPrimitiveSet(pyramidBottom);
osg::DrawElementsUInt* pyramidLeft = new
osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES, 0);
pyramidLeft->push_back(1);
pyramidLeft->push_back(2);
pyramidLeft->push_back(4);
pyramidGeometry->addPrimitiveSet(pyramidLeft);
osg::DrawElementsUInt* pyramidRight = new
osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES, 0);
pyramidRight->push_back(3);
pyramidRight->push_back(0);
pyramidRight->push_back(4);
pyramidGeometry->addPrimitiveSet(pyramidRight);
_______________________________________________
Werner LindgÄrd, Programmerer
Telephone +47 67 81 70 00
Direct line +47 67 81 70 68
[EMAIL PROTECTED]
ViaNova Systems AS
Leif Tronstads Plass 4, P.O.Box 434
N-1302 Sandvika, Norway
________________________________________________
http://www.vianova.no
http://www.novapoint.com
________________________________________________
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/