Exemple #1
0
        /// <summary>
        /// Writes the value expressed as a <c>cartesian2</c>, which is the background padding specified as a two-dimensional Cartesian value <c>[X, Y]</c>, in pixels, where X is the horizontal padding, and Y is the vertical padding.
        /// </summary>
        /// <param name="value">The value.</param>
        public void WriteCartesian2(Rectangular value)
        {
            const string PropertyName = Cartesian2PropertyName;

            OpenIntervalIfNecessary();
            Output.WritePropertyName(PropertyName);
            CesiumWritingHelper.WriteCartesian2(Output, value);
        }
        /// <summary>
        /// Writes the value expressed as a <c>cartesianVelocity</c>, which is the position and velocity specified as a three-dimensional Cartesian value and its derivative, <c>[X, Y, Z, dX, dY, dZ]</c>, in meters relative to the <c>referenceFrame</c>.
        /// </summary>
        /// <param name="value">The value.</param>
        public void WriteCartesianVelocity(Motion <Cartesian> value)
        {
            const string PropertyName = CartesianVelocityPropertyName;

            OpenIntervalIfNecessary();
            Output.WritePropertyName(PropertyName);
            CesiumWritingHelper.WriteCartesian3Velocity(Output, value);
        }
        /// <summary>
        /// Writes the <code>currentTime</code> property.  The <code>currentTime</code> property specifies the current time.
        /// </summary>
        /// <param name="value">The time.</param>
        public void WriteCurrentTime(JulianDate value)
        {
            const string PropertyName = CurrentTimePropertyName;

            OpenIntervalIfNecessary();
            Output.WritePropertyName(PropertyName);
            CesiumWritingHelper.WriteDate(Output, value);
        }
        /// <summary>
        /// Writes the value expressed as a <code>cartesian</code>, which is the list of positions specified as three-dimensional Cartesian values, `[X, Y, Z, X, Y, Z, ...]`, in meters relative to the `referenceFrame`.
        /// </summary>
        /// <param name="values">The values.</param>
        public void WriteCartesian(IEnumerable <Cartesian> values)
        {
            const string PropertyName = CartesianPropertyName;

            OpenIntervalIfNecessary();
            Output.WritePropertyName(PropertyName);
            CesiumWritingHelper.WriteCartesian3List(Output, values);
        }
        /// <summary>
        /// Writes the value expressed as a <c>cartographicDegrees</c>, which is the position specified in Cartographic WGS84 coordinates, <c>[Longitude, Latitude, Height]</c>, where Longitude and Latitude are in degrees and Height is in meters.
        /// </summary>
        /// <param name="value">The interval.</param>
        public void WriteCartographicDegrees(Cartographic value)
        {
            const string PropertyName = CartographicDegreesPropertyName;

            OpenIntervalIfNecessary();
            Output.WritePropertyName(PropertyName);
            CesiumWritingHelper.WriteCartographic(Output, value);
        }
Exemple #6
0
        /// <summary>
        /// Writes the value expressed as a <c>reference</c>, which is the thickness specified as a reference to another property.
        /// </summary>
        /// <param name="value">The reference.</param>
        public void WriteReference(Reference value)
        {
            const string PropertyName = ReferencePropertyName;

            OpenIntervalIfNecessary();
            Output.WritePropertyName(PropertyName);
            CesiumWritingHelper.WriteReference(Output, value);
        }
Exemple #7
0
        /// <summary>
        /// Writes the value expressed as a <c>wsen</c>, which is the set of coordinates specified as Cartographic values <c>[WestLongitude, SouthLatitude, EastLongitude, NorthLatitude]</c>, with values in radians.
        /// </summary>
        /// <param name="value">The value.</param>
        public void WriteWsen(CartographicExtent value)
        {
            const string PropertyName = WsenPropertyName;

            OpenIntervalIfNecessary();
            Output.WritePropertyName(PropertyName);
            CesiumWritingHelper.WriteCartographicExtent(Output, value);
        }
Exemple #8
0
        /// <summary>
        /// Writes the value expressed as a <code>rgba</code>, which is the color specified as an array of color components `[Red, Green, Blue, Alpha]` where each component is an integer in the range 0-255.
        /// </summary>
        /// <param name="color">The color.</param>
        public void WriteRgba(Color color)
        {
            const string PropertyName = RgbaPropertyName;

            OpenIntervalIfNecessary();
            Output.WritePropertyName(PropertyName);
            CesiumWritingHelper.WriteRgba(Output, color);
        }
Exemple #9
0
        /// <summary>
        /// Writes the value expressed as a <code>rgba</code>, which is the color specified as an array of color components `[Red, Green, Blue, Alpha]` where each component is an integer in the range 0-255.
        /// </summary>
        /// <param name="red">The red component in the range 0 to 255.</param>
        /// <param name="green">The green component in the range 0 to 255.</param>
        /// <param name="blue">The blue component in the range 0 to 255.</param>
        /// <param name="alpha">The alpha component in the range 0 to 255.</param>
        public void WriteRgba(int red, int green, int blue, int alpha)
        {
            const string PropertyName = RgbaPropertyName;

            OpenIntervalIfNecessary();
            Output.WritePropertyName(PropertyName);
            CesiumWritingHelper.WriteRgba(Output, red, green, blue, alpha);
        }
Exemple #10
0
        /// <summary>
        /// Writes the value expressed as a <c>unitQuaternion</c>, which is the rotation specified as a 4-dimensional unit magnitude quaternion, specified as <c>[X, Y, Z, W]</c>.
        /// </summary>
        /// <param name="value">The value.</param>
        public void WriteUnitQuaternion(UnitQuaternion value)
        {
            const string PropertyName = UnitQuaternionPropertyName;

            OpenIntervalIfNecessary();
            Output.WritePropertyName(PropertyName);
            CesiumWritingHelper.WriteUnitQuaternion(Output, value);
        }
Exemple #11
0
        /// <summary>
        /// Writes the value expressed as a <code>nearFarScalar</code>, which is the value specified as four values `[NearDistance, NearValue, FarDistance, FarValue]`, with distances in eye coordinates in meters.
        /// </summary>
        /// <param name="value">The value.</param>
        public void WriteNearFarScalar(NearFarScalar value)
        {
            const string PropertyName = NearFarScalarPropertyName;

            OpenIntervalIfNecessary();
            Output.WritePropertyName(PropertyName);
            CesiumWritingHelper.WriteNearFarScalar(Output, value);
        }
Exemple #12
0
        /// <summary>
        /// Writes the value expressed as a <code>array</code>, which is the list of values specified as an array of numbers.
        /// </summary>
        /// <param name="values">The values.</param>
        public void WriteArray(IEnumerable <double> values)
        {
            const string PropertyName = ArrayPropertyName;

            OpenIntervalIfNecessary();
            Output.WritePropertyName(PropertyName);
            CesiumWritingHelper.WriteDoubleList(Output, values);
        }
        /// <summary>
        /// Writes the value expressed as a <c>unitSpherical</c>, which is the axis specified as a unit spherical value <c>[Clock, Cone]</c>, in radians. The clock angle is measured in the XY plane from the positive X axis toward the positive Y axis. The cone angle is the angle from the positive Z axis toward the negative Z axis.
        /// </summary>
        /// <param name="value">The value.</param>
        public void WriteUnitSpherical(UnitSpherical value)
        {
            const string PropertyName = UnitSphericalPropertyName;

            OpenIntervalIfNecessary();
            Output.WritePropertyName(PropertyName);
            CesiumWritingHelper.WriteUnitSpherical(Output, value);
        }
Exemple #14
0
        /// <summary>
        /// Writes the value expressed as a <c>distanceDisplayCondition</c>, which is the value specified as two values <c>[NearDistance, FarDistance]</c>, with distances in meters.
        /// </summary>
        /// <param name="value">The value.</param>
        public void WriteDistanceDisplayCondition(Bounds value)
        {
            const string PropertyName = DistanceDisplayConditionPropertyName;

            OpenIntervalIfNecessary();
            Output.WritePropertyName(PropertyName);
            CesiumWritingHelper.WriteBounds(Output, value);
        }
Exemple #15
0
        /// <summary>
        /// Writes the value expressed as a <c>reference</c>, which is the bounding rectangle specified as a reference to another property.
        /// </summary>
        /// <param name="identifier">The identifier of the object which contains the referenced property.</param>
        /// <param name="propertyNames">The hierarchy of properties to be indexed on the referenced object.</param>
        public void WriteReference(string identifier, string[] propertyNames)
        {
            const string PropertyName = ReferencePropertyName;

            OpenIntervalIfNecessary();
            Output.WritePropertyName(PropertyName);
            CesiumWritingHelper.WriteReference(Output, identifier, propertyNames);
        }
        /// <summary>
        /// Writes the value expressed as a <code>cartographicDegrees</code>, which is the list of positions specified in Cartographic WGS84 coordinates, `[Longitude, Latitude, Height, Longitude, Latitude, Height, ...]`, where Longitude and Latitude are in degrees and Height is in meters.
        /// </summary>
        /// <param name="values">The values.</param>
        public void WriteCartographicDegrees(IEnumerable <Cartographic> values)
        {
            const string PropertyName = CartographicDegreesPropertyName;

            OpenIntervalIfNecessary();
            Output.WritePropertyName(PropertyName);
            CesiumWritingHelper.WriteCartographicList(Output, values);
        }
Exemple #17
0
        /// <summary>
        /// Writes the value expressed as a <c>boundingRectangle</c>, which is the bounding rectangle specified as <c>[X, Y, Width, Height]</c>.
        /// </summary>
        /// <param name="value">The value.</param>
        public void WriteBoundingRectangle(BoundingRectangle value)
        {
            const string PropertyName = BoundingRectanglePropertyName;

            OpenIntervalIfNecessary();
            Output.WritePropertyName(PropertyName);
            CesiumWritingHelper.WriteBoundingRectangle(Output, value);
        }
        /// <summary>
        /// Writes the value expressed as a <code>references</code>, which is the list of positions specified as references.  Each reference is to a property that defines a single position, which may change with time.
        /// </summary>
        /// <param name="references">The list of references.</param>
        public void WriteReferences(IEnumerable <Reference> references)
        {
            const string PropertyName = ReferencesPropertyName;

            OpenIntervalIfNecessary();
            Output.WritePropertyName(PropertyName);
            CesiumWritingHelper.WriteReferences(Output, references);
        }
        /// <summary>
        /// Writes the value expressed as a <c>unitSpherical</c>, which is the list of directions specified as unit spherical values <c>[Clock, Cone, Clock, Cone, ...]</c>, in radians.  The clock angle is measured in the XY plane from the positive X axis toward the positive Y axis.  The cone angle is the angle from the positive Z axis toward the negative Z axis.
        /// </summary>
        /// <param name="values">The values.</param>
        public void WriteUnitSpherical(IEnumerable <UnitSpherical> values)
        {
            const string PropertyName = UnitSphericalPropertyName;

            OpenIntervalIfNecessary();
            Output.WritePropertyName(PropertyName);
            CesiumWritingHelper.WriteUnitSphericalList(Output, values);
        }
 public void CanWriteReference()
 {
     CesiumWritingHelper.WriteReference(m_outputStream, new Reference("bar", "color"));
     Assert.AreEqual("\"bar#color\"", m_stringWriter.ToString());
 }
Exemple #21
0
 public void CanWriteReferences()
 {
     CesiumWritingHelper.WriteReferences(m_outputStream, new[] { new Reference("bar", "color"), new Reference("foo", "color2") });
     Assert.AreEqual("[\"bar#color\",\"foo#color2\"]", m_stringWriter.ToString());
 }