Hi List

Im trying to get the heightfiled data from a VPB terrain using ReadFileCallback.

I use the code from readfile callback like this.

   class MyReadFileCallback : public osgDB::Registry::ReadFileCallback
   {
   public:
      virtual osgDB::ReaderWriter::ReadResult readNode(const
std::string& fileName, const osgDB::ReaderWriter::Options* options)
      {
         // note when calling the Registry to do the read you have to
call readNodeImplementation NOT readNode, as this will
         // cause on infinite recusive loop.
         osgDB::ReaderWriter::ReadResult result =
osgDB::Registry::instance()->readNodeImplementation(fileName,options);
         if (result.validHeightField())
         {
            LOG_ERROR("Found a valid HeightField");
         }
         return result;
      }
   };

The idea was simply to see if I had the heightfield available, but
even though I have verified that it gets called it is never a valid
heightfield.

This is on a terrain build using VPB with the --TERRAIN option.

Shouldent I be able to get the heightfieldnodes?

Brgs.

Ralf Stokholm
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to