本文整理汇总了C++中ogre::MovableObject::setQueryFlags方法的典型用法代码示例。如果您正苦于以下问题:C++ MovableObject::setQueryFlags方法的具体用法?C++ MovableObject::setQueryFlags怎么用?C++ MovableObject::setQueryFlags使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ogre::MovableObject
的用法示例。
在下文中一共展示了MovableObject::setQueryFlags方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: movableobject_set_query_flags
///void setQueryFlags(uint32 flags);
void movableobject_set_query_flags(MovableObjectHandle handle, unsigned int flags)
{
Ogre::MovableObject* obj = static_cast<Ogre::MovableObject*>(handle);
obj->setQueryFlags(flags);
}
示例2: Load
void Map::Load(std::string sceneFile)
{
this->mLoader = new Utilities::DotSceneLoader();
this->mLoader->parseDotScene(sceneFile, "General", GameFramework::getSingletonPtr()->sceneManager);
std::vector<Ogre::Entity*> mNavmeshEnts;
/*Ogre::Entity* mapE = GameFramework::getSingletonPtr()->sceneManager->createEntity("Map", "dungeon.mesh");
Ogre::SceneNode* mapNode = GameFramework::getSingletonPtr()->sceneManager->getRootSceneNode()->createChildSceneNode("MapNode");
mapNode->scale(Vector3(2,2,2));
mapNode->attachObject(mapE);
mNavmeshEnts.push_back(mapE);*/
mRecast = new OgreRecast(GameFramework::getSingletonPtr()->sceneManager);
mDetourTileCache = new OgreDetourTileCache(mRecast);
if (this->mLoader != 0)
{
if (this->mLoader->entityList->size() > 0)
{
ConfigFile cf;
std::vector<Ogre::Entity*> srcMeshes;// = std::vector<Ogre::Entity*>(this->mLoader->entityList->begin(), this->mLoader->entityList->end());
bool could_find_plane = false;
for (int i = 0; i < this->mLoader->entityList->size(); i++ )
{
Ogre::Entity* ent = this->mLoader->entityList->at(i);
if (ent->getName() == "Plane#0")
{
//ent->setMaterialName("MyMaterial");
ent->setMaterialName("PlaneMaterial");
ent->setCastShadows(false);
//ent->setVisible(false);
//ent->getParentSceneNode()->setPosition(Vector3(0,0,0));
srcMeshes.clear();
srcMeshes.push_back(ent);
could_find_plane = true;
}
}
if (could_find_plane)
{
inputGeom = new InputGeom(srcMeshes);
}
else
{
//srcMeshes = std::vector<Ogre::Entity*>(this->mLoader->entityList->begin(), this->mLoader->entityList->end());
if (this->mLoader->getTerrainGroup() != 0)
{
inputGeom = new InputGeom(this->mLoader->getTerrainGroup(), srcMeshes);
}
else
{
inputGeom = new InputGeom(srcMeshes);
}
}
if(mDetourTileCache->TileCacheBuild(inputGeom))
{
mDetourTileCache->drawNavMesh();
}
else
{
Ogre::LogManager::getSingletonPtr()->logMessage("ERROR: could not generate useable navmesh from mesh using detourTileCache.");
return;
}
}
}
Ogre::SceneNode* mNavMeshNode = (Ogre::SceneNode*)GameFramework::getSingletonPtr()->sceneManager->getRootSceneNode()->getChild("RecastSN");
int ttt = mNavMeshNode->numAttachedObjects();
//mNavMeshNode->setVisible(true);
for (int i = 0; i < mNavMeshNode->numAttachedObjects(); i++)
{
Ogre::MovableObject *obj = mNavMeshNode->getAttachedObject(i);
obj->setVisible(false);
obj->setQueryFlags(QueryFlags::NAVMESH_MASK);
}
this->isLoaded = true;
}