Hi Akilan,
My terrain DB contains lots of .ive files(binary files). I want to decode the
file in program to know about its children's details. This I want to do before
running my viewer. Is OSG provides interface for such activities?
You can convert .ive to .osg with osgconv:
osgconv in.ive out.osg
One more query is, I have .ive file content in a buffer so that instead of
setting the filename to readNode(), is there any interface to set the buffer
directly to construct node in OSG?
You can have OSG read the data from an istream. For example:
osgDB::ReaderWriter* plugin =
osgDB::Registry::instance()->getReaderWriterForExtension("ive");
if (plugin)
{
osgDB::ReaderWriter::ReadResult rr =
plugin->readNode(stream,
osgDB::Registry::instance()->getOptions());
if ( rr.error() )
{
std::cout << "readNode(istream): Error reading node from "
<< "stream. Error: " << rr.message() << std::endl;
return 0;
}
else
{
return rr.getNode();
}
}
Hope this helps,
J-S
--
______________________________________________________
Jean-Sebastien Guay [email protected]
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org