/// <summary> /// Gets a new instance of <see cref="LightSettings"/> with the provided value for <see cref="AmbientLight"/>. /// </summary> /// <param name="ambientLight">The new value for <see cref="LightSettings"/>.</param> /// <returns>New instance of <see cref="LightSettings"/> with the provided value for <see cref="AmbientLight"/></returns> /// <exception cref="ArgumentNullException"></exception> public LightSettings WithAmbientLight(HemisphericAmbientLight ambientLight) { if (null == ambientLight) { throw new ArgumentNullException(nameof(ambientLight)); } var result = (LightSettings)MemberwiseClone(); result._ambientLight = ambientLight; result.CalculateIsAnyAffixedToCamera(); return(result); }
/// <summary> /// Initializes a new instance of the <see cref="LightSettings"/> class with default values. /// </summary> public LightSettings() { _ambientLight = new HemisphericAmbientLight(0.8, NamedColors.LightGray, NamedColors.White, new VectorD3D(0, 0, 1), false); _discreteLight0 = new DirectionalLight(0.2, NamedColors.White, new VectorD3D(-0.5, -0.5, Math.Sqrt(0.5)), false); }
/// <summary> /// Gets a new instance of <see cref="LightSettings"/> with the provided value for <see cref="AmbientLight"/>. /// </summary> /// <param name="ambientLight">The new value for <see cref="LightSettings"/>.</param> /// <returns>New instance of <see cref="LightSettings"/> with the provided value for <see cref="AmbientLight"/></returns> /// <exception cref="ArgumentNullException"></exception> public LightSettings WithAmbientLight(HemisphericAmbientLight ambientLight) { if (null == ambientLight) throw new ArgumentNullException(nameof(ambientLight)); var result = (LightSettings)this.MemberwiseClone(); result._ambientLight = ambientLight; result.CalculateIsAnyAffixedToCamera(); return result; }