/// <summary> /// Sets the cone angles for the <see cref="PunctualLightType.Spot"/> light. /// </summary> /// <param name="light">This <see cref="PunctualLight"/> instance.</param> /// <param name="innerConeAngle"> /// Gets the Angle, in radians, from centre of spotlight where falloff begins. /// Must be greater than or equal to 0 and less than outerConeAngle. /// </param> /// <param name="outerConeAngle"> /// Gets Angle, in radians, from centre of spotlight where falloff ends. /// Must be greater than innerConeAngle and less than or equal to PI / 2.0. /// </param> /// <returns>This <see cref="PunctualLight"/> instance.</returns> public static PunctualLight WithSpotCone(this PunctualLight light, float innerConeAngle, float outerConeAngle) { Guard.NotNull(light, nameof(light)); light.SetSpotCone(innerConeAngle, outerConeAngle); return(light); }
/// <summary> /// Sets the cone angles for the <see cref="PunctualLightType.Spot"/> light. /// </summary> /// <param name="light">This <see cref="PunctualLight"/> instance.</param> /// <param name="innerConeAngle"> /// Gets the Angle, in radians, from centre of spotlight where falloff begins. /// Must be greater than or equal to 0 and less than outerConeAngle. /// </param> /// <param name="outerConeAngle"> /// Gets Angle, in radians, from centre of spotlight where falloff ends. /// Must be greater than innerConeAngle and less than or equal to PI / 2.0. /// </param> /// <returns>This <see cref="PunctualLight"/> instance.</returns> public static PunctualLight WithSpotCone(this PunctualLight light, float innerConeAngle, float outerConeAngle) { light.SetSpotCone(innerConeAngle, outerConeAngle); return(light); }