本文整理汇总了C++中ogre::FileInfoListPtr::back方法的典型用法代码示例。如果您正苦于以下问题:C++ FileInfoListPtr::back方法的具体用法?C++ FileInfoListPtr::back怎么用?C++ FileInfoListPtr::back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ogre::FileInfoListPtr
的用法示例。
在下文中一共展示了FileInfoListPtr::back方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mSpeed
//---------------------------------------------------------------------------------------------------------
Vehicle::Vehicle(const std::string &fileName,Ogre::SceneManager* sm,
Ogre::RenderWindow* win, NxScene* ns,
const Ogre::Vector3 pos, const Ogre::Quaternion ori):
mSpeed(0), mAngle(0),mAngleDelta(0),mTurnLeft(0),mTurnRight(0),mRollAngle(0)
{
//初始化各种变量
mSceneMgr = sm;
mWindow = win;
mOriginalPos = pos;
mOriginalQuat = ori;
mNxScene = ns;
//mVehicleInfo.loadFromFile("carinfo.cfg");
mDecalShadow = NULL;
VehicleWheel vw;
mWheels.push_back(vw);
mWheels.push_back(vw);
mWheels.push_back(vw);
mWheels.push_back(vw);
loadScene(fileName);
//load parameter data from file
Ogre::FileInfoListPtr fp =
Ogre::ResourceGroupManager::getSingleton().findResourceFileInfo("Popular", fileName + ".vpf");
Ogre::String total = fp->back().archive->getName() + "\\" + fileName + ".vpf";
mVehicleParam.loadFromFile(total);
refreshParameter();
mCarNode = mBaseCarNode;
//创建摄像机节点
mCameraDerivedNode = mCarNode->createChildSceneNode(Ogre::Vector3(0.0f, mBoundingBox.getSize().y, -mBoundingBox.getSize().z*2));
mVehicleCamer = new VehicleCamera(fileName + "VehicleCamera", mWindow, mSceneMgr);
mVehicleCamer->setTarget(mCameraDerivedNode, mCarNode);
mVehicleCamer->setTightness(2.5f);
//获取VehicleCamera计算后得到的CameraNode
mCameraNode = mVehicleCamer->getCameraNode();
//创建车的附加物体外设
createPeriphery();
CompositorManager::getSingleton().addCompositor(mWindow->getViewport(0), "Radial Blur");
CompositorManager::getSingleton().setCompositorEnabled(mWindow->getViewport(0), "Radial Blur", false);
tforce = ttortue = NxVec3(0, 0, 0);
isJet = false;
}
示例2: loadSceneFile
bool GameState::loadSceneFile(Ogre::String filename,NXU::NXU_FileType type)
{
bool success = false;
if (mPhysicsSDK)
{
Ogre::String totalname;
//获得完整文件路径
Ogre::FileInfoListPtr svp = Ogre::ResourceGroupManager::getSingleton().findResourceFileInfo("Popular", filename);
totalname = svp->back().archive->getName() + "/" + filename;
Ogre::StringVector sv = Ogre::StringUtil::split(totalname, "/");
totalname = sv[0];
for (unsigned int i = 1;i<sv.size();i++)
totalname += "\\\\" + sv[i];
//读取场景
NXU::NxuPhysicsCollection *c = NXU::loadCollection(totalname.c_str(), type );
if ( c )
{
if (mPhysicScene)
{
mPhysicsSDK->releaseScene(*mPhysicScene);
}
if (mPhysicsSDK)
{
success = NXU::instantiateCollection( c, *mPhysicsSDK, 0, 0, 0);
mPhysicScene = mPhysicsSDK->getScene(0);
}
NXU::releaseCollection(c);
}
else
{
}
}
return success;
}