public bool init(string info, RenderSystem render_sys) { XmlDocument xml = new XmlDocument(); xml.Load(ConfigPath); XmlNode root = xml.SelectSingleNode("EditorConfig"); if(root == null) { MessageBox.Show("无法读取配置文件"); return false; } XmlNode plugin_node = root.SelectSingleNode("Plugin"); if(plugin_node != null) { string plugin_path = plugin_node.Attributes["path"].Value; string plugin_main = plugin_node.Attributes["main"].Value; createAllPlugins(plugin_path, plugin_main); } foreach (Domain domain in m_domains) { EditorGraph.registerComponent(null, domain); domain.init(render_sys); } EditorGraph.broadCast(this, new MessageBase(MessageType.NewDoc, "")); return true; }
public override void init(RenderSystem rsys) { base.init(rsys); ModelViewDoc mdoc = new ModelViewDoc(this); m_current_doc = mdoc; m_current_doc.newDoc(); MainView main_v = new MainView(rsys, mdoc); m_view_mng.addView(main_v); m_view_mng.CurrentView = main_v; m_view_mng.CurrentView.RenderWindow = rsys.createWindow(m_modelview_form.RenderPanel.Width, m_modelview_form.RenderPanel.Height, m_modelview_form.RenderPanel.Handle); m_view_mng.CurrentView.Active = true; m_modelview_form.RenderPanel.setCurrentView(main_v); EditorGraph.registerComponent(this, main_v); EditorGraph.registerComponent(this, m_current_doc); editor.ui.ToolBarDocControl toolbardoc = new editor.ui.ToolBarDocControl(this.getName()); m_modelview_form.mergeToolBar(toolbardoc.ToolBar); EditorGraph.registerComponent(this, toolbardoc.EditorComponent); ToolBarCommonComponent toolbarcommon_comp = new ToolBarCommonComponent(mdoc); m_modelview_form.mergeToolBar(toolbarcommon_comp.ToolbarUI.ToolBar); EditorGraph.registerComponent(this, toolbarcommon_comp); ActionTimeLineComponent actiontimeline_comp = new ActionTimeLineComponent(mdoc); m_modelview_form.insertDockControl(ModelView_Form.DOCK_TYPE_BUTTOM, "",actiontimeline_comp.ActionTimeLineUI); EditorGraph.registerComponent(this, actiontimeline_comp); BoneListComponent bonelist_comp = new BoneListComponent(mdoc); m_modelview_form.insertDockControl(ModelView_Form.DOCK_TYPE_RIGHT_TAB1,"骨架",bonelist_comp.BoneListUI); EditorGraph.registerComponent(this, bonelist_comp); ActionListComponent actionlist_comp = new ActionListComponent(mdoc); m_modelview_form.insertDockControl(ModelView_Form.DOCK_TYPE_RIGHT_TAB2, "动作", actionlist_comp.ActionListUI); EditorGraph.registerComponent(this, actionlist_comp); m_modelview_form.setRightPanelExpand(false); EditorGraph.postMessage(this, new MessageBase("AfterModelViewUICreated")); }
public MainView(RenderSystem rs,ModelViewDoc doc) : base("ModelMainView",rs) { m_camera.Position = new Vector3F(0, -5, 3); m_camera.Direction = new Vector3F(0, 0, 2); m_camera.Focus = true; Camera3DController camera_contrlooer = new Camera3DController("cam"); camera_contrlooer.MoveSpeed = 1.0f; camera_contrlooer.WheelSpeed = 0.01f; BaseController = camera_contrlooer; mLightCtrl = new LightingController(doc); BaseController.OnKeyPressing += _onViewKeyPressing; BaseController.OnKeyUp += _onViewKeyUp; mDoc = doc; }
public bool initEditor(string[] configfile) { if (!m_enable) { try { m_render_sys = new RenderSystem(this.Handle); } catch (System.Exception e) { CommonTool.newLog(m_domain_mng, "RenderSystem 创建失败" + e.Message); } CommonTool.newLog(m_domain_mng, "RenderSystem 创建成功"); if (!m_domain_mng.init("", m_render_sys)) { CommonTool.newLog(m_domain_mng, "Domain 创建失败"); this.Close(); } else { CommonTool.newLog(m_domain_mng, "Domain 创建成功"); } setDomainButtom(m_domain_mng.Domains); if (m_domain_mng.MainDomain != null) { setMainForm(m_domain_mng.MainDomain.MainForm); } m_enable = true; } return m_enable; }
public virtual bool pushToSelect(uint id, RenderSystem rendersys) { return false; }
public virtual void render( RenderSystem rendersys) { }
public View(string name, RenderSystem rs) : base(name) { m_render_sys = rs; }
public PrimitivePlane(IntPtr p, RenderSystem rendersys) : base(p, rendersys) { }
public PrimitiveGrid(IntPtr p, RenderSystem rendersys) : base(p,rendersys) { }
public PrimitiveBorderCube(IntPtr p,RenderSystem rendersys) : base(p,rendersys) { }
public void render(RenderSystem rendersys) { }
public Primitive(IntPtr p,RenderSystem rendersys) { }
public virtual void init( RenderSystem rsys) { m_view_mng.RenderSystem = rsys; }
public virtual void doUpdate( RenderSystem rendersys) { rendersys.setViewParament(m_view_param); m_viewmat = (Matrix4F)rendersys.getViewMatrix(); m_projmat = (Matrix4F)rendersys.getProjMatrix(); }
public Common3DView(string name, RenderSystem rs) : base(name,rs) { }