本文整理汇总了C++中TileNode::setMinimumExpiryFrames方法的典型用法代码示例。如果您正苦于以下问题:C++ TileNode::setMinimumExpiryFrames方法的具体用法?C++ TileNode::setMinimumExpiryFrames怎么用?C++ TileNode::setMinimumExpiryFrames使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TileNode
的用法示例。
在下文中一共展示了TileNode::setMinimumExpiryFrames方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TileNode
void
TileNode::createChildren(EngineContext* context)
{
// NOTE: Ensure that _mutex is locked before calling this fucntion!
// Create the four child nodes.
for(unsigned quadrant=0; quadrant<4; ++quadrant)
{
TileNode* node = new TileNode();
if (context->getOptions().minExpiryFrames().isSet())
{
node->setMinimumExpiryFrames( *context->getOptions().minExpiryFrames() );
}
if (context->getOptions().minExpiryTime().isSet())
{
node->setMinimumExpiryTime( *context->getOptions().minExpiryTime() );
}
// Build the surface geometry:
node->create( getTileKey().createChildKey(quadrant), context );
// Add to the scene graph.
addChild( node );
// Inherit the samplers with new scale/bias information.
node->inheritState( context );
}
}
示例2: setupRenderBindings
void
RexTerrainEngineNode::dirtyTerrain()
{
//TODO: scrub the geometry pool?
// clear the loader:
_loader->clear();
if ( _terrain )
{
this->removeChild( _terrain );
}
// New terrain
_terrain = new osg::Group();
this->addChild( _terrain );
// are we LOD blending?
bool setupParentData =
_terrainOptions.morphImagery() == true || // gw: redundant?
this->parentTexturesRequired();
// reserve GPU unit for the main color texture:
if ( _renderBindings.empty() )
{
setupRenderBindings();
}
// recalculate the LOD morphing parameters:
//destroySelectionInfo();
//buildSelectionInfo();
// clear out the tile registry:
if ( _liveTiles.valid() )
{
_liveTiles->moveAll( _deadTiles.get() );
}
// Factory to create the root keys:
EngineContext* context = getEngineContext();
// Build the first level of the terrain.
// Collect the tile keys comprising the root tiles of the terrain.
std::vector<TileKey> keys;
_update_mapf->getProfile()->getAllKeysAtLOD( *_terrainOptions.firstLOD(), keys );
// create a root node for each root tile key.
OE_INFO << LC << "Creating " << keys.size() << " root keys.." << std::endl;
unsigned child = 0;
for( unsigned i=0; i<keys.size(); ++i )
{
TileNode* tileNode = new TileNode();
if (context->getOptions().minExpiryFrames().isSet())
{
tileNode->setMinimumExpiryFrames( *context->getOptions().minExpiryFrames() );
}
if (context->getOptions().minExpiryTime().isSet())
{
tileNode->setMinimumExpiryTime( *context->getOptions().minExpiryTime() );
}
// Next, build the surface geometry for the node.
tileNode->create( keys[i], context );
_terrain->addChild( tileNode );
}
updateState();
// Call the base class
TerrainEngineNode::dirtyTerrain();
}