public void createDebugInterface(RendererPlugin rendererPlugin, SimSubScene subScene)
 {
     drawingSurface = rendererPlugin.createDebugDrawingSurface("BEPUikDebugSurface", subScene);
     if (drawingSurface != null)
     {
         drawingSurface.setDepthTesting(depthTesting);
     }
 }
 public void destroyDebugInterface(RendererPlugin rendererPlugin, SimSubScene subScene)
 {
     if (drawingSurface != null)
     {
         rendererPlugin.destroyDebugDrawingSurface(drawingSurface);
         drawingSurface = null;
     }
 }
        public EditInterfaceRendererController(RendererPlugin renderer, UpdateTimer timer, SceneController sceneController, PropertiesEditor mainEditor)
        {
            this.renderer   = renderer;
            this.timer      = timer;
            this.mainEditor = mainEditor;
            sceneController.OnSceneLoaded    += new SceneControllerEvent(sceneController_OnSceneLoaded);
            sceneController.OnSceneUnloading += new SceneControllerEvent(sceneController_OnSceneUnloading);
            timer.addUpdateListener(this);

            mainEditor.ActiveInterfaceChanged += new PropertiesEditorEvent(mainEditor_ActiveInterfaceChanged);
            mainEditor.FieldChanged           += new PropertiesEditorEvent(mainEditor_FieldChanged);
            mainEditor.MainInterfaceChanged   += new PropertiesEditorEvent(mainEditor_MainInterfaceChanged);
        }
        public SimObjectMover(String name, RendererPlugin rendererPlugin, EventManager eventManager, SceneViewController sceneViewController)
        {
            this.sceneViewController = sceneViewController;
            this.rendererPlugin      = rendererPlugin;
            this.name        = name;
            this.events      = eventManager[GuiFrameworkEditorInterface.ToolsEventLayers];
            events.OnUpdate += events_OnUpdate;

            ToolSizeIncrement = 1.0f;
            ToolSizeMinimum   = 1.0f;

            IncreaseToolSize.FirstFrameUpEvent += IncreaseToolSize_FirstFrameUpEvent;
            DecreaseToolSize.FirstFrameUpEvent += DecreaseToolSize_FirstFrameUpEvent;
        }
Example #5
0
 /// <summary>
 /// Set the RendererPlugin for the run of this engine. It is only valid
 /// to set this one time. Any attempts to set this after the first time
 /// will throw an InvalidPluginException. This will also fire the
 /// OnRendererPluginFound where the default window creation settings can
 /// be overwritten.
 /// </summary>
 /// <param name="plugin">The RendererPlugin to use.</param>
 /// <param name="defaultWindow">Out variable that will contain the setup for the default window.</param>
 public void setRendererPlugin(RendererPlugin plugin, out WindowInfo defaultWindow)
 {
     if (rendererPlugin == null)
     {
         rendererPlugin = plugin;
         Log.Default.sendMessage("Renderer plugin set to {0}.", LogLevel.Info, "Engine", plugin.Name);
         if (OnConfigureDefaultWindow != null)
         {
             OnConfigureDefaultWindow.Invoke(out defaultWindow);
             if (defaultWindow == null)
             {
                 throw new InvalidPluginException("A custom window configure function was invoked, but it did not set the default window up correctly. The renderer cannot be initalized.");
             }
         }
         else
         {
             defaultWindow = new WindowInfo("Anomalous Engine", 640, 480);
         }
     }
     else
     {
         throw new InvalidPluginException("A second renderer plugin was added. It is only valid to specify one renderer plugin please correct this issue.");
     }
 }