void SceneEditorScreenMain::SettingsChanged()
{
    for(int32 i = 0; i < (int32)bodies.size(); ++i)
    {
        EditorScene *scene = bodies[i]->bodyControl->GetScene();
        scene->SetDrawGrid(EditorSettings::Instance()->GetDrawGrid());
    }
}
Пример #2
0
void SceneEditorScreenMain::SettingsChanged()
{
//    BodyItem *iBody = FindCurrentBody();
//    SceneNode *node = iBody->bodyControl->GetSelectedSGNode();
//    EditorScene *editorScene = iBody->bodyControl->GetScene();
//    editorScene->SetForceLodLayer(node, EditorSettings::Instance()->GetForceLodLayer());
    

    for(int32 i = 0; i < (int32)bodies.size(); ++i)
    {
        EditorScene *scene = bodies[i]->bodyControl->GetScene();
//        scene->SetForceLodLayer(EditorSettings::Instance()->GetForceLodLayer());
//        int32 lodCount = EditorSettings::Instance()->GetLodLayersCount();
//        for(int32 iLod = 0; iLod < lodCount; ++iLod)
//        {
//            float32 nearDistance = EditorSettings::Instance()->GetLodLayerNear(iLod);
//            float32 farDistance = EditorSettings::Instance()->GetLodLayerFar(iLod);
//            
//            scene->ReplaceLodLayer(i, nearDistance, farDistance);
//        }
        
        scene->SetDrawGrid(EditorSettings::Instance()->GetDrawGrid());
    }
}