/** * Writes the value expressed as a {@code cartesian}, which is the position specified as a three-dimensional Cartesian value, {@code [X, Y, Z]}, in meters relative to the {@code referenceFrame}. * @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()); }
/** * Writes a value for the {@code position} property as a {@code cartesian} value. The {@code position} property specifies the position of the object in the world. The position has no direct visual representation, but it is used to locate billboards, labels, and other graphical items attached to the object. * @param value The value. */ public final void writePositionProperty(@Nonnull Cartesian value) { { cesiumlanguagewriter.PositionCesiumWriter writer = openPositionProperty(); try { writer.writeCartesian(value); } finally { DisposeHelper.dispose(writer); } } }
/** * Writes a value for the {@code position} property as a {@code cartesian} value. The {@code position} property specifies the position of the object in the world. The position has no direct visual representation, but it is used to locate billboards, labels, and other graphical items attached to the object. * @param dates The dates at which the value is specified. * @param values The values corresponding to each date. */ public final void writePositionProperty(List<JulianDate> dates, List<Cartesian> values) { { cesiumlanguagewriter.PositionCesiumWriter writer = openPositionProperty(); try { writer.writeCartesian(dates, values); } finally { DisposeHelper.dispose(writer); } } }
/** * Writes a value for the {@code position} property as a {@code cartesian} value. The {@code position} property specifies the position of the object in the world. The position has no direct visual representation, but it is used to locate billboards, labels, and other graphical items attached to the object. * @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 writePositionProperty(List<JulianDate> dates, List<Cartesian> values, int startIndex, int length) { { cesiumlanguagewriter.PositionCesiumWriter writer = openPositionProperty(); try { writer.writeCartesian(dates, values, startIndex, length); } finally { DisposeHelper.dispose(writer); } } }
dates.add(startDate.addSeconds(120.0)); positions.add(new Cartesian(7.0, 8.0, 9.0)); interval.writeCartesian(dates, positions, 1, 1); } finally { DisposeHelper.dispose(interval);
@Test public final void cartesianValueWritesEmptyArrayAndDoesNotWriteEpochWhenGivenAnEmptyCollection() { { final PacketCesiumWriter usingExpression_7 = (getPacket()); try { { PositionCesiumWriter position = getPacket().openPositionProperty(); try { { PositionCesiumWriter interval = position.openInterval(); try { ArrayList<cesiumlanguagewriter.JulianDate> dates = new ArrayList<cesiumlanguagewriter.JulianDate>(); ArrayList<cesiumlanguagewriter.Cartesian> positions = new ArrayList<cesiumlanguagewriter.Cartesian>(); interval.writeCartesian(dates, positions); } finally { DisposeHelper.dispose(interval); } } } finally { DisposeHelper.dispose(position); } } } finally { DisposeHelper.dispose(usingExpression_7); } } Assert.assertEquals("{\"position\":{\"cartesian\":[]}}", getStringWriter().toString()); }
dates.add(startDate.addSeconds(60.0)); positions.add(new Cartesian(4.4, 5.5, 6.6)); interval.writeCartesian(dates, positions); } finally { DisposeHelper.dispose(interval);
@Test public final void cartesianValueWritesSingleCartesianProperty() { { final PacketCesiumWriter usingExpression_1 = (getPacket()); try { { PositionCesiumWriter position = getPacket().openPositionProperty(); try { { PositionCesiumWriter interval = position.openInterval(); try { interval.writeCartesian(new Cartesian(1.0, 2.0, 3.0)); } finally { DisposeHelper.dispose(interval); } } } finally { DisposeHelper.dispose(position); } } } finally { DisposeHelper.dispose(usingExpression_1); } } Assert.assertEquals("{\"position\":{\"cartesian\":[1,2,3]}}", getStringWriter().toString()); }
try { interval.writeInterval(interval1); interval.writeCartesian(interval1Position); } finally { DisposeHelper.dispose(interval);