本文整理汇总了C++中MovableObject::_notifyAttached方法的典型用法代码示例。如果您正苦于以下问题:C++ MovableObject::_notifyAttached方法的具体用法?C++ MovableObject::_notifyAttached怎么用?C++ MovableObject::_notifyAttached使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MovableObject
的用法示例。
在下文中一共展示了MovableObject::_notifyAttached方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: detachObject
//-----------------------------------------------------------------------
MovableObject* SceneNode::detachObject(unsigned short index)
{
MovableObject* ret;
if (index < mObjectsByName.size())
{
ObjectMap::iterator i = mObjectsByName.begin();
// Increment (must do this one at a time)
while (index--)++i;
ret = i->second;
mObjectsByName.erase(i);
ret->_notifyAttached((SceneNode*)0);
// Make sure bounds get updated (must go right to the top)
needUpdate();
return ret;
}
else
{
OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Object index out of bounds.", "SceneNode::getAttchedEntity");
}
}
示例2: detachAllObjects
//-----------------------------------------------------------------------
void SceneNode::detachAllObjects(void)
{
ObjectMap::iterator itr;
for ( itr = mObjectsByName.begin(); itr != mObjectsByName.end(); ++itr )
{
MovableObject* ret = itr->second;
ret->_notifyAttached((SceneNode*)0);
}
mObjectsByName.clear();
// Make sure bounds get updated (must go right to the top)
needUpdate();
}
示例3:
//-----------------------------------------------------------------------
SceneNode::~SceneNode()
{
// Detach all objects, do this manually to avoid needUpdate() call
// which can fail because of deleted items
ObjectMap::iterator itr;
for ( itr = mObjectsByName.begin(); itr != mObjectsByName.end(); ++itr )
{
MovableObject* ret = itr->second;
ret->_notifyAttached((SceneNode*)0);
}
mObjectsByName.clear();
OGRE_DELETE mWireBoundingBox;
}