The problem with the code was that I was not setting the matrix translation and
rotation correctly.
I was doing the following which was not working:
translateToCenter =
Code:
osg::Matrix::translate(osg::Vec3(shapefileVertexArray->at(i).x(),
shapefileVertexArray->at(i).y(),
shapefileVertexArray->at(i).z()));
I then changed it to:
Code:
translateToCenter.makeTranslate(osg::Vec3(shapefileVertexArray->at(i).x(),
shapefileVertexArray->at(i).y(),
shapefileVertexArray->at(i).z())
);
It works now and the geometry is getting formed correctly.
Thanks everyone.
Sincerely,
Sanat.
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=37265#37265
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org