本文整理汇总了C++中ogre::Node::removeChild方法的典型用法代码示例。如果您正苦于以下问题:C++ Node::removeChild方法的具体用法?C++ Node::removeChild怎么用?C++ Node::removeChild使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ogre::Node
的用法示例。
在下文中一共展示了Node::removeChild方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getBase
Ogre::SceneNode * WheelAnimalSceneObj::getBaseCenter()
{
if(_sn == NULL)
{
_sn = Orz::OgreGraphicsManager::getSingleton().getSceneManager()->getRootSceneNode()->createChildSceneNode(getCenterPoint());
//_sn->yaw(Ogre::Radian(Ogre::Math::PI));
for(int i=0 ; i<(BASE_ALL-BASE_0); ++i)
{
Ogre::SceneNode * base = getBase(i);
Ogre::Node * parent = base->getParent();
Ogre::Vector3 p = base->getPosition();
if(parent)
{
parent->removeChild(base);
}
base->translate(-getCenterPoint());
_sn->addChild(base);
Ogre::SceneManager * sm = OgreGraphicsManager::getSingleton().getSceneManager();
Ogre::Entity * ent = sm->createEntity("ring"+Ogre::StringConverter::toString(i), "zp_dwdzgh.mesh");
Ogre::SceneNode * node = base->createChildSceneNode("ring"+Ogre::StringConverter::toString(i),Ogre::Vector3(0.f, 10.f, 0.f));
node->setScale(0.6f,0.6f,0.6f);
node->attachObject(ent);
Orz::OgreGraphicsManager::getSingleton().getSceneManager()->getSceneNode("ring"+Ogre::StringConverter::toString(i))->setVisible(false);
}
}
return _sn;
}
示例2: unLoad
bool FaSoundEditor::unLoad()
{
if(!mLoaded->get())
return true;
destroyBoundingBox();
if(mHandle)
{
Ogre::Node *parent = mHandle->getParent();
parent->removeChild(mHandle);
mOgitorsRoot->GetSceneManager()->destroySceneNode(mHandle);
mOgitorsRoot->GetSceneManager()->destroyEntity(mEntity);
mHandle = 0;
mEntity = 0;
}
mLoaded->set(false);
return true;
}
示例3: setVisible
void VLogicModel::setVisible(VBOOL visible)
{
if (mModelMainNode != VNULL)
{
mModelMainNode->setVisible(visible);
Ogre::Node *parentNode = mModelMainNode->getParent();
if (visible)
{
if (parentNode == VNULL)
{
mParentNode->addChild(mModelMainNode);
}
else
{
if (mParentNode != parentNode)
{
}
}
}
else
{
if (parentNode != VNULL)
{
if (mParentNode != parentNode)
{
}
parentNode->removeChild(mModelMainNode);
}
else
{
if (mVisible != visible)
{
}
}
}
mVisible = visible;
// 特效也需要设置可见性
// locator上挂接的model也需要设置可见性
for (VLocatorMap::iterator itr = mLocators.begin(); itr != mLocators.end(); ++itr)
{
VLocatorValue &locator = itr->second;
for (VSlotMap::iterator i = locator.mSlots.begin(); i != locator.mSlots.end(); ++i)
{
VSlotValue &slot = i->second;
if (slot.mModel != VNULL)
{
slot.mModel->setVisible(visible);
}
}
}
// 设置技能特效可见性
if (!visible)
{
}
}
}