/** * Writes a value for the {@code position} property as a {@code cartographicDegrees} 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 interval. */ public final void writePositionPropertyCartographicDegrees(@Nonnull Cartographic value) { { cesiumlanguagewriter.PositionCesiumWriter writer = openPositionProperty(); try { writer.writeCartographicDegrees(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 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 cartographicRadians} 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 interval. */ public final void writePositionPropertyCartographicRadians(@Nonnull Cartographic value) { { cesiumlanguagewriter.PositionCesiumWriter writer = openPositionProperty(); try { writer.writeCartographicRadians(value); } finally { DisposeHelper.dispose(writer); } } }
/** * Writes a value for the {@code position} property as a {@code cartesianVelocity} 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 writePositionPropertyCartesianVelocity(@Nonnull Motion1<Cartesian> value) { { cesiumlanguagewriter.PositionCesiumWriter writer = openPositionProperty(); try { writer.writeCartesianVelocity(value); } finally { DisposeHelper.dispose(writer); } } }
/** * Writes a value for the {@code position} property as a {@code reference} 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 reference. */ public final void writePositionPropertyReference(Reference value) { { cesiumlanguagewriter.PositionCesiumWriter writer = openPositionProperty(); try { writer.writeReference(value); } finally { DisposeHelper.dispose(writer); } } }
/** * Writes a value for the {@code position} property as a {@code reference} 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 earliest date of the interval. */ public final void writePositionPropertyReference(String value) { { cesiumlanguagewriter.PositionCesiumWriter writer = openPositionProperty(); try { writer.writeReference(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 cartographicRadians} 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 position 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 writePositionPropertyCartographicRadians(List<JulianDate> dates, List<Cartographic> values, int startIndex, int length) { { cesiumlanguagewriter.PositionCesiumWriter writer = openPositionProperty(); try { writer.writeCartographicRadians(dates, values, startIndex, length); } finally { DisposeHelper.dispose(writer); } } }
/** * Writes a value for the {@code position} property as a {@code cartesianVelocity} 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 writePositionPropertyCartesianVelocity(List<JulianDate> dates, List<Motion1<Cartesian>> values, int startIndex, int length) { { cesiumlanguagewriter.PositionCesiumWriter writer = openPositionProperty(); try { writer.writeCartesianVelocity(dates, values, startIndex, length); } finally { DisposeHelper.dispose(writer); } } }
/** * Writes a value for the {@code position} property as a {@code cartesianVelocity} 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 writePositionPropertyCartesianVelocity(List<JulianDate> dates, List<Motion1<Cartesian>> values) { { cesiumlanguagewriter.PositionCesiumWriter writer = openPositionProperty(); try { writer.writeCartesianVelocity(dates, values); } finally { DisposeHelper.dispose(writer); } } }
/** * Writes a value for the {@code position} property as a {@code cartographicRadians} 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 writePositionPropertyCartographicRadians(List<JulianDate> dates, List<Cartographic> values) { { cesiumlanguagewriter.PositionCesiumWriter writer = openPositionProperty(); try { writer.writeCartographicRadians(dates, values); } finally { DisposeHelper.dispose(writer); } } }
/** * Writes a value for the {@code position} property as a {@code cartographicDegrees} 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 writePositionPropertyCartographicDegrees(List<JulianDate> dates, List<Cartographic> values) { { cesiumlanguagewriter.PositionCesiumWriter writer = openPositionProperty(); try { writer.writeCartographicDegrees(dates, values); } finally { DisposeHelper.dispose(writer); } } }
/** * Writes a value for the {@code position} property as a {@code reference} 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 identifier The identifier of the object which contains the referenced property. * @param propertyName The property on the referenced object. */ public final void writePositionPropertyReference(String identifier, String propertyName) { { cesiumlanguagewriter.PositionCesiumWriter writer = openPositionProperty(); try { writer.writeReference(identifier, propertyName); } finally { DisposeHelper.dispose(writer); } } }
/** * Writes a value for the {@code position} property as a {@code reference} 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 identifier The identifier of the object which contains the referenced property. * @param propertyNames The hierarchy of properties to be indexed on the referenced object. */ public final void writePositionPropertyReference(String identifier, String[] propertyNames) { { cesiumlanguagewriter.PositionCesiumWriter writer = openPositionProperty(); try { writer.writeReference(identifier, propertyNames); } 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); } } }
/** * Writes a value for the {@code position} property as a {@code cartographicDegrees} 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 position 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 writePositionPropertyCartographicDegrees(List<JulianDate> dates, List<Cartographic> values, int startIndex, int length) { { cesiumlanguagewriter.PositionCesiumWriter writer = openPositionProperty(); try { writer.writeCartographicDegrees(dates, values, startIndex, length); } finally { DisposeHelper.dispose(writer); } } }
@Test public final void testPositionProperty() { PacketCesiumWriter packet = m_writer.openPacket(m_outputStream); PositionCesiumWriter position = packet.openPositionProperty(); Assert.assertNotNull(position); Assert.assertEquals("{\"position\":", m_stringWriter.toString()); }
@Test public void runExample() throws IOException { StringWriter stringWriter = new StringWriter(); CesiumOutputStream output = new CesiumOutputStream(stringWriter); output.setPrettyFormatting(true); CesiumStreamWriter stream = new CesiumStreamWriter(); try (PacketCesiumWriter packet = stream.openPacket(output)) { packet.writeId("Test"); try (BillboardCesiumWriter billboard = packet.openBillboardProperty()) { billboard.writeColorProperty(123, 67, 0, 255); billboard.writeImageProperty(URI.create("http://cesiumjs.org/images/CesiumHeaderLogo.png"), CesiumResourceBehavior.EMBED); } try (PositionCesiumWriter position = packet.openPositionProperty()) { position.writeCartographicDegrees(new Cartographic(-75.0, 45.0, 100.0)); } } stringWriter.close(); System.out.println(stringWriter.toString()); } }
@Test public final void referenceFrameValueWritesReferenceFrameProperty() { { final PacketCesiumWriter usingExpression_0 = (getPacket()); try { { PositionCesiumWriter position = getPacket().openPositionProperty(); try { { PositionCesiumWriter interval = position.openInterval(); try { interval.writeReferenceFrame("myReferenceFrame"); } finally { DisposeHelper.dispose(interval); } } } finally { DisposeHelper.dispose(position); } } } finally { DisposeHelper.dispose(usingExpression_0); } } Assert.assertEquals("{\"position\":{\"referenceFrame\":\"myReferenceFrame\"}}", getStringWriter().toString()); }
@Test public final void cartographicRadiansValueWritesSingleCartographicRadiansProperty() { { final PacketCesiumWriter usingExpression_2 = (getPacket()); try { { PositionCesiumWriter position = getPacket().openPositionProperty(); try { { PositionCesiumWriter interval = position.openInterval(); try { interval.writeCartographicRadians(new Cartographic(1100.0, 2200.0, 3.0)); } finally { DisposeHelper.dispose(interval); } } } finally { DisposeHelper.dispose(position); } } } finally { DisposeHelper.dispose(usingExpression_2); } } Assert.assertEquals("{\"position\":{\"cartographicRadians\":[1100,2200,3]}}", getStringWriter().toString()); }