osgEarth 2.1.1
Functions | Variables

anonymous_namespace{FeatureModelGraph.cpp} Namespace Reference

Functions

static std::string s_makeURI (UID uid, unsigned lod, unsigned x, unsigned y)
osg::Group * createPagedNode (const osg::BoundingSphered &bs, const std::string &uri, float minRange, float maxRange)
GeoExtent s_getTileExtent (unsigned lod, unsigned tileX, unsigned tileY, const GeoExtent &fullExtent)

Variables

UID _uid = 0
Threading::ReadWriteMutex _fmgMutex
std::map< UID,
FeatureModelGraph * > 
_fmgRegistry

Function Documentation

osg::Group* anonymous_namespace{FeatureModelGraph.cpp}::createPagedNode ( const osg::BoundingSphered &  bs,
const std::string &  uri,
float  minRange,
float  maxRange 
)

Definition at line 58 of file FeatureModelGraph.cpp.

    {
#ifdef USE_PROXY_NODE_FOR_TESTING
        osg::ProxyNode* p = new osg::ProxyNode();
        p->setCenter( bs.center() );
        p->setRadius( bs.radius() );
        p->setFileName( 0, uri );
#else
        osg::PagedLOD* p = new osg::PagedLOD();
        p->setCenter( bs.center() );
        p->setRadius( bs.radius() );
        p->setFileName( 0, uri );
        p->setRange( 0, minRange, maxRange );
#endif
        return p;
    }

Here is the caller graph for this function:

GeoExtent anonymous_namespace{FeatureModelGraph.cpp}::s_getTileExtent ( unsigned  lod,
unsigned  tileX,
unsigned  tileY,
const GeoExtent fullExtent 
)

Definition at line 131 of file FeatureModelGraph.cpp.

    {
        double w = fullExtent.width();
        double h = fullExtent.height();
        for( unsigned i=0; i<lod; ++i ) {
            w *= 0.5;
            h *= 0.5;
        }
        return GeoExtent(
            fullExtent.getSRS(),
            fullExtent.xMin() + w * (double)tileX,
            fullExtent.yMin() + h * (double)tileY,
            fullExtent.xMin() + w * (double)(tileX+1),
            fullExtent.yMin() + h * (double)(tileY+1) );
    }

Here is the call graph for this function:

Here is the caller graph for this function:

static std::string anonymous_namespace{FeatureModelGraph.cpp}::s_makeURI ( UID  uid,
unsigned  lod,
unsigned  x,
unsigned  y 
) [static]

Definition at line 50 of file FeatureModelGraph.cpp.

    {
        std::stringstream buf;
        buf << uid << "." << lod << "_" << x << "_" << y << ".osgearth_pseudo_fmg";
        std::string str = buf.str();
        return str;
    }

Here is the caller graph for this function:


Variable Documentation

Threading::ReadWriteMutex anonymous_namespace{FeatureModelGraph.cpp}::_fmgMutex

Definition at line 47 of file FeatureModelGraph.cpp.

std::map<UID, FeatureModelGraph*> anonymous_namespace{FeatureModelGraph.cpp}::_fmgRegistry

Definition at line 48 of file FeatureModelGraph.cpp.

UID anonymous_namespace{FeatureModelGraph.cpp}::_uid = 0

Definition at line 46 of file FeatureModelGraph.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines