private void RefreshModel() { Invoke(new Action(() => { scena = new ILScene { new ILPlotCube(twoDMode: false) { surface } }; if (dim == 2) { scena.First <ILPlotCube>().Rotation = Matrix4.Rotation(new Vector3(1, 1, 1), 0.3f); } scena.Screen.First <ILLabel>().Visible = false; ilgraf.Scene = scena; })); }
public MainWindow() { InitializeComponent(); CBMat.ItemsSource = net.matList.Where(mat => mat.Name != ""); Designer.MatList.ItemsSource = net.matList.Where(mat => mat.Name != ""); Designer.TrackNode += Designer_TrackNode; CBMode.Items.Add("Paralelo"); CBMode.Items.Add("Série"); DGMatList.ItemsSource = net.matList; DGMatList.RowEditEnding += DGMatList_RowEditEnding; var scene = new ILScene(); plot = new ILPlotCube(twoDMode: false); scene.Add(plot); var signal = ILMath.ones<float>(10, 10); ILSurface surf = new ILSurface(signal) { Wireframe = { Color = System.Drawing.Color.FromArgb(50, 60, 60, 60) }, Colormap = Colormaps.Jet, }; plot.AllowPan = false; plot.AllowZoom = false; plot.Projection = Projection.Orthographic; plot.Position = new Vector3(1, 3, .5); plot.AllowRotation = false; plot.Add(surf); scene.First<ILPlotCube>().AspectRatioMode = AspectRatioMode.MaintainRatios; scene.First<ILPlotCube>().Rotation = Matrix4.Rotation(new Vector3(0.1, 0, 0), ILMath.pi / 2); ilPanel.Scene.Add(scene); ResultSeeker.ValueChanged += ResultSeeker_ValueChanged; var sceneHx = new ILScene(); plotHx = new ILPlotCube(twoDMode: false); sceneHx.Add(plotHx); var signalHx = ILMath.ones<float>(10, 10); ILSurface surfHx = new ILSurface(signalHx) { Wireframe = { Color = System.Drawing.Color.FromArgb(50, 60, 60, 60) }, Colormap = Colormaps.Jet, }; plotHx.Projection = Projection.Orthographic; plotHx.Position = new Vector3(1, 3, .5); plotHx.AllowRotation = false; plotHx.Add(surfHx); sceneHx.First<ILPlotCube>().AspectRatioMode = AspectRatioMode.MaintainRatios; sceneHx.First<ILPlotCube>().Rotation = Matrix4.Rotation(new Vector3(0.1, 0, 0), ILMath.pi / 2); ilPanelHx.Scene.Add(sceneHx); ResultSeekerHx.ValueChanged += ResultSeekerHx_ValueChanged; var sceneHy = new ILScene(); plotHy = new ILPlotCube(twoDMode: false); sceneHy.Add(plotHy); var signalHy = ILMath.ones<float>(10, 10); ILSurface surfHy = new ILSurface(signalHy) { Wireframe = { Color = System.Drawing.Color.FromArgb(50, 60, 60, 60) }, Colormap = Colormaps.Jet, }; plotHy.Projection = Projection.Orthographic; plotHy.Position = new Vector3(1, 3, .5); plotHy.AllowRotation = false; plotHy.Add(surfHy); sceneHy.First<ILPlotCube>().AspectRatioMode = AspectRatioMode.MaintainRatios; sceneHy.First<ILPlotCube>().Rotation = Matrix4.Rotation(new Vector3(0.1, 0, 0), ILMath.pi / 2); ilPanelHy.Scene.Add(sceneHy); ResultSeekerHy.ValueChanged += ResultSeekerHy_ValueChanged; var sceneHz = new ILScene(); plotHz = new ILPlotCube(twoDMode: false); sceneHz.Add(plotHz); var signalHz = ILMath.ones<float>(10, 10); ILSurface surfHz = new ILSurface(signalHz) { Wireframe = { Color = System.Drawing.Color.FromArgb(50, 60, 60, 60) }, Colormap = Colormaps.Jet, }; plotHz.Projection = Projection.Orthographic; plotHz.Position = new Vector3(1, 3, .5); //plotHz.AllowRotation = false; plotHz.Add(surfHz); sceneHz.First<ILPlotCube>().AspectRatioMode = AspectRatioMode.MaintainRatios; sceneHz.First<ILPlotCube>().Rotation = Matrix4.Rotation(new Vector3(0.1, 0, 0), ILMath.pi / 2); ilPanelHz.Scene.Add(sceneHz); ResultSeekerHz.ValueChanged += ResultSeekerHz_ValueChanged; var sceneEx = new ILScene(); plotEx = new ILPlotCube(twoDMode: false); sceneEx.Add(plotEx); var signalEx = ILMath.ones<float>(10, 10); ILSurface surfEx = new ILSurface(signalEx) { Wireframe = { Color = System.Drawing.Color.FromArgb(50, 60, 60, 60) }, Colormap = Colormaps.Jet, }; plotEx.Projection = Projection.Orthographic; plotEx.Position = new Vector3(1, 3, .5); //plotEx.AllowRotation = false; plotEx.Add(surfEx); sceneEx.First<ILPlotCube>().AspectRatioMode = AspectRatioMode.MaintainRatios; sceneEx.First<ILPlotCube>().Rotation = Matrix4.Rotation(new Vector3(0.1, 0, 0), ILMath.pi / 2); ilPanelEx.Scene.Add(sceneEx); ResultSeekerEx.ValueChanged += ResultSeekerEx_ValueChanged; var sceneEy = new ILScene(); plotEy = new ILPlotCube(twoDMode: false); sceneEy.Add(plotEy); var signalEy = ILMath.ones<float>(10, 10); ILSurface surfEy = new ILSurface(signalEy) { Wireframe = { Color = System.Drawing.Color.FromArgb(50, 60, 60, 60) }, Colormap = Colormaps.Jet, }; plotEy.Projection = Projection.Orthographic; plotEy.Position = new Vector3(1, 3, .5); //plotEy.AllowRotation = false; plotEy.Add(surfEy); sceneHy.First<ILPlotCube>().AspectRatioMode = AspectRatioMode.MaintainRatios; sceneHy.First<ILPlotCube>().Rotation = Matrix4.Rotation(new Vector3(0.1, 0, 0), ILMath.pi / 2); ilPanelEy.Scene.Add(sceneEy); ResultSeekerEy.ValueChanged += ResultSeekerEy_ValueChanged; }