Hi,

I have a bunch of models in a proprietary format that I'm converting to
OSG format.  The models are simple meshes that consist of vertices,
triangles, and texture coordinates.  They are all geo-referenced and use
the UTM/WGS84 coordinate system.

Recently, I have converted all the models to the Lat/Long coordinate
system.  To represent the models' vertices accurately in space, I need
to retain 9 digits of precision after each vertex coordinate's decimal
place.  The problem I'm having is that when I write the models to OSG
format, it's only saving between 2 and 5 decimal places.

To generate my vertex arrays, I simply create an osg::Vec3Array.  Then I
call push_back(osg::Vec3d(x, y, z)) for every coordinate, where x, y,
and z are double precision.  When I'm done populating the array, I add
it to my geometry node via setVertexArray().  Then I add my triangle
indices and texture coordinates.  Last, I write out the file using
osgDB::writeNodeFile().

When viewing the file in osgviewer, it does not look correct at all.  I
discovered this is because the number of decimal places in the vertex
coordinates is being truncated.  I was hoping someone could tell me how
to output all 9 decimal places in the OSG file.  Will this same solution
work for an IVE file?

Thank you!

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

Reply via email to