Exemplo n.º 1
0
 /// <summary>
 /// Writes a value for the <c>shadows</c> property as a <c>shadowMode</c> value.  The <c>shadows</c> property specifies whether or not the box casts or receives shadows.  If not specified, the default value is DISABLED.
 /// </summary>
 /// <param name="value">The shadow mode.</param>
 public void WriteShadowsProperty(CesiumShadowMode value)
 {
     using (var writer = OpenShadowsProperty())
     {
         writer.WriteShadowMode(value);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Writes the value expressed as a <c>shadowMode</c>, which is the shadow mode.
        /// </summary>
        /// <param name="value">The shadow mode.</param>
        public void WriteShadowMode(CesiumShadowMode value)
        {
            const string PropertyName = ShadowModePropertyName;

            if (ForceInterval)
            {
                OpenIntervalIfNecessary();
            }
            if (IsInterval)
            {
                Output.WritePropertyName(PropertyName);
            }
            Output.WriteValue(CesiumFormattingHelper.ShadowModeToString(value));
        }
Exemplo n.º 3
0
        /// <summary>
        /// Converts a <see cref="CesiumShadowMode"/> to the corresponding string in a CZML stream.
        /// </summary>
        /// <param name="value">The value to convert.</param>
        /// <returns>The string representing the specified value.</returns>
        public static string ShadowModeToString(CesiumShadowMode value)
        {
            switch (value)
            {
            case CesiumShadowMode.Disabled:
                return("DISABLED");

            case CesiumShadowMode.Enabled:
                return("ENABLED");

            case CesiumShadowMode.CastOnly:
                return("CAST_ONLY");

            case CesiumShadowMode.ReceiveOnly:
                return("RECEIVE_ONLY");

            default:
                throw new ArgumentException(CesiumLocalization.UnknownEnumerationValue, "value");
            }
        }
        public void TestShadowModeToString(CesiumShadowMode value)
        {
            string s = CesiumFormattingHelper.ShadowModeToString(value);

            Assert.IsNotNull(s);
        }
 /// <summary>
 /// Converts a <see cref="CesiumShadowMode"/> to the corresponding string in a CZML stream.
 /// </summary>
 /// <param name="value">The value to convert.</param>
 /// <returns>The string representing the specified value.</returns>
 public static string ShadowModeToString(CesiumShadowMode value)
 {
     switch (value)
     {
         case CesiumShadowMode.Disabled:
             return "DISABLED";
         case CesiumShadowMode.Enabled:
             return "ENABLED";
         case CesiumShadowMode.CastOnly:
             return "CAST_ONLY";
         case CesiumShadowMode.ReceiveOnly:
             return "RECEIVE_ONLY";
         default:
             throw new ArgumentException(CesiumLocalization.UnknownEnumerationValue, "value");
     }
 }