本文整理汇总了C++中MapInfo::getProfile方法的典型用法代码示例。如果您正苦于以下问题:C++ MapInfo::getProfile方法的具体用法?C++ MapInfo::getProfile怎么用?C++ MapInfo::getProfile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MapInfo
的用法示例。
在下文中一共展示了MapInfo::getProfile方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void
TerrainEngineNode::onMapInfoEstablished( const MapInfo& mapInfo )
{
// set up the CSN values
mapInfo.getProfile()->getSRS()->populateCoordinateSystemNode( this );
// OSG's CSN likes a NULL ellipsoid to represent projected mode.
if ( !mapInfo.isGeocentric() )
this->setEllipsoidModel( NULL );
}
示例2: getTile
// This method is called by StreamingTerrainNode::traverse() in the UPDATE TRAVERSAL.
void
StreamingTerrainNode::refreshFamily(const MapInfo& mapInfo,
const TileKey& key,
StreamingTile::Relative* family,
bool tileTableLocked )
{
osgTerrain::TileID tileId = key.getTileId();
// geocentric maps wrap around in the X dimension.
bool wrapX = mapInfo.isGeocentric();
unsigned int tileCountX, tileCountY;
mapInfo.getProfile()->getNumTiles( tileId.level, tileCountX, tileCountY );
// Relative::PARENT
{
family[StreamingTile::Relative::PARENT].expected = true; // TODO: is this always correct?
family[StreamingTile::Relative::PARENT].elevLOD = -1;
family[StreamingTile::Relative::PARENT].imageLODs.clear();
family[StreamingTile::Relative::PARENT].tileID = osgTerrain::TileID( tileId.level-1, tileId.x/2, tileId.y/2 );
osg::ref_ptr<StreamingTile> parent;
getTile( family[StreamingTile::Relative::PARENT].tileID, parent, !tileTableLocked );
if ( parent.valid() )
{
family[StreamingTile::Relative::PARENT].elevLOD = parent->getElevationLOD();
ColorLayersByUID relLayers;
parent->getCustomColorLayers( relLayers );
for( ColorLayersByUID::const_iterator i = relLayers.begin(); i != relLayers.end(); ++i )
{
family[StreamingTile::Relative::PARENT].imageLODs[i->first] = i->second.getLevelOfDetail();
}
}
}
// Relative::WEST
{
family[StreamingTile::Relative::WEST].expected = tileId.x > 0 || wrapX;
family[StreamingTile::Relative::WEST].elevLOD = -1;
family[StreamingTile::Relative::WEST].imageLODs.clear();
family[StreamingTile::Relative::WEST].tileID = osgTerrain::TileID( tileId.level, tileId.x > 0? tileId.x-1 : tileCountX-1, tileId.y );
osg::ref_ptr<StreamingTile> west;
getTile( family[StreamingTile::Relative::WEST].tileID, west, !tileTableLocked );
if ( west.valid() )
{
family[StreamingTile::Relative::WEST].elevLOD = west->getElevationLOD();
ColorLayersByUID relLayers;
west->getCustomColorLayers( relLayers );
for( ColorLayersByUID::const_iterator i = relLayers.begin(); i != relLayers.end(); ++i )
{
family[StreamingTile::Relative::WEST].imageLODs[i->first] = i->second.getLevelOfDetail();
}
}
}
// Relative::NORTH
{
family[StreamingTile::Relative::NORTH].expected = tileId.y < (int)tileCountY-1;
family[StreamingTile::Relative::NORTH].elevLOD = -1;
family[StreamingTile::Relative::NORTH].imageLODs.clear();
family[StreamingTile::Relative::NORTH].tileID = osgTerrain::TileID( tileId.level, tileId.x, tileId.y < (int)tileCountY-1 ? tileId.y+1 : 0 );
osg::ref_ptr<StreamingTile> north;
getTile( family[StreamingTile::Relative::NORTH].tileID, north, !tileTableLocked );
if ( north.valid() )
{
family[StreamingTile::Relative::NORTH].elevLOD = north->getElevationLOD();
ColorLayersByUID relLayers;
north->getCustomColorLayers( relLayers );
for( ColorLayersByUID::const_iterator i = relLayers.begin(); i != relLayers.end(); ++i )
{
family[StreamingTile::Relative::NORTH].imageLODs[i->first] = i->second.getLevelOfDetail();
}
}
}
// Relative::EAST
{
family[StreamingTile::Relative::EAST].expected = tileId.x < (int)tileCountX-1 || wrapX;
family[StreamingTile::Relative::EAST].elevLOD = -1;
family[StreamingTile::Relative::EAST].imageLODs.clear();
family[StreamingTile::Relative::EAST].tileID = osgTerrain::TileID( tileId.level, tileId.x < (int)tileCountX-1 ? tileId.x+1 : 0, tileId.y );
osg::ref_ptr<StreamingTile> east;
getTile( family[StreamingTile::Relative::EAST].tileID, east, !tileTableLocked );
if ( east.valid() )
{
family[StreamingTile::Relative::EAST].elevLOD = east->getElevationLOD();
ColorLayersByUID relLayers;
east->getCustomColorLayers( relLayers );
for( ColorLayersByUID::const_iterator i = relLayers.begin(); i != relLayers.end(); ++i )
{
family[StreamingTile::Relative::EAST].imageLODs[i->first] = i->second.getLevelOfDetail();
}
//.........这里部分代码省略.........