示例#1
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="layer"></param>
        public void Remove(CloudLayer layer)
        {
            if(!layers.Contains(layer))
            {
                throw new ArgumentException("Layer not found into list.");
            }

            CloudsManager_Remove(NativeHandle, layer.NativeHandle);
            layers.Remove(layer);
        }
示例#2
0
        /// <summary>
        /// 
        /// </summary>
        public CloudLayer Add(CloudLayer.LayerOptions options)
        {
            if (options == null)
                throw new ArgumentNullException("options");

            IntPtr handle = CloudsManager_Add(NativeHandle, options.Height, options.Scale, options.WindDirection, options.TimeMultiplier,
                                             options.DistanceAttenuation, options.DetailAttenuation, options.NormalMultiplier, options.HeightVolume, options.VolumetricDisplacement);

            if (handle == IntPtr.Zero)
            {
                LogManager.Singleton.LogMessage("Error adding new CloudLayer");
            }

            CloudLayer result = new CloudLayer(handle, options);
            layers.Add(result);

            return result;
        }
示例#3
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="layer"></param>
        public void Unregister(CloudLayer layer)
        {
            if (!layers.Contains(layer))
            {
                throw new ArgumentException("Layer not found into list.");
            }

            CloudsManager_Unregister(NativeHandle, layer.NativeHandle);
        }