void EditorFrameHandler::Exit()
{
	CommonDeclarations::GetApplication()->SetCurrentCamera(CommonDeclarations::GetCamera()->GetOgreCamera());
	Ogre::SceneManager *SceneMgr = CommonDeclarations::GetSceneManager();
	SceneMgr->destroyCamera(EditorCamera);
	EditorCamera = NULL;

	ExitGUI();

	MyGUI::Gui *gui = GUISystem::GetInstance()->GetGui();
	gui->hidePointer();
}
Beispiel #2
0
	void Camera::destroy ()
	{
		Ogre::SceneManager *mSceneMgr = RadXML::getSingletonPtr ()->getSceneManager ();

		destroySceneNode ();

		if (camCamera != 0)
		{
			mSceneMgr->destroyCamera (camCamera);
			camCamera = 0;
		}
	}
Beispiel #3
0
/**
* @internal
* @brief Releases the class resources.
* After this method is called the class is not valid anymore.
*/
void Camera3D::end()
{
    // Check if the class is already released
    if ( !isValid() )
        return;

    Ogre::SceneManager* sceneManager = GraphicsManager::getSingleton().getSceneManagerPtr();
    if ( sceneManager )
    {
        sceneManager->destroyCamera( m_pOgreCamera );
    }


    // The class is not valid anymore
    m_bIsValid = false;
}
void OgreSample::cleanupContent()
{
	if(m_pSim != NULL)
	{
		m_pSim->release();
		delete m_pSim;
		m_pSim = NULL;
	}

	Ogre::SceneManager *mgr = mRoot->getSceneManager(mInfo["Title"]);
	if(mgr != NULL)
	{
		mgr->destroyCamera(mInfo["Title"] + "Camera");
		mRoot->destroySceneManager(mgr);
	}
}
Camera::~Camera()
{
	Ogre::Root& root = Ogre::Root::getSingleton();
	Ogre::SceneManager* sceneMgr = root.getSceneManager(BFG_SCENEMANAGER);
	
	mSubLane.reset();

	if (mRenderTargetCreated)
	{
		Ogre::TextureManager::getSingleton().remove(stringify(mHandle));
		Ogre::MaterialManager::getSingleton().remove(stringify(mHandle));
		mRenderTarget = NULL;
	}

	sceneMgr->destroyCamera(stringify(mHandle));

	if (mNodeCreated)
	{
		sceneMgr->destroySceneNode(mCameraNode);
	}
}
Camera::~Camera()
{
	Ogre::Root& root = Ogre::Root::getSingleton();
	Ogre::SceneManager* sceneMgr = root.getSceneManager(BFG_SCENEMANAGER);
	
	Main::eventLoop()->disconnect(ID::VE_UPDATE_POSITION, this);
	Main::eventLoop()->disconnect(ID::VE_UPDATE_ORIENTATION, this);

	if (mRenderTargetCreated)
	{
		Ogre::TextureManager::getSingleton().remove(stringify(mHandle));
		Ogre::MaterialManager::getSingleton().remove(stringify(mHandle));
		mRenderTarget = NULL;
	}

	sceneMgr->destroyCamera(stringify(mHandle));

	if (mNodeCreated)
	{
		sceneMgr->destroySceneNode(mCameraNode);
	}
}