Hello,
I load some data from a 3ds file using osgDB::readNodeFile() function, and store the Node to osg::Node* machineNode. Then I want to get all the vertex data from this Node. I tried to convert the point directly to osg::Geometry*, but I get wrong data.
Here is my code:
   osg::Node* machineNode=NULL;
   machineNode=osgDB::readNodeFile("F:/machine.3DS");

   osg::Geometry* geo=(osg::Geometry*)machineNode;
   osg::Array* ar=geo->getVertexArray();
   int size=ar->getDataSize();
size variant is a negative number, so I say the data should be wrong.
Please tell me how to get the vertex data from this node, thanks very much!

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to