Hi Markus, Take a look at the documentation online: http://blogninja.com/doc/openscenegraph-doc/openscenegraph/classosg_1_1HeightField.html
<http://blogninja.com/doc/openscenegraph-doc/openscenegraph/classosg_1_1HeightField.html>Should answer your questions. OSG function names are in general pretty descriptive of what they do. Good luck. Kim. 2009/7/23 Markus Husseini <mar...@husseini.de> > 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 > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org