void EditorBodyControl::Update(float32 timeElapsed) { Entity * selection = scene->GetProxy(); if (selection) { rotationCenter = selection->GetWorldTransform().GetTranslationVector(); ArrowsNode* arrowsNode = GetArrowsNode(true); if (arrowsNode) UpdateArrowsNode(selection); } else { ArrowsNode* arrowsNode = GetArrowsNode(false); if (arrowsNode) { arrowsNode->SetVisible(false); SceneData *activeScene = SceneDataManager::Instance()->SceneGetActive(); activeScene->RemoveSceneNode(arrowsNode); } } if(cameraController) { cameraController->Update(timeElapsed); } if(currentLandscapeEditor) { currentLandscapeEditor->Update(timeElapsed); } UIControl::Update(timeElapsed); }
void MeshInstancePropertyControl::OnConvertToShadowVolume(BaseObject * object, void * userData, void * callerData) { ((MeshInstanceNode*)currentSceneNode)->ConvertToShadowVolume(); SceneData *activeScene = SceneDataManager::Instance()->SceneGetActive(); activeScene->RemoveSceneNode(currentSceneNode); }
void EditorBodyControl::RemoveSelectedSGNode() { SceneData *activeScene = SceneDataManager::Instance()->SceneGetActive(); activeScene->RemoveSceneNode(GetSelectedSGNode()); }
void EditorBodyControl::Update(float32 timeElapsed) { Entity * selection = scene->GetProxy(); if (selection) { rotationCenter = selection->GetWorldTransform().GetTranslationVector(); ArrowsNode* arrowsNode = GetArrowsNode(true); if (arrowsNode) UpdateArrowsNode(selection); } else { ArrowsNode* arrowsNode = GetArrowsNode(false); if (arrowsNode) { arrowsNode->SetVisible(false); SceneData *activeScene = SceneDataManager::Instance()->SceneGetActive(); activeScene->RemoveSceneNode(arrowsNode); } } if(cameraController) { cameraController->Update(timeElapsed); } if(currentLandscapeEditor) { currentLandscapeEditor->Update(timeElapsed); } UIControl::Update(timeElapsed); BeastProxy::Instance()->Update(beastManager); if(BeastProxy::Instance()->IsJobDone(beastManager)) { PackLightmaps(); BeastProxy::Instance()->SafeDeleteManager(&beastManager); Landscape *land = scene->GetLandscape(scene); if(land) { FilePath textureName = land->GetTextureName(DAVA::Landscape::TEXTURE_COLOR); textureName.ReplaceFilename("temp_beast.png"); FileSystem::Instance()->DeleteFile(textureName); } #if defined (__DAVAENGINE_WIN32__) BeastCommandLineTool *beastTool = dynamic_cast<BeastCommandLineTool *>(CommandLineManager::Instance()->GetActiveCommandLineTool()); if(beastTool) { QtMainWindowHandler::Instance()->SaveScene(scene, beastTool->GetScenePathname()); bool forceClose = CommandLineParser::CommandIsFound(String("-force")) || CommandLineParser::CommandIsFound(String("-forceclose")); if(forceClose) Core::Instance()->Quit(); } #endif //#if defined (__DAVAENGINE_WIN32__) QtMainWindowHandler::Instance()->ReloadSceneTextures(); } }