OSGEarth ::GeoTransform can add Placenode nodes?

classic Classic list List threaded Threaded
3 messages Options
Mirro187 Mirro187
Reply | Threaded
Open this post in threaded view
|

OSGEarth ::GeoTransform can add Placenode nodes?

        The following code cannot be implemented
        // A lat/long SRS for specifying points.
        const SpatialReference* geoSRS = mapNode->getMapSRS()->getGeographicSRS();
        // test with an LOD:
        osg::LOD* lod = new osg::LOD();
        lod->addChild( new PlaceNode(GeoPoint(geoSRS, 0, 0, 0, ALTMODE_ABSOLUTE), "Chicago", pm), 0.0, 2e6);
        osgEarth::GeoTransform*           geo = new osgEarth::GeoTransform;
        GeoPoint pos(
            geoSRS,
           -87.65, 41.90, 1000
            ALTMODE_RELATIVE);
        geo->addChild( lod );
        geo->setPosition( pos );
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: OSGEarth ::GeoTransform can add Placenode nodes?

It doesn't work because PlaceNode already has a GeoTransform in it. Call PlaceNode::getGeoTransform() to access it. You can also use the RenderSymbol::maxAltitude property if you apply a Style to the PlaceNode.
Glenn Waldron / Pelican Mapping
Mirro187 Mirro187
Reply | Threaded
Open this post in threaded view
|

Re: OSGEarth ::GeoTransform can add Placenode nodes?

Thank you for your question and answer.

I would like to ask why the building occlusion Placenode nodes is invalid when RenderSymbol::depthTest property is set TRUE.