/// <summary>コピーコンストラクタ。</summary> /// <param name="previous"></param> public SimulationRegionData(SimulationRegionData previous) { MinX = previous.MinX; MaxX = previous.MaxX; MinY = previous.MinY; MaxY = previous.MaxY; MinZ = previous.MinZ; MaxZ = previous.MaxZ; Dimension = previous.Dimension; PmlThickness = previous.PmlThickness; _Shapes = new List <VirtualRectangle>(); _Shapes.Add(new VirtualRectangle()); _Shapes[0].ShapeBorder = new Pen(Color.Green, 3); _Shapes[0].ShapeFill = Brushes.Transparent; _Shapes.Add(new VirtualRectangle()); _Shapes[1].ShapeBorder = new Pen(Brushes.Transparent, 0); _Shapes[1].ShapeFill = new SolidBrush(Color.FromArgb(64, 255, 255, 255)); _Shapes.Add(new VirtualRectangle()); _Shapes[2].ShapeBorder = _Shapes[1].ShapeBorder; _Shapes[2].ShapeFill = _Shapes[1].ShapeFill; _Shapes.Add(new VirtualRectangle()); _Shapes[3].ShapeBorder = _Shapes[1].ShapeBorder; _Shapes[3].ShapeFill = _Shapes[1].ShapeFill; _Shapes.Add(new VirtualRectangle()); _Shapes[4].ShapeBorder = _Shapes[1].ShapeBorder; _Shapes[4].ShapeFill = _Shapes[1].ShapeFill; }
/// <summary>コピーコンストラクタ。</summary> /// <param name="previous"></param> public ProjectManifestData(ProjectManifestData previous) { ManifestVisualizingLayer = new VirtualLayer(); _SimulationRegion = new SimulationRegionData(previous.SimulationRegion); SimulationTime = previous.SimulationTime; Resolution = previous.Resolution; _BackgroundMaterial = new MaterialData(previous.BackgroundMaterial); Sources = new ProjectList <SourceData>(); foreach (SourceData src in previous.Sources) { Sources.Add(src.MakeDeepCopy()); } FluxAnalyses = new ProjectList <FluxAnalysisData>(previous.FluxAnalyses); foreach (FluxAnalysisData flx in previous.FluxAnalyses) { FluxAnalyses.Add(new FluxAnalysisData(flx)); } VisualizationOutputs = new ProjectList <VisualizationOutputData>(previous.VisualizationOutputs); foreach (VisualizationOutputData vis in previous.VisualizationOutputs) { VisualizationOutputs.Add(new VisualizationOutputData(vis)); } ManifestVisualizingLayer.Shapes.AddRange(SimulationRegion.Shapes); SimulationRegion.Parent = this; BackgroundMaterial.Parent = this; }
/// <summary>デフォルトコンストラクタ。</summary> public ProjectManifestData() { ManifestVisualizingLayer = new VirtualLayer(); SimulationRegion = new SimulationRegionData(); SimulationTime = 0; Resolution = 10; BackgroundMaterial = new MaterialData(); Sources = new ProjectList <SourceData>(); FluxAnalyses = new ProjectList <FluxAnalysisData>(); VisualizationOutputs = new ProjectList <VisualizationOutputData>(); SimulationRegion.Parent = this; BackgroundMaterial.Parent = this; }
/// <summary>MeepのSourceを生成する。</summary> /// <returns></returns> public virtual List <MeepSource> MakeMeepSource() { if (!Enabled) { return(new List <MeepSource>()); } SimulationRegionData data = (Parent as ProjectManifestData).SimulationRegion; double xShift = (data.MinX + data.MaxX) / 2, yShift = (data.MinY + data.MaxY) / 2, zShift = (data.MinZ + data.MaxZ) / 2; Vector3 shift = new Vector3(xShift, yShift, zShift); MeepSource src = null; switch (Type) { case SourceType.Continuous: src = MeepSource.CreateContinuousSource(Component, Center - shift, Wavelength); src.Size = Size; src.StartTime = StartTime; src.EndTime = EndTime; src.Width = Width; src.Cutoff = Cutoff; break; case SourceType.Gaussian: src = MeepSource.CreateGaussianSource(Component, Center - shift, Wavelength, Width); src.Size = Size; src.StartTime = StartTime; src.EndTime = EndTime; src.Cutoff = Cutoff; break; } if (src != null) { return(new List <MeepSource>(new[] { src })); } else { return(new List <MeepSource>()); } }
/// <summary>コピーコンストラクタ。</summary> /// <param name="previous"></param> public ProjectManifestData(ProjectManifestData previous) { ManifestVisualizingLayer = new VirtualLayer(); _SimulationRegion = new SimulationRegionData( previous.SimulationRegion ); SimulationTime = previous.SimulationTime; Resolution = previous.Resolution; _BackgroundMaterial = new MaterialData( previous.BackgroundMaterial ); Sources = new ProjectList<SourceData>(); foreach( SourceData src in previous.Sources ) Sources.Add( src.MakeDeepCopy() ); FluxAnalyses = new ProjectList<FluxAnalysisData>( previous.FluxAnalyses ); foreach( FluxAnalysisData flx in previous.FluxAnalyses ) FluxAnalyses.Add( new FluxAnalysisData( flx ) ); VisualizationOutputs = new ProjectList<VisualizationOutputData>( previous.VisualizationOutputs ); foreach( VisualizationOutputData vis in previous.VisualizationOutputs ) VisualizationOutputs.Add( new VisualizationOutputData( vis ) ); ManifestVisualizingLayer.Shapes.AddRange( SimulationRegion.Shapes ); SimulationRegion.Parent = this; BackgroundMaterial.Parent = this; }
/// <summary>デフォルトコンストラクタ。</summary> public ProjectManifestData() { ManifestVisualizingLayer = new VirtualLayer(); SimulationRegion = new SimulationRegionData(); SimulationTime = 0; Resolution = 10; BackgroundMaterial = new MaterialData(); Sources = new ProjectList<SourceData>(); FluxAnalyses = new ProjectList<FluxAnalysisData>(); VisualizationOutputs = new ProjectList<VisualizationOutputData>(); SimulationRegion.Parent = this; BackgroundMaterial.Parent = this; }
/// <summary>コピーコンストラクタ。</summary> /// <param name="previous"></param> public SimulationRegionData(SimulationRegionData previous) { MinX = previous.MinX; MaxX = previous.MaxX; MinY = previous.MinY; MaxY = previous.MaxY; MinZ = previous.MinZ; MaxZ = previous.MaxZ; Dimension = previous.Dimension; PmlThickness = previous.PmlThickness; _Shapes = new List<VirtualRectangle>(); _Shapes.Add( new VirtualRectangle() ); _Shapes[0].ShapeBorder = new Pen( Color.Green, 3 ); _Shapes[0].ShapeFill = Brushes.Transparent; _Shapes.Add( new VirtualRectangle() ); _Shapes[1].ShapeBorder = new Pen( Brushes.Transparent, 0 ); _Shapes[1].ShapeFill = new SolidBrush( Color.FromArgb( 64, 255, 255, 255 ) ); _Shapes.Add( new VirtualRectangle() ); _Shapes[2].ShapeBorder = _Shapes[1].ShapeBorder; _Shapes[2].ShapeFill = _Shapes[1].ShapeFill; _Shapes.Add( new VirtualRectangle() ); _Shapes[3].ShapeBorder = _Shapes[1].ShapeBorder; _Shapes[3].ShapeFill = _Shapes[1].ShapeFill; _Shapes.Add( new VirtualRectangle() ); _Shapes[4].ShapeBorder = _Shapes[1].ShapeBorder; _Shapes[4].ShapeFill = _Shapes[1].ShapeFill; }