internal PunctualLight(PunctualLightType ltype) { _type = ltype.ToString().ToLowerInvariant(); if (ltype == PunctualLightType.Spot) { _spot = new PunctualLightSpot(); } }
public PunctualLight CreateLight(string name, PunctualLightType ltype) { var light = new PunctualLight(ltype); light.Name = name; _lights.Add(light); return(light); }
internal PunctualLight(PunctualLightType ltype) { #pragma warning disable CA1308 // Normalize strings to uppercase _type = ltype.ToString().ToLowerInvariant(); #pragma warning restore CA1308 // Normalize strings to uppercase if (ltype == PunctualLightType.Spot) { _spot = new PunctualLightSpot(); } }
/// <summary> /// Creates a new <see cref="PunctualLight"/> instance. /// and adds it to <see cref="ModelRoot.LogicalPunctualLights"/>. /// </summary> /// <param name="name">The name of the instance.</param> /// <param name="lightType">A value of <see cref="PunctualLightType"/> describing the type of light to create.</param> /// <returns>A <see cref="PunctualLight"/> instance.</returns> public PunctualLight CreatePunctualLight(string name, PunctualLightType lightType) { return(UseExtension <_ModelPunctualLights>().CreateLight(name, lightType)); }
/// <summary> /// Creates a new <see cref="PunctualLight"/> instance and /// adds it to <see cref="ModelRoot.LogicalPunctualLights"/>. /// </summary> /// <param name="lightType">A value of <see cref="PunctualLightType"/> describing the type of light to create.</param> /// <returns>A <see cref="PunctualLight"/> instance.</returns> public PunctualLight CreatePunctualLight(PunctualLightType lightType) { return(CreatePunctualLight(null, lightType)); }