RhinoCyclesCore.CyclesTextureImage.Clear C# (CSharp) Method

Clear() public method

public Clear ( ) : void
return void
        public void Clear()
        {
            Transform = ccl.Transform.Identity();
            TexByte = null;
            TexFloat = null;
            TexWidth = 0;
            TexHeight = 0;
            Name = "";
            UseAlpha = false;
            Amount = 0.0f;
        }

Usage Example

        /// <summary>
        /// Read texture data and bg color from environments
        /// </summary>
        public void HandleEnvironments(RenderEnvironment.Usage usage)
        {
            SimulatedEnvironment simenv;

            switch (usage)
            {
            case RenderEnvironment.Usage.Background:

                if (background_environment != null)
                {
                    simenv = background_environment.SimulateEnvironment(true);
                    if (simenv != null)
                    {
                        bg_color = simenv.BackgroundColor;
                    }
                }
                else
                {
                    bg_color = Color.Empty;
                    bg.Clear();
                }
                BitmapConverter.EnvironmentBitmapFromEvaluator(background_environment, bg, Gamma, PlanarProjection);
                break;

            case RenderEnvironment.Usage.Skylighting:
                bool resampled = false;
                if (skylight_environment != null)
                {
                    simenv = skylight_environment.SimulateEnvironment(true);
                    if (simenv != null)
                    {
                        sky_color = simenv.BackgroundColor;
                    }
                }
                else
                {
                    sky_color = Color.Empty;
                    sky.Clear();
                }
                if (!resampled)
                {
                    BitmapConverter.EnvironmentBitmapFromEvaluator(skylight_environment, sky, Gamma, false);
                }

                break;

            case RenderEnvironment.Usage.ReflectionAndRefraction:
                if (reflection_environment != null)
                {
                    simenv = reflection_environment.SimulateEnvironment(true);
                    if (simenv != null)
                    {
                        refl_color = simenv.BackgroundColor;
                    }
                }
                else
                {
                    refl_color = Color.Empty;
                    refl.Clear();
                }
                BitmapConverter.EnvironmentBitmapFromEvaluator(reflection_environment, refl, Gamma, false);
                break;
            }
        }
All Usage Examples Of RhinoCyclesCore.CyclesTextureImage::Clear
CyclesTextureImage