Hi,
i did this
Code:
osg::Image* img = osgDB::readImageFile("test.tga");
osg::ref_ptr<osg::HeightField> heightmap = new osg::HeightField;
for(int z=0; z<256; z++)
{
for(int x=0; x<256; x++)
{
heightmap->setHeight( x, z, img->data( x,z ) );
}
}
But how can i convert the return value from img->data( x,z ) to float. And haow
can i say the Heightfiild class the Terrain size?
Greez
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15292#15292
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org