/// <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; }
protected virtual void CloneCore(Light source) { Name = source.Name; // Shape does not need to be cloned. It is managed automatically in derived classes. }
/// <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. }
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(); }
/// <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; }
/// <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. }
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(); }