Exemplo n.º 1
0
        private void UpdateRenderables()
        {
            var currentView = CurrentView;
            var tempList    = new LinkedList <Renderable>();

            if (currentView != null)
            {
                // Fill a temporary list with the current list of renderables
                foreach (var model in currentView.FloatingModels)
                {
                    tempList.AddLast(model);
                }
                if (currentView.Scene.Skybox != null)
                {
                    tempList.AddLast(currentView.Scene.Skybox);
                }
                foreach (var positionable in currentView.Scene.Positionables)
                {
                    tempList.AddLast(positionable);
                }
            }

            // Transfer the new list en bloc, thereby updating the list box without loosing the current selection
            _renderables.SetMany(tempList);
        }
Exemplo n.º 2
0
        private void UpdateLights()
        {
            var currentView = CurrentView;

            if (currentView == null)
            {
                _lights.Clear();
            }
            else
            {
                // Transfer the list en bloc, thereby updating the list box without loosing the current selection
                _lights.SetMany(currentView.Scene.Lights);
            }
        }
Exemplo n.º 3
0
        private void UpdateShaders()
        {
            var currentView = CurrentView;

            if (currentView == null)
            {
                _shaders.Clear();
            }
            else
            {
                // Transfer the list en bloc, thereby updating the list box without loosing the current selection
                _shaders.SetMany(currentView.PostShaders);
            }
        }