Re: [osg-users] Geometry vertices and nan/inf

2015-03-16 Thread Erik Hensens
robertosfield wrote: Your code is rather perverse and potentially unsafe way to get at the xyz coords, but if the array is a Vec3Array then it should probably work OK. A better way to look at to coords is to cast the array to a Vec3Array and access the vertices via the std::vector

Re: [osg-users] Geometry vertices and nan/inf

2015-03-14 Thread Robert Osfield
Hi Erik, Your code is rather perverse and potentially unsafe way to get at the xyz coords, but if the array is a Vec3Array then it should probably work OK. A better way to look at to coords is to cast the array to a Vec3Array and access the vertices via the std::vector methods (Vec3Array

[osg-users] Geometry vertices and nan/inf

2015-03-14 Thread Erik Hensens
Hello all, I'm analyzing the vertices of a geometry like so: Code: osg::Array *pVertexArray = pGeometry-getVertexArray(); int nVertices = (int)(pVertexArray-getNumElements()); osg::Vec3 *pVertexData = (osg::Vec3 *)(pVertexArray-getDataPointer()); for (int i = 0; i nVertices; i++) { float