private void updateLight() { foreach (var combo in _data_mananger._list_combo) { CompontData data = combo.data_list[0]; SourceData source = (SourceData)data; List <TBTfront.CompontParam> list_data = new List <TBTfront.CompontParam>(); for (int i = 1; i < combo.data_list.Count; i++) { list_data.Add(combo.data_list[i]); } // 调后台生成光线 TBTfront.Ant ant = new TBTfront.Ant(); List <RayLineCluster> cluster_list = new List <RayLineCluster>(); CalcOption opt = new CalcOption(); int res = ant.clacLight(list_data, source.rayline_cluster, cluster_list, opt); if (res != 0) { System.Windows.Forms.MessageBox.Show("claclate ray failed, res:" + res.ToString()); continue; } _render.RemoveViewProp(combo.actor); combo.actor = CompontFactory.genRayActor(cluster_list); _render.AddViewProp(combo.actor); } updateVtk(); }
// 修改时点击确认 public void ModifyCompont(object sender, CompontData args) { _render.RemoveViewProp(args.actor); args.actor = CompontFactory.genActor(args); _render.AddViewProp(args.actor); updateVtk(); }
public void setRender(vtkRenderWindow renWin) { _renWin = renWin; _render = renWin.GetRenderers().GetFirstRenderer(); CompontData data = genData(true); _actor = CompontFactory.genActor(data, CompontFactory.genClickProperty()); _render.AddViewProp(_actor); _renWin.Render(); }
// 新建时点击确认 public void AddCompont(object sender, CompontData args) { args.actor = CompontFactory.genActor(args); int index = _data_mananger.addCompont(args); // Add the actors to the renderer, set the window size _render.AddViewProp(args.actor); updateVtk(); AddNodeTree(args); }
public void AddRestriction(object sender, CompontData args) { Restriction tmp = (Restriction)args; tmp.owner.restriction = tmp; CompontData owner = Restriction.getOwner(tmp); _render.RemoveViewProp(owner.actor); owner.actor = CompontFactory.genActor(owner); // Add the actors to the renderer, set the window size _render.AddViewProp(owner.actor); updateVtk(); AddNodeTree(_select_node, args); }
public void on_valueChanged() { if (_render == null) { return; } _render.RemoveViewProp(_actor); CompontData data = genData(true); if (data == null) { return; } _actor = CompontFactory.genActor(data, CompontFactory.genClickProperty()); _render.AddViewProp(_actor); _renWin.Render(); }