本文整理汇总了C++中ogre::StringVectorPtr::size方法的典型用法代码示例。如果您正苦于以下问题:C++ StringVectorPtr::size方法的具体用法?C++ StringVectorPtr::size怎么用?C++ StringVectorPtr::size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ogre::StringVectorPtr
的用法示例。
在下文中一共展示了StringVectorPtr::size方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: startRandomTitle
void SoundManager::startRandomTitle()
{
Ogre::StringVectorPtr filelist;
filelist = mResourceMgr.findResourceNames(Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,
"Music/"+mCurrentPlaylist+"/*");
if(!filelist->size())
return;
int i = rand()%filelist->size();
streamMusicFull((*filelist)[i]);
}
示例2: updateLevels
void MainWindow::updateLevels()
{
try
{
ClientPluginManager& pluginManager = EditorGlobals::mGrid->getActiveServer().getPluginManager();
LevelManager& levelManager = pluginManager.getPlugin<LevelManager>();
ResourceManager& resourceManager = pluginManager.getPlugin<ResourceManager>();
Ogre::StringVectorPtr levels = levelManager.list();
int numListLevels = qMin( levels->size(), (std::size_t)cMaxLevels );
for( int i = 0; i < numListLevels; ++i )
{
Path filePath = resourceManager.getResourcePath() / levels->at( i );
QString file = QString( filePath.string().c_str() );
QString text = tr( "&%1 %2" ).arg( i + 1 ).arg( strippedName( file ) );
mLevelActions[i]->setText( text );
mLevelActions[i]->setData( file );
mLevelActions[i]->setVisible( true );
}
for( int i = numListLevels; i < cMaxLevels; ++i )
mLevelActions[i]->setVisible( false );
}
catch( Exception e )
{
// Ignore error
}
}
示例3: DestroyAssetGroup
void ResourceManager::DestroyAssetGroup(const String& GroupName)
{
for( std::vector<String>::iterator it = ResourceGroups.begin() ; it != ResourceGroups.end() ; it++ )
{
if(GroupName == (*it))
{
ResourceGroups.erase(it);
break;
}
}
/// @todo This is a bit of a hack, but needs to be here until we can upgrade our resource system.
Ogre::StringVectorPtr ResourceNames = this->OgreResource->listResourceNames(GroupName,false);
for( Whole X = 0 ; X < ResourceNames->size() ; ++X )
{
if(ResourceNames->at(X).find(".mesh"))
{
MeshManager::GetSingletonPtr()->UnloadMesh(ResourceNames->at(X));
}
}
this->OgreResource->destroyResourceGroup(GroupName);
}