/** * Writes the value expressed as a {@code cartesian}, which is the property specified as a three-dimensional Cartesian value {@code [X, Y, Z]}. * @param dates The dates at which the value is specified. * @param values The values corresponding to each date. */ public final void writeCartesian(List<JulianDate> dates, List<Cartesian> values) { writeCartesian(dates, values, 0, dates.size()); }
/** * Gets a new writer for a {@code CustomProperty} property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. A {@code CustomProperty} property defines a custom property. */ public final CustomPropertyCesiumWriter getCustomPropertyWriter(String name) { return new CustomPropertyCesiumWriter(name); }
/** * Writes the value expressed as a {@code boolean}, which is the property specified as a boolean value. * @param value The value. */ public final void writeBoolean(boolean value) { final String PropertyName = BooleanPropertyName; if (getForceInterval()) { openIntervalIfNecessary(); } if (getIsInterval()) { getOutput().writePropertyName(PropertyName); } getOutput().writeValue(value); }
/** * Writes the value expressed as a {@code unitCartesian}, which is the property specified as a three-dimensional unit magnitude Cartesian value {@code [X, Y, Z]}. * @param dates The dates at which the value is specified. * @param values The values corresponding to each date. * @param startIndex The index of the first element to write. * @param length The number of elements to write. */ public final void writeUnitCartesian(List<JulianDate> dates, List<UnitCartesian> values, int startIndex, int length) { final String PropertyName = UnitCartesianPropertyName; openIntervalIfNecessary(); CesiumWritingHelper.writeUnitCartesian3(getOutput(), PropertyName, dates, values, startIndex, length); }
.openMultipleIntervals(); try { intervalWriter.writeBoolean(true); } finally { DisposeHelper.dispose(intervalWriter); .addSeconds(2D)); try { intervalWriter.writeBoolean(false); } finally { DisposeHelper.dispose(intervalWriter); intervalWriter.writeBoolean(true); } finally { DisposeHelper.dispose(intervalWriter); dates.add(m_startDate.addSeconds(120.0)); values.add(new Cartesian(7.0, 8.0, 9.0)); customPropertyWriter.writeCartesian(dates, values); } finally { DisposeHelper.dispose(customPropertyWriter);
customPropertyWriter.writeInterpolationAlgorithm(CesiumInterpolationAlgorithm.HERMITE); ArrayList<cesiumlanguagewriter.JulianDate> dates = new ArrayList<cesiumlanguagewriter.JulianDate>(); ArrayList<cesiumlanguagewriter.Cartesian> values = new ArrayList<cesiumlanguagewriter.Cartesian>(); dates.add(m_startDate.addSeconds(120.0)); values.add(new Cartesian(7.0, 8.0, 9.0)); customPropertyWriter.writeCartesian(dates, values); } finally { DisposeHelper.dispose(customPropertyWriter);
customPropertyWriter.writeBoolean(true); } finally { DisposeHelper.dispose(customPropertyWriter); customPropertyWriter.writeCartesian(new Cartesian(1D, 2D, 3D)); } finally { DisposeHelper.dispose(customPropertyWriter);
try { cesiumlanguagewriter.CustomPropertyCesiumWriter intervalWriter = customPropertyWriter.openInterval(m_startDate, m_stopDate); try { intervalWriter.writeBoolean(true); } finally { DisposeHelper.dispose(intervalWriter);
/** * Writes the value expressed as a {@code boundingRectangle}, which is the property specified as {@code [X, Y, Width, Height]}. * @param dates The dates at which the value is specified. * @param values The values corresponding to each date. */ public final void writeBoundingRectangle(List<JulianDate> dates, List<BoundingRectangle> values) { writeBoundingRectangle(dates, values, 0, dates.size()); }
@Test public final void customPropertyBooleanConstant() { { final PacketCesiumWriter usingExpression_0 = (getPacket()); try { { cesiumlanguagewriter.CustomPropertiesCesiumWriter customPropertiesWriter = getPacket().openPropertiesProperty(); try { { cesiumlanguagewriter.CustomPropertyCesiumWriter customPropertyWriter = customPropertiesWriter.openCustomPropertyProperty("custom_property"); try { customPropertyWriter.writeBoolean(true); } finally { DisposeHelper.dispose(customPropertyWriter); } } } finally { DisposeHelper.dispose(customPropertiesWriter); } } } finally { DisposeHelper.dispose(usingExpression_0); } } Assert.assertEquals("{\"properties\":{\"custom_property\":true}}", getStringWriter().toString()); }
/** * Writes the value expressed as a {@code wsenDegrees}, which is the property specified as a Cartographic rectangle {@code [WestLongitude, SouthLatitude, EastLongitude, NorthLatitude]}, with values in degrees. * @param dates The dates at which the value is specified. * @param values The values corresponding to each date. * @param startIndex The index of the first element to write. * @param length The number of elements to write. */ public final void writeWsenDegrees(List<JulianDate> dates, List<CartographicExtent> values, int startIndex, int length) { final String PropertyName = WsenDegreesPropertyName; openIntervalIfNecessary(); CesiumWritingHelper.writeCartographicExtent(getOutput(), PropertyName, dates, values, startIndex, length); }
/** * Writes the value expressed as a {@code boundingRectangle}, which is the property specified as {@code [X, Y, Width, Height]}. * @param dates The dates at which the value is specified. * @param values The values corresponding to each date. * @param startIndex The index of the first element to write. * @param length The number of elements to write. */ public final void writeBoundingRectangle(List<JulianDate> dates, List<BoundingRectangle> values, int startIndex, int length) { final String PropertyName = BoundingRectanglePropertyName; openIntervalIfNecessary(); CesiumWritingHelper.writeBoundingRectangle(getOutput(), PropertyName, dates, values, startIndex, length); }
dates.add(m_startDate.addSeconds(120.0)); values.add(new Cartesian(7.0, 8.0, 9.0)); customPropertyWriter.writeCartesian(dates, values); } finally { DisposeHelper.dispose(customPropertyWriter);
/** * Copies this instance and returns the copy. * @return The copy. */ @Override public CustomPropertyCesiumWriter clone() { return new CustomPropertyCesiumWriter(this); }
/** * Writes the value expressed as a {@code wsen}, which is the property specified as a Cartographic rectangle {@code [WestLongitude, SouthLatitude, EastLongitude, NorthLatitude]}, with values in radians. * @param dates The dates at which the value is specified. * @param values The values corresponding to each date. * @param startIndex The index of the first element to write. * @param length The number of elements to write. */ public final void writeWsen(List<JulianDate> dates, List<CartographicExtent> values, int startIndex, int length) { final String PropertyName = WsenPropertyName; openIntervalIfNecessary(); CesiumWritingHelper.writeCartographicExtent(getOutput(), PropertyName, dates, values, startIndex, length); }
@Test public final void customPropertyCartesianConstant() { { final PacketCesiumWriter usingExpression_2 = (getPacket()); try { { cesiumlanguagewriter.CustomPropertiesCesiumWriter customPropertiesWriter = getPacket().openPropertiesProperty(); try { { cesiumlanguagewriter.CustomPropertyCesiumWriter customPropertyWriter = customPropertiesWriter.openCustomPropertyProperty("custom_property"); try { customPropertyWriter.writeCartesian(new Cartesian(1D, 2D, 3D)); } finally { DisposeHelper.dispose(customPropertyWriter); } } } finally { DisposeHelper.dispose(customPropertiesWriter); } } } finally { DisposeHelper.dispose(usingExpression_2); } } Assert.assertEquals("{\"properties\":{\"custom_property\":{\"cartesian\":[1,2,3]}}}", getStringWriter().toString()); }
/** * Opens and returns a new writer for a {@code CustomProperty} property. A {@code CustomProperty} property defines a custom property. * @param name The name of the new property writer. */ public final CustomPropertyCesiumWriter openCustomPropertyProperty(String name) { openIntervalIfNecessary(); return this.<CustomPropertyCesiumWriter> openAndReturn(new CustomPropertyCesiumWriter(name)); } }
/** * Writes the value expressed as a {@code cartesian2}, which is the property specified as a two-dimensional Cartesian value {@code [X, Y]}. * @param dates The dates at which the value is specified. * @param values The values corresponding to each date. * @param startIndex The index of the first element to write. * @param length The number of elements to write. */ public final void writeCartesian2(List<JulianDate> dates, List<Rectangular> values, int startIndex, int length) { final String PropertyName = Cartesian2PropertyName; openIntervalIfNecessary(); CesiumWritingHelper.writeCartesian2(getOutput(), PropertyName, dates, values, startIndex, length); }
/** * Writes the value expressed as a {@code unitSpherical}, which is the property specified as a unit spherical value {@code [Clock, Cone]}. 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. * @param dates The dates at which the value is specified. * @param values The values corresponding to each date. * @param startIndex The index of the first element to write. * @param length The number of elements to write. */ public final void writeUnitSpherical(List<JulianDate> dates, List<UnitSpherical> values, int startIndex, int length) { final String PropertyName = UnitSphericalPropertyName; openIntervalIfNecessary(); CesiumWritingHelper.writeUnitSpherical(getOutput(), PropertyName, dates, values, startIndex, length); }
/** * Writes the value expressed as a {@code rgbaf}, which is the property specified as an array of color components {@code [Red, Green, Blue, Alpha]} where each component is a double in the range 0.0-1.0. * @param dates The dates at which the value is specified. * @param colors The color corresponding to each date. * @param startIndex The index of the first element to write. * @param length The number of elements to write. */ public final void writeRgbaf(List<JulianDate> dates, List<Color> colors, int startIndex, int length) { final String PropertyName = RgbafPropertyName; openIntervalIfNecessary(); CesiumWritingHelper.writeRgbaf(getOutput(), PropertyName, dates, colors, startIndex, length); }