当前位置: 首页>>代码示例>>C++>>正文


C++ MovableObject::_notifyAttached方法代码示例

本文整理汇总了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");
        }

    }
开发者ID:RoboticOxygen,项目名称:extramegablob,代码行数:27,代码来源:OgreSceneNode.cpp

示例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();
    }
开发者ID:Bewolf2,项目名称:LearningGameAI,代码行数:13,代码来源:OgreSceneNode.cpp

示例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;
    }
开发者ID:Bewolf2,项目名称:LearningGameAI,代码行数:15,代码来源:OgreSceneNode.cpp


注:本文中的MovableObject::_notifyAttached方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。