Exemple #1
0
        private void RemoveColorMapLayer(VisualizationDataSource dataSource)
        {
            ColorMapLayer colorMapLayer = colorMapLayers.Find(cml => cml.Guid == dataSource.Guid);

            if (colorMapLayer != null)
            {
                if (colorMapLayer.IsVisible)
                {
                    host.DataSources.Remove(colorMapLayer.LayerName, colorMapLayer.LayerID);
                }
                colorMapLayers.Remove(colorMapLayer);
            }
        }
Exemple #2
0
        private void AddLayerToHost(ColorMapLayer colorMapLayer)
        {
            ColorMapDataSource cmds;

            if (colorMapLayer.Field is NonUniformDataSource2D <double> )
            {
                cmds = new ColorMapDataSource(colorMapLayer.Field as NonUniformDataSource2D <double>, this.host, colorMapLayer.MinT, colorMapLayer.MaxT);
            }
            else
            {
                cmds = new ColorMapDataSource(colorMapLayer.Field as WarpedDataSource2D <double>, this.host, colorMapLayer.MinT, colorMapLayer.MaxT);
            }
            host.DataSources.Add(new DataSourceLayerData(colorMapLayer.LayerName, colorMapLayer.LayerID, cmds, DataSourceUsage.TextureMap, 101, colorMapLayer.LayerOpacity));
        }
        private void AddLayerToHost(ColorMapLayer colorMapLayer)
        {
            ColorMapDataSource cmds;
            if (colorMapLayer.Field is NonUniformDataSource2D<double>)
            {
                cmds = new ColorMapDataSource(colorMapLayer.Field as NonUniformDataSource2D<double>, this.host, colorMapLayer.MinT, colorMapLayer.MaxT);
            }
            else
            {
                cmds = new ColorMapDataSource(colorMapLayer.Field as WarpedDataSource2D<double>, this.host, colorMapLayer.MinT, colorMapLayer.MaxT);
            }
            host.DataSources.Add(new DataSourceLayerData(colorMapLayer.LayerName, colorMapLayer.LayerID, cmds, DataSourceUsage.TextureMap, 101, colorMapLayer.LayerOpacity));

        }