本文整理汇总了C++中TRACK::Load方法的典型用法代码示例。如果您正苦于以下问题:C++ TRACK::Load方法的具体用法?C++ TRACK::Load怎么用?C++ TRACK::Load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TRACK
的用法示例。
在下文中一共展示了TRACK::Load方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadWorld
bool LoadWorld()
{
UnloadWorld();
editordata.helppage = 0;
editordata.numbezinput = 0;
editordata.mousebounce[1] = false;
//teststrip = track.AddNewRoad();
//begin loading world
LoadingScreen("Loading...\nConfiguration files");
CONFIGFILE setupfile;
setupfile.Load(settings.GetDataDir() + "/tracks/editor.config");
setupfile.GetParam("active track", editordata.activetrack);
if (editordata.activetrack == "")
editordata.activetrack = "default";
objects.LoadObjectsFromFolder(settings.GetDataDir() + "/tracks/" +
editordata.activetrack + "/objects/");
track.Load(editordata.activetrack);
//float aangle[] = {0, 1, 0, 0};
//track.GetStartOrientation(0).GetAxisAngle(aangle);
//cam.Rotate(aangle[0], aangle[1], aangle[2], aangle[3]);
VERTEX start = track.GetStart(0);
cam.Move(-start.x, -start.y, -start.z);
cam.Update();
cam.LoadVelocityIdentity();
//car_file = "s2000";
//ifstream csfile;
//car_file = "";
//csfile.open((settings.GetSettingsDir() + "/selected_car").c_str());
//car_paint = 0;
/* if (csfile)
{
state.SetCarName(0, utility.sGetLine(csfile));
state.SetCarPaint(0, utility.iGetParam(csfile));
csfile.close();
}
*/
//LoadingScreen("Loading...\nLoading scenery objects");
//objects.LoadObjectsFromFolder(settings.GetDataDir() + "/tracks/" + state.GetTrackName() + "/objects");
/*trees.DeleteAll();
int numtrees = 200;
for (i = 0; i < numtrees/2; i++)
{
VERTEX tp;
tp.x = ((float) rand()/RAND_MAX)*(param[0]/2.0)+param[0]/4.0;
tp.z = ((float) rand()/RAND_MAX)*(param[2]/2.0)+param[2]/4.0;
tp.x += param[3];
tp.z += param[4];
tp.y = terrain.GetHeight(tp.x, tp.z);
trees.Add(tp, 40.0, 0, 5);
}
for (i = 0; i < numtrees/2; i++)
{
VERTEX tp;
tp.x = ((float) rand()/RAND_MAX)*(param[0]/2.0)+param[0]/4.0;
tp.z = ((float) rand()/RAND_MAX)*(param[2]/2.0)+param[2]/4.0;
tp.x += param[3];
tp.z += param[4];
tp.y = terrain.GetHeight(tp.x, tp.z);
trees.Add(tp, 60.0, 1, 5);
}*/
LoadingScreen("Loading...\nDone");
mq1.AddMessage("Editor started, press H for help");
return true;
}