本文整理汇总了C++中TIMER::Load方法的典型用法代码示例。如果您正苦于以下问题:C++ TIMER::Load方法的具体用法?C++ TIMER::Load怎么用?C++ TIMER::Load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TIMER
的用法示例。
在下文中一共展示了TIMER::Load方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ToolSceneXml
///............................................................................................................................
/// _Tool_ scene
/// check/resave all tracks scene.xml
///............................................................................................................................
void CGui::ToolSceneXml()
{
//Ogre::Timer ti;
LogO("ALL tracks scene ---------");
std::map<string, int> noCol,minSc;
ResourceGroupManager& rg = ResourceGroupManager::getSingleton();
int i,n;
for (i=0; i < data->tracks->trks.size(); ++i)
{ // foreach track
string trk = data->tracks->trks[i].name, path = gcom->pathTrk[0] +"/"+ trk +"/";
Scene sc; sc.LoadXml(path +"scene.xml");
SplineRoad rd(app); rd.LoadFile(path +"road.xml");
bool modif = false;
int l = 17-trk.length(); // align
for (n=0; n < l; ++n) trk += " ";
/// terrain
#if 0 // used
for (n=0; n < sc.td.layers.size(); ++n)
{ const TerLayer& l = sc.td.layersAll[sc.td.layers[n]];
#else // all
for (n=0; n < TerData::ciNumLay; ++n)
{ TerLayer& l = sc.td.layersAll[n];
#endif
bool e = l.texFile.empty();
if (!e && !rg.resourceExistsInAnyGroup(l.texFile))
LogO("Ter: " + trk + " Not Found !!! " + l.texFile);
if (!l.texNorm.empty() && !rg.resourceExistsInAnyGroup(l.texNorm))
LogO("Ter: " + trk + " Not Found !!! " + l.texNorm);
const PTer* p = data->pre->GetTer(l.texFile.substr(0, l.texFile.length()-4));
if (!e && !p)
LogO("Ter: " + trk + " Not Found in presets !!! " + l.texFile);
if (!e && l.surfName == "Default")
{
LogO("Ter: " + trk + " Default surface !!! " + l.texFile);
#if 0 // fix from presets
l.surfName = p->surfName;
l.dust = p->dust; l.dustS = p->dustS;
l.mud = p->mud; l.smoke = 0.f; l.tclr = p->tclr;
modif = true;
LogO("Ter: Fixed");
#endif
}
#if 0
if (!e && p && l.surfName != p->surfName)
LogO("Ter: " + trk + " Different surface ! " + l.texFile + " " + l.surfName + " pre: " + p->surfName);
#endif
}
/// road
for (n=0; n < MTRs; ++n)
{
String s = rd.sMtrRoad[n];
//if (!s.empty() && cmbRoadMtr[0]->findItemIndexWith(s) == MyGUI::ITEM_NONE)
// LogO("Road: " + trk + " Not Found !!! " + s);
if (!s.empty() && !data->pre->GetRoad(s))
LogO("Road: " + trk + " Not Found in presets !!! " + s);
s = rd.sMtrPipe[n];
if (!s.empty() && cmbPipeMtr[0]->findItemIndexWith(s) == MyGUI::ITEM_NONE)
LogO("Road: " + trk + " Not Found !!! " + s);
//if (!s.empty() && !data->pre->GetRoad(s))
// LogO("Pipe: " + trk + " Not Found in presets !!! " + s);
//sMtrWall,sMtrWallPipe, sMtrCol
//sc.td.layerRoad
}
/// grass
for (n=0; n < Scene::ciNumGrLay; ++n)
{ const SGrassLayer& l = sc.grLayersAll[n];
String s = l.material;
if (!s.empty() && l.on && !data->pre->GetGrass(s))
LogO("Grs: " + trk + " Not Found in presets !!! " + s);
}
/// veget
for (n=0; n < Scene::ciNumPgLay; ++n)
{
const PagedLayer& l = sc.pgLayersAll[n];
const String& s = l.name; //.mesh
// checks
if (!s.empty())
{
if (l.on && !rg.resourceExistsInAnyGroup(s))
LogO("Veg: " + trk + " Not Found !!! " + s);
//.........这里部分代码省略.........