Hello,
I am new to opensg and try to get a pointer to the vertex geometry of some
node.
Currently I am doing this in the following way. I am not shure if it is best
practice. Therefore my question is if there is a more convenient way to get to
the data.
I need a raw float pointer to the data to setup a kdtree structure on top of
it. Therefore I am not using iterators. My code:
osg::NodeRefPtr m_npData;
GeometryPtr pGeometry = GeometryPtr::dcast(m_npData->getCore());
GeoPositions3f::StoredFieldType *pPoints;
pPoints = GeoPositions3fPtr::
dcast(pGeometry->getPositions())->getFieldPtr();
float* pfData = &((*(pPoints->begin()))[0]);
Thanks for your help.
Cheers
Christoph
--
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users