pixel_based lod for GeoPoint+AnnotationPlaceNode

classic Classic list List threaded Threaded
2 messages Options
The Andreyp The Andreyp
Reply | Threaded
Open this post in threaded view
|

pixel_based lod for GeoPoint+AnnotationPlaceNode

Hey guys. I just wanted to know if i can use it with pixel lod. Code follows and nothing dissappears when i am far from point.. I do use terrain with pixel lod and it rocks, thanks.

osg::ref_ptr<osgEarth::Annotation::PlaceNode> pnode = new osgEarth::Annotation::PlaceNode( m_mapNode, GeoPoint( geoSRS, long,lat ), pi->name, *sptr );

    float rad = pnode->getBound().radius();
    osg::Vec3 ctr = pnode->getBound().center();
     
    osg::LOD* lod = new osg::LOD();
    lod->setRangeMode( osg::LOD::PIXEL_SIZE_ON_SCREEN );
    lod->setRadius( rad );
    lod->setCenter( ctr );
    lod->addChild( pnode,
                   //pi->dist.x(), pi->dist.y()
                   0,100
                   );
    m_labelGroup->addChild( lod );
       
The Andreyp The Andreyp
Reply | Threaded
Open this post in threaded view
|

Re: pixel_based lod for GeoPoint+AnnotationPlaceNode

up!