Hi,

Earth file is like as follow:

Code:

<map name="osgearth_vpb" type="geocentric" version="2">
        <image name="elevation" driver="vpb">
                <url>elevation.osgb</url>  
                <profile>global-geocentric</profile>
                <primary_split_level>5</primary_split_level>
                <secondary_split_level>11</secondary_split_level>
        </image>
        <image name="map" driver="vpb">
                <url>map.osgb</url>  
                <profile>global-geocentric</profile>
                <primary_split_level>5</primary_split_level>
                <secondary_split_level>11</secondary_split_level>
        </image>
</map>





you can add this into your osg application as:


Code:

osg::ref_ptr<osg::Node> _map = osgDB::readNodeFile( earthFile.toStdString() );
    osg::ref_ptr<osgEarth::MapNode> _mapNode = osgEarth::MapNode::findMapNode( 
_map );
    _root->addChild(_mapNode);




But you will have some trouble with vpbmaster, just use osgdem and forget about 
the split levels about :)

And about to add some model in the virtual world, you can use 
osgEarthUtil/ObjectPlacer, an easy way of place sthg in the earth model.

if you want to know more about the .earth file just visit http:// www. osgearth 
.org/wiki/MapElement

Good Luck!

Sevket

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=48664#48664





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

Reply via email to