예제 #1
0
    /// <inheritdoc/>
    protected override void CloneCore(Light source)
    {
      // Clone Light properties.
      base.CloneCore(source);
      Shape = source.Shape.Clone();

      // Clone EnvironmentLight properties.
      var sourceTyped = (EnvironmentLight)source;
      Color = sourceTyped.Color;
      DiffuseIntensity = sourceTyped.DiffuseIntensity;
      SpecularIntensity = sourceTyped.SpecularIntensity;
      HdrScale = sourceTyped.HdrScale;
      EnvironmentMap = sourceTyped.EnvironmentMap;
    }
예제 #2
0
파일: Light.cs 프로젝트: Zolniu/DigitalRune
        protected virtual void CloneCore(Light source)
        {
            Name = source.Name;

              // Shape does not need to be cloned. It is managed automatically in derived classes.
        }
예제 #3
0
        /// <inheritdoc/>
        protected override void CloneCore(Light source)
        {
            // Clone Light properties.
              base.CloneCore(source);

              // Clone ProjectorLight properties.
              var sourceTyped = (ProjectorLight)source;
              Color = sourceTyped.Color;
              DiffuseIntensity = sourceTyped.DiffuseIntensity;
              SpecularIntensity = sourceTyped.SpecularIntensity;
              HdrScale = sourceTyped.HdrScale;
              Texture = sourceTyped.Texture;
              Attenuation = sourceTyped.Attenuation;

              // Shape does not need to be cloned. It is automatically set by the Projection property.
        }
예제 #4
0
        protected override void CloneCore(Light source)
        {
            // Clone Light properties.
              base.CloneCore(source);

              // Clone DirectionalLight properties.
              var sourceTyped = (DirectionalLight)source;
              Color = sourceTyped.Color;
              DiffuseIntensity = sourceTyped.DiffuseIntensity;
              SpecularIntensity = sourceTyped.SpecularIntensity;
              HdrScale = sourceTyped.HdrScale;
              Texture = sourceTyped.Texture;
              TextureOffset = sourceTyped.TextureOffset;
              TextureScale = sourceTyped.TextureScale;
              Shape = source.Shape.Clone();
        }
예제 #5
0
        /// <inheritdoc/>
        protected override void CloneCore(Light source)
        {
            // Clone Light properties.
              base.CloneCore(source);

              // Clone ImageBasedLight properties.
              var sourceTyped = (ImageBasedLight)source;
              Color = sourceTyped.Color;
              DiffuseIntensity = sourceTyped.DiffuseIntensity;
              SpecularIntensity = sourceTyped.SpecularIntensity;
              HdrScale = sourceTyped.HdrScale;
              Shape = sourceTyped.Shape.Clone();
              Texture = sourceTyped.Texture;
              Encoding = sourceTyped.Encoding;
              BlendMode = sourceTyped.BlendMode;
              FalloffRange = sourceTyped.FalloffRange;
              EnableLocalizedReflection = sourceTyped.EnableLocalizedReflection;
              LocalizedReflectionBox = sourceTyped.LocalizedReflectionBox;
        }
예제 #6
0
        /// <inheritdoc/>
        protected override void CloneCore(Light source)
        {
            // Clone Light properties.
              base.CloneCore(source);

              // Clone PointLight properties.
              var sourceTyped = (PointLight)source;
              Color = sourceTyped.Color;
              DiffuseIntensity = sourceTyped.DiffuseIntensity;
              SpecularIntensity = sourceTyped.SpecularIntensity;
              HdrScale = sourceTyped.HdrScale;
              Range = sourceTyped.Range;
              Attenuation = sourceTyped.Attenuation;
              Texture = sourceTyped.Texture;

              // Shape does not need to be cloned. It is automatically set in the constructor and
              // adjusted when the related properties change.
        }
예제 #7
0
        protected override void CloneCore(Light source)
        {
            // Clone Light properties.
              base.CloneCore(source);

              // Clone AmbientLight properties.
              var sourceTyped = (AmbientLight)source;
              Color = sourceTyped.Color;
              Intensity = sourceTyped.Intensity;
              HdrScale = sourceTyped.HdrScale;
              HemisphericAttenuation = sourceTyped.HemisphericAttenuation;
              Shape = source.Shape.Clone();
        }