From f4bcff4ee665e4be1b545ab4802bf4b94b11f128 Mon Sep 17 00:00:00 2001 From: Scott Hunter Date: Mon, 13 Jun 2016 16:54:34 -0400 Subject: [PATCH 1/3] Fix Java compile problem. --- DotNet/CesiumLanguageWriter/Advanced/CesiumPropertyWriter.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/DotNet/CesiumLanguageWriter/Advanced/CesiumPropertyWriter.cs b/DotNet/CesiumLanguageWriter/Advanced/CesiumPropertyWriter.cs index 0d275eb0..ad76839a 100644 --- a/DotNet/CesiumLanguageWriter/Advanced/CesiumPropertyWriter.cs +++ b/DotNet/CesiumLanguageWriter/Advanced/CesiumPropertyWriter.cs @@ -174,7 +174,10 @@ protected void OpenIntervalIfNecessary() private TDerived CopyForInterval() { TDerived result = Clone(); - result.m_elementType = ElementType.Interval; + + CesiumPropertyWriter cesiumPropertyWriter = result; + cesiumPropertyWriter.m_elementType = ElementType.Interval; + return result; } From 822944bc702ed142fb5b4594852aa4b38350403e Mon Sep 17 00:00:00 2001 From: Scott Hunter Date: Mon, 13 Jun 2016 16:57:41 -0400 Subject: [PATCH 2/3] Add Box, Cylinder, and Corridor. --- .../Advanced/CesiumFormattingHelper.cs | 55 +- .../CesiumLanguageWriter/CesiumCornerType.cs | 23 + .../CesiumLanguageWriter.csproj | 6 + .../Generated/BoxCesiumWriter.cs | 662 +++++++++++ .../Generated/BoxDimensionsCesiumWriter.cs | 170 +++ .../Generated/CornerTypeCesiumWriter.cs | 151 +++ .../Generated/CorridorCesiumWriter.cs | 1034 +++++++++++++++++ .../Generated/CylinderCesiumWriter.cs | 849 ++++++++++++++ .../Generated/PacketCesiumWriter.cs | 66 ++ .../GenerateCSharp.config.json | 13 + Schema/Box.jsonschema | 41 + Schema/BoxDimensions.jsonschema | 26 + Schema/CornerType.jsonschema | 24 + Schema/CornerTypeValue.jsonschema | 10 + Schema/Corridor.jsonschema | 57 + Schema/Cylinder.jsonschema | 49 + Schema/Packet.jsonschema | 12 + 17 files changed, 3214 insertions(+), 34 deletions(-) create mode 100644 DotNet/CesiumLanguageWriter/CesiumCornerType.cs create mode 100644 DotNet/CesiumLanguageWriter/Generated/BoxCesiumWriter.cs create mode 100644 DotNet/CesiumLanguageWriter/Generated/BoxDimensionsCesiumWriter.cs create mode 100644 DotNet/CesiumLanguageWriter/Generated/CornerTypeCesiumWriter.cs create mode 100644 DotNet/CesiumLanguageWriter/Generated/CorridorCesiumWriter.cs create mode 100644 DotNet/CesiumLanguageWriter/Generated/CylinderCesiumWriter.cs create mode 100644 Schema/Box.jsonschema create mode 100644 Schema/BoxDimensions.jsonschema create mode 100644 Schema/CornerType.jsonschema create mode 100644 Schema/CornerTypeValue.jsonschema create mode 100644 Schema/Corridor.jsonschema create mode 100644 Schema/Cylinder.jsonschema diff --git a/DotNet/CesiumLanguageWriter/Advanced/CesiumFormattingHelper.cs b/DotNet/CesiumLanguageWriter/Advanced/CesiumFormattingHelper.cs index 79220efd..aea32a89 100644 --- a/DotNet/CesiumLanguageWriter/Advanced/CesiumFormattingHelper.cs +++ b/DotNet/CesiumLanguageWriter/Advanced/CesiumFormattingHelper.cs @@ -131,16 +131,12 @@ private static ImageFormat CesiumImageFormatToImageFormat(CesiumImageFormat imag { case CesiumImageFormat.Jpeg: return ImageFormat.Jpeg; - case CesiumImageFormat.Png: return ImageFormat.Png; - case CesiumImageFormat.Bmp: return ImageFormat.Bmp; - case CesiumImageFormat.Gif: return ImageFormat.Gif; - default: throw new ArgumentException(CesiumLocalization.ArgumentTypeInvalid, "imageFormat"); } @@ -172,16 +168,12 @@ private static string GetMimeTypeFromCesiumImageFormat(CesiumImageFormat imageFo { case CesiumImageFormat.Jpeg: return "image/jpeg"; - case CesiumImageFormat.Png: return "image/png"; - case CesiumImageFormat.Bmp: return "image/bmp"; - case CesiumImageFormat.Gif: return "image/gif"; - default: throw new ArgumentException(CesiumLocalization.ArgumentTypeInvalid, "imageFormat"); } @@ -199,10 +191,8 @@ public static string StripeOrientationToString(CesiumStripeOrientation orientati { case CesiumStripeOrientation.Horizontal: return "HORIZONTAL"; - case CesiumStripeOrientation.Vertical: return "VERTICAL"; - default: throw new ArgumentException(CesiumLocalization.UnknownEnumerationValue, "orientation"); } @@ -220,13 +210,10 @@ public static string HorizontalOriginToString(CesiumHorizontalOrigin horizontalO { case CesiumHorizontalOrigin.Left: return "LEFT"; - case CesiumHorizontalOrigin.Center: return "CENTER"; - case CesiumHorizontalOrigin.Right: return "RIGHT"; - default: throw new ArgumentException(CesiumLocalization.UnknownEnumerationValue, "horizontalOrigin"); } @@ -244,13 +231,10 @@ public static string VerticalOriginToString(CesiumVerticalOrigin verticalOrigin) { case CesiumVerticalOrigin.Bottom: return "BOTTOM"; - case CesiumVerticalOrigin.Center: return "CENTER"; - case CesiumVerticalOrigin.Top: return "TOP"; - default: throw new ArgumentException(CesiumLocalization.UnknownEnumerationValue, "verticalOrigin"); } @@ -268,13 +252,10 @@ public static string InterpolationAlgorithmToString(CesiumInterpolationAlgorithm { case CesiumInterpolationAlgorithm.Linear: return "LINEAR"; - case CesiumInterpolationAlgorithm.Lagrange: return "LAGRANGE"; - case CesiumInterpolationAlgorithm.Hermite: return "HERMITE"; - default: throw new ArgumentException(CesiumLocalization.UnknownEnumerationValue, "interpolationAlgorithm"); } @@ -292,13 +273,10 @@ public static string ExtrapolationTypeToString(CesiumExtrapolationType extrapola { case CesiumExtrapolationType.None: return "NONE"; - case CesiumExtrapolationType.Hold: return "HOLD"; - case CesiumExtrapolationType.Extrapolate: return "EXTRAPOLATE"; - default: throw new ArgumentException(CesiumLocalization.UnknownEnumerationValue, "extrapolationType"); } @@ -316,13 +294,10 @@ public static string ClockRangeToString(ClockRange clockRange) { case ClockRange.Clamped: return "CLAMPED"; - case ClockRange.Unbounded: return "UNBOUNDED"; - case ClockRange.LoopStop: return "LOOP_STOP"; - default: throw new ArgumentException(CesiumLocalization.UnknownEnumerationValue, "clockRange"); } @@ -340,13 +315,10 @@ public static string ClockStepToString(ClockStep clockStep) { case ClockStep.SystemClock: return "SYSTEM_CLOCK"; - case ClockStep.SystemClockMultiplier: return "SYSTEM_CLOCK_MULTIPLIER"; - case ClockStep.TickDependent: return "TICK_DEPENDENT"; - default: throw new ArgumentException(CesiumLocalization.UnknownEnumerationValue, "clockStep"); } @@ -364,18 +336,36 @@ public static string LabelStyleToString(CesiumLabelStyle labelStyle) { case CesiumLabelStyle.Fill: return "FILL"; - case CesiumLabelStyle.Outline: return "OUTLINE"; - case CesiumLabelStyle.FillAndOutline: return "FILL_AND_OUTLINE"; - default: throw new ArgumentException(CesiumLocalization.UnknownEnumerationValue, "labelStyle"); } } + /// + /// Converts a to the corresponding string in a + /// CZML stream. + /// + /// The label style to convert. + /// The string representing the specified . + public static string CornerTypeToString(CesiumCornerType cornerType) + { + switch (cornerType) + { + case CesiumCornerType.Rounded: + return "ROUNDED"; + case CesiumCornerType.Mitered: + return "MITERED"; + case CesiumCornerType.Beveled: + return "BEVELED"; + default: + throw new ArgumentException(CesiumLocalization.UnknownEnumerationValue, "cornerType"); + } + } + /// /// Converts a to the corresponding string in a /// CZML stream. @@ -388,13 +378,10 @@ public static string SensorVolumePortionToDisplayToString(CesiumSensorVolumePort { case CesiumSensorVolumePortionToDisplay.Complete: return "COMPLETE"; - case CesiumSensorVolumePortionToDisplay.AboveEllipsoidHorizon: return "ABOVE_ELLIPSOID_HORIZON"; - case CesiumSensorVolumePortionToDisplay.BelowEllipsoidHorizon: return "BELOW_ELLIPSOID_HORIZON"; - default: throw new ArgumentException(CesiumLocalization.UnknownEnumerationValue, "portionToDisplay"); } diff --git a/DotNet/CesiumLanguageWriter/CesiumCornerType.cs b/DotNet/CesiumLanguageWriter/CesiumCornerType.cs new file mode 100644 index 00000000..d354f4d4 --- /dev/null +++ b/DotNet/CesiumLanguageWriter/CesiumCornerType.cs @@ -0,0 +1,23 @@ +namespace CesiumLanguageWriter +{ + /// + /// Specifies the style of a corner. + /// + public enum CesiumCornerType + { + /// + /// The corner has a smooth edge. + /// + Rounded, + + /// + /// The corner point is the intersection of adjacent edges. + /// + Mitered, + + /// + /// The corner is clipped. + /// + Beveled, + } +} \ No newline at end of file diff --git a/DotNet/CesiumLanguageWriter/CesiumLanguageWriter.csproj b/DotNet/CesiumLanguageWriter/CesiumLanguageWriter.csproj index 43e1aa44..835ca19f 100644 --- a/DotNet/CesiumLanguageWriter/CesiumLanguageWriter.csproj +++ b/DotNet/CesiumLanguageWriter/CesiumLanguageWriter.csproj @@ -68,6 +68,7 @@ + @@ -88,10 +89,15 @@ + + + + + diff --git a/DotNet/CesiumLanguageWriter/Generated/BoxCesiumWriter.cs b/DotNet/CesiumLanguageWriter/Generated/BoxCesiumWriter.cs new file mode 100644 index 00000000..a9f7facd --- /dev/null +++ b/DotNet/CesiumLanguageWriter/Generated/BoxCesiumWriter.cs @@ -0,0 +1,662 @@ +// This file was generated automatically by GenerateFromSchema. Do NOT edit it. +// https://github.com/AnalyticalGraphicsInc/czml-writer + +using CesiumLanguageWriter.Advanced; +using System; +using System.Collections.Generic; +using System.Drawing; + +namespace CesiumLanguageWriter +{ + /// + /// Writes a Box to a . A Box is a box, which is a closed rectangular cuboid. + /// + public class BoxCesiumWriter : CesiumPropertyWriter + { + /// + /// The name of the show property. + /// + public const string ShowPropertyName = "show"; + + /// + /// The name of the dimensions property. + /// + public const string DimensionsPropertyName = "dimensions"; + + /// + /// The name of the fill property. + /// + public const string FillPropertyName = "fill"; + + /// + /// The name of the material property. + /// + public const string MaterialPropertyName = "material"; + + /// + /// The name of the outline property. + /// + public const string OutlinePropertyName = "outline"; + + /// + /// The name of the outlineColor property. + /// + public const string OutlineColorPropertyName = "outlineColor"; + + /// + /// The name of the outlineWidth property. + /// + public const string OutlineWidthPropertyName = "outlineWidth"; + + private readonly Lazy m_show = new Lazy(() => new BooleanCesiumWriter(ShowPropertyName), false); + private readonly Lazy m_dimensions = new Lazy(() => new BoxDimensionsCesiumWriter(DimensionsPropertyName), false); + private readonly Lazy m_fill = new Lazy(() => new BooleanCesiumWriter(FillPropertyName), false); + private readonly Lazy m_material = new Lazy(() => new MaterialCesiumWriter(MaterialPropertyName), false); + private readonly Lazy m_outline = new Lazy(() => new BooleanCesiumWriter(OutlinePropertyName), false); + private readonly Lazy m_outlineColor = new Lazy(() => new ColorCesiumWriter(OutlineColorPropertyName), false); + private readonly Lazy m_outlineWidth = new Lazy(() => new DoubleCesiumWriter(OutlineWidthPropertyName), false); + + /// + /// Initializes a new instance. + /// + public BoxCesiumWriter(string propertyName) + : base(propertyName) + { + } + + /// + /// Initializes a new instance as a copy of an existing instance. + /// + /// The existing instance to copy. + protected BoxCesiumWriter(BoxCesiumWriter existingInstance) + : base(existingInstance) + { + } + + /// + public override BoxCesiumWriter Clone() + { + return new BoxCesiumWriter(this); + } + + /// + /// Gets the writer for the show property. The returned instance must be opened by calling the method before it can be used for writing. The show property defines whether or not the box is shown. + /// + public BooleanCesiumWriter ShowWriter + { + get { return m_show.Value; } + } + + /// + /// Opens and returns the writer for the show property. The show property defines whether or not the box is shown. + /// + public BooleanCesiumWriter OpenShowProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(ShowWriter); + } + + /// + /// Writes a value for the show property as a boolean value. The show property specifies whether or not the box is shown. + /// + /// The value. + public void WriteShowProperty(bool value) + { + using (var writer = OpenShowProperty()) + { + writer.WriteBoolean(value); + } + } + + /// + /// Writes a value for the show property as a reference value. The show property specifies whether or not the box is shown. + /// + /// The reference. + public void WriteShowPropertyReference(Reference value) + { + using (var writer = OpenShowProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the show property as a reference value. The show property specifies whether or not the box is shown. + /// + /// The earliest date of the interval. + public void WriteShowPropertyReference(string value) + { + using (var writer = OpenShowProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the show property as a reference value. The show property specifies whether or not the box is shown. + /// + /// The identifier of the object which contains the referenced property. + /// The property on the referenced object. + public void WriteShowPropertyReference(string identifier, string propertyName) + { + using (var writer = OpenShowProperty()) + { + writer.WriteReference(identifier, propertyName); + } + } + + /// + /// Writes a value for the show property as a reference value. The show property specifies whether or not the box is shown. + /// + /// The identifier of the object which contains the referenced property. + /// The hierarchy of properties to be indexed on the referenced object. + public void WriteShowPropertyReference(string identifier, string[] propertyNames) + { + using (var writer = OpenShowProperty()) + { + writer.WriteReference(identifier, propertyNames); + } + } + + /// + /// Gets the writer for the dimensions property. The returned instance must be opened by calling the method before it can be used for writing. The dimensions property defines the dimensions of the box. + /// + public BoxDimensionsCesiumWriter DimensionsWriter + { + get { return m_dimensions.Value; } + } + + /// + /// Opens and returns the writer for the dimensions property. The dimensions property defines the dimensions of the box. + /// + public BoxDimensionsCesiumWriter OpenDimensionsProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(DimensionsWriter); + } + + /// + /// Writes a value for the dimensions property as a cartesian value. The dimensions property specifies the dimensions of the box. + /// + /// The value. + public void WriteDimensionsProperty(Cartesian value) + { + using (var writer = OpenDimensionsProperty()) + { + writer.WriteCartesian(value); + } + } + + /// + /// Writes a value for the dimensions property as a cartesian value. The dimensions property specifies the dimensions of the box. + /// + /// The dates at which the vector is specified. + /// The values corresponding to each date. + public void WriteDimensionsProperty(IList dates, IList values) + { + using (var writer = OpenDimensionsProperty()) + { + writer.WriteCartesian(dates, values); + } + } + + /// + /// Writes a value for the dimensions property as a cartesian value. The dimensions property specifies the dimensions of the box. + /// + /// The dates at which the vector is specified. + /// The values corresponding to each date. + /// The index of the first element to use in the `values` collection. + /// The number of elements to use from the `values` collection. + public void WriteDimensionsProperty(IList dates, IList values, int startIndex, int length) + { + using (var writer = OpenDimensionsProperty()) + { + writer.WriteCartesian(dates, values, startIndex, length); + } + } + + /// + /// Writes a value for the dimensions property as a reference value. The dimensions property specifies the dimensions of the box. + /// + /// The reference. + public void WriteDimensionsPropertyReference(Reference value) + { + using (var writer = OpenDimensionsProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the dimensions property as a reference value. The dimensions property specifies the dimensions of the box. + /// + /// The earliest date of the interval. + public void WriteDimensionsPropertyReference(string value) + { + using (var writer = OpenDimensionsProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the dimensions property as a reference value. The dimensions property specifies the dimensions of the box. + /// + /// The identifier of the object which contains the referenced property. + /// The property on the referenced object. + public void WriteDimensionsPropertyReference(string identifier, string propertyName) + { + using (var writer = OpenDimensionsProperty()) + { + writer.WriteReference(identifier, propertyName); + } + } + + /// + /// Writes a value for the dimensions property as a reference value. The dimensions property specifies the dimensions of the box. + /// + /// The identifier of the object which contains the referenced property. + /// The hierarchy of properties to be indexed on the referenced object. + public void WriteDimensionsPropertyReference(string identifier, string[] propertyNames) + { + using (var writer = OpenDimensionsProperty()) + { + writer.WriteReference(identifier, propertyNames); + } + } + + /// + /// Gets the writer for the fill property. The returned instance must be opened by calling the method before it can be used for writing. The fill property defines whether or not the box is filled. + /// + public BooleanCesiumWriter FillWriter + { + get { return m_fill.Value; } + } + + /// + /// Opens and returns the writer for the fill property. The fill property defines whether or not the box is filled. + /// + public BooleanCesiumWriter OpenFillProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(FillWriter); + } + + /// + /// Writes a value for the fill property as a boolean value. The fill property specifies whether or not the box is filled. + /// + /// The value. + public void WriteFillProperty(bool value) + { + using (var writer = OpenFillProperty()) + { + writer.WriteBoolean(value); + } + } + + /// + /// Writes a value for the fill property as a reference value. The fill property specifies whether or not the box is filled. + /// + /// The reference. + public void WriteFillPropertyReference(Reference value) + { + using (var writer = OpenFillProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the fill property as a reference value. The fill property specifies whether or not the box is filled. + /// + /// The earliest date of the interval. + public void WriteFillPropertyReference(string value) + { + using (var writer = OpenFillProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the fill property as a reference value. The fill property specifies whether or not the box is filled. + /// + /// The identifier of the object which contains the referenced property. + /// The property on the referenced object. + public void WriteFillPropertyReference(string identifier, string propertyName) + { + using (var writer = OpenFillProperty()) + { + writer.WriteReference(identifier, propertyName); + } + } + + /// + /// Writes a value for the fill property as a reference value. The fill property specifies whether or not the box is filled. + /// + /// The identifier of the object which contains the referenced property. + /// The hierarchy of properties to be indexed on the referenced object. + public void WriteFillPropertyReference(string identifier, string[] propertyNames) + { + using (var writer = OpenFillProperty()) + { + writer.WriteReference(identifier, propertyNames); + } + } + + /// + /// Gets the writer for the material property. The returned instance must be opened by calling the method before it can be used for writing. The material property defines the material to display on the surface of the box. + /// + public MaterialCesiumWriter MaterialWriter + { + get { return m_material.Value; } + } + + /// + /// Opens and returns the writer for the material property. The material property defines the material to display on the surface of the box. + /// + public MaterialCesiumWriter OpenMaterialProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(MaterialWriter); + } + + /// + /// Gets the writer for the outline property. The returned instance must be opened by calling the method before it can be used for writing. The outline property defines whether or not the box is outlined. + /// + public BooleanCesiumWriter OutlineWriter + { + get { return m_outline.Value; } + } + + /// + /// Opens and returns the writer for the outline property. The outline property defines whether or not the box is outlined. + /// + public BooleanCesiumWriter OpenOutlineProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(OutlineWriter); + } + + /// + /// Writes a value for the outline property as a boolean value. The outline property specifies whether or not the box is outlined. + /// + /// The value. + public void WriteOutlineProperty(bool value) + { + using (var writer = OpenOutlineProperty()) + { + writer.WriteBoolean(value); + } + } + + /// + /// Writes a value for the outline property as a reference value. The outline property specifies whether or not the box is outlined. + /// + /// The reference. + public void WriteOutlinePropertyReference(Reference value) + { + using (var writer = OpenOutlineProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the outline property as a reference value. The outline property specifies whether or not the box is outlined. + /// + /// The earliest date of the interval. + public void WriteOutlinePropertyReference(string value) + { + using (var writer = OpenOutlineProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the outline property as a reference value. The outline property specifies whether or not the box is outlined. + /// + /// The identifier of the object which contains the referenced property. + /// The property on the referenced object. + public void WriteOutlinePropertyReference(string identifier, string propertyName) + { + using (var writer = OpenOutlineProperty()) + { + writer.WriteReference(identifier, propertyName); + } + } + + /// + /// Writes a value for the outline property as a reference value. The outline property specifies whether or not the box is outlined. + /// + /// The identifier of the object which contains the referenced property. + /// The hierarchy of properties to be indexed on the referenced object. + public void WriteOutlinePropertyReference(string identifier, string[] propertyNames) + { + using (var writer = OpenOutlineProperty()) + { + writer.WriteReference(identifier, propertyNames); + } + } + + /// + /// Gets the writer for the outlineColor property. The returned instance must be opened by calling the method before it can be used for writing. The outlineColor property defines the color of the box outline. + /// + public ColorCesiumWriter OutlineColorWriter + { + get { return m_outlineColor.Value; } + } + + /// + /// Opens and returns the writer for the outlineColor property. The outlineColor property defines the color of the box outline. + /// + public ColorCesiumWriter OpenOutlineColorProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(OutlineColorWriter); + } + + /// + /// Writes a value for the outlineColor property as a rgba value. The outlineColor property specifies the color of the box outline. + /// + /// The color. + public void WriteOutlineColorProperty(Color color) + { + using (var writer = OpenOutlineColorProperty()) + { + writer.WriteRgba(color); + } + } + + /// + /// Writes a value for the outlineColor property as a rgba value. The outlineColor property specifies the color of the box outline. + /// + /// The red component in the range 0 to 255. + /// The green component in the range 0 to 255. + /// The blue component in the range 0 to 255. + /// The alpha component in the range 0 to 255. + public void WriteOutlineColorProperty(int red, int green, int blue, int alpha) + { + using (var writer = OpenOutlineColorProperty()) + { + writer.WriteRgba(red, green, blue, alpha); + } + } + + /// + /// Writes a value for the outlineColor property as a rgba value. The outlineColor property specifies the color of the box outline. + /// + /// The dates at which the value is specified. + /// The color corresponding to each date. + /// The index of the first element to use in the `colors` collection. + /// The number of elements to use from the `colors` collection. + public void WriteOutlineColorProperty(IList dates, IList colors, int startIndex, int length) + { + using (var writer = OpenOutlineColorProperty()) + { + writer.WriteRgba(dates, colors, startIndex, length); + } + } + + /// + /// Writes a value for the outlineColor property as a rgbaf value. The outlineColor property specifies the color of the box outline. + /// + /// The red component in the range 0 to 1.0. + /// The green component in the range 0 to 1.0. + /// The blue component in the range 0 to 1.0. + /// The alpha component in the range 0 to 1.0. + public void WriteOutlineColorPropertyRgbaf(float red, float green, float blue, float alpha) + { + using (var writer = OpenOutlineColorProperty()) + { + writer.WriteRgbaf(red, green, blue, alpha); + } + } + + /// + /// Writes a value for the outlineColor property as a reference value. The outlineColor property specifies the color of the box outline. + /// + /// The reference. + public void WriteOutlineColorPropertyReference(Reference value) + { + using (var writer = OpenOutlineColorProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the outlineColor property as a reference value. The outlineColor property specifies the color of the box outline. + /// + /// The earliest date of the interval. + public void WriteOutlineColorPropertyReference(string value) + { + using (var writer = OpenOutlineColorProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the outlineColor property as a reference value. The outlineColor property specifies the color of the box outline. + /// + /// The identifier of the object which contains the referenced property. + /// The property on the referenced object. + public void WriteOutlineColorPropertyReference(string identifier, string propertyName) + { + using (var writer = OpenOutlineColorProperty()) + { + writer.WriteReference(identifier, propertyName); + } + } + + /// + /// Writes a value for the outlineColor property as a reference value. The outlineColor property specifies the color of the box outline. + /// + /// The identifier of the object which contains the referenced property. + /// The hierarchy of properties to be indexed on the referenced object. + public void WriteOutlineColorPropertyReference(string identifier, string[] propertyNames) + { + using (var writer = OpenOutlineColorProperty()) + { + writer.WriteReference(identifier, propertyNames); + } + } + + /// + /// Gets the writer for the outlineWidth property. The returned instance must be opened by calling the method before it can be used for writing. The outlineWidth property defines the width of the box outline. + /// + public DoubleCesiumWriter OutlineWidthWriter + { + get { return m_outlineWidth.Value; } + } + + /// + /// Opens and returns the writer for the outlineWidth property. The outlineWidth property defines the width of the box outline. + /// + public DoubleCesiumWriter OpenOutlineWidthProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(OutlineWidthWriter); + } + + /// + /// Writes a value for the outlineWidth property as a number value. The outlineWidth property specifies the width of the box outline. + /// + /// The value. + public void WriteOutlineWidthProperty(double value) + { + using (var writer = OpenOutlineWidthProperty()) + { + writer.WriteNumber(value); + } + } + + /// + /// Writes a value for the outlineWidth property as a number value. The outlineWidth property specifies the width of the box outline. + /// + /// The dates at which the value is specified. + /// The value corresponding to each date. + /// The index of the first element to use in the `values` collection. + /// The number of elements to use from the `values` collection. + public void WriteOutlineWidthProperty(IList dates, IList values, int startIndex, int length) + { + using (var writer = OpenOutlineWidthProperty()) + { + writer.WriteNumber(dates, values, startIndex, length); + } + } + + /// + /// Writes a value for the outlineWidth property as a reference value. The outlineWidth property specifies the width of the box outline. + /// + /// The reference. + public void WriteOutlineWidthPropertyReference(Reference value) + { + using (var writer = OpenOutlineWidthProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the outlineWidth property as a reference value. The outlineWidth property specifies the width of the box outline. + /// + /// The earliest date of the interval. + public void WriteOutlineWidthPropertyReference(string value) + { + using (var writer = OpenOutlineWidthProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the outlineWidth property as a reference value. The outlineWidth property specifies the width of the box outline. + /// + /// The identifier of the object which contains the referenced property. + /// The property on the referenced object. + public void WriteOutlineWidthPropertyReference(string identifier, string propertyName) + { + using (var writer = OpenOutlineWidthProperty()) + { + writer.WriteReference(identifier, propertyName); + } + } + + /// + /// Writes a value for the outlineWidth property as a reference value. The outlineWidth property specifies the width of the box outline. + /// + /// The identifier of the object which contains the referenced property. + /// The hierarchy of properties to be indexed on the referenced object. + public void WriteOutlineWidthPropertyReference(string identifier, string[] propertyNames) + { + using (var writer = OpenOutlineWidthProperty()) + { + writer.WriteReference(identifier, propertyNames); + } + } + + } +} diff --git a/DotNet/CesiumLanguageWriter/Generated/BoxDimensionsCesiumWriter.cs b/DotNet/CesiumLanguageWriter/Generated/BoxDimensionsCesiumWriter.cs new file mode 100644 index 00000000..fe45d4c3 --- /dev/null +++ b/DotNet/CesiumLanguageWriter/Generated/BoxDimensionsCesiumWriter.cs @@ -0,0 +1,170 @@ +// This file was generated automatically by GenerateFromSchema. Do NOT edit it. +// https://github.com/AnalyticalGraphicsInc/czml-writer + +using CesiumLanguageWriter.Advanced; +using System; +using System.Collections.Generic; + +namespace CesiumLanguageWriter +{ + /// + /// Writes a BoxDimensions to a . A BoxDimensions is the width, depth, and height of a box. + /// + public class BoxDimensionsCesiumWriter : CesiumInterpolatablePropertyWriter + { + /// + /// The name of the cartesian property. + /// + public const string CartesianPropertyName = "cartesian"; + + /// + /// The name of the reference property. + /// + public const string ReferencePropertyName = "reference"; + + private readonly Lazy> m_asCartesian; + private readonly Lazy> m_asReference; + + /// + /// Initializes a new instance. + /// + public BoxDimensionsCesiumWriter(string propertyName) + : base(propertyName) + { + m_asCartesian = new Lazy>(CreateCartesianAdaptor, false); + m_asReference = new Lazy>(CreateReferenceAdaptor, false); + } + + /// + /// Initializes a new instance as a copy of an existing instance. + /// + /// The existing instance to copy. + protected BoxDimensionsCesiumWriter(BoxDimensionsCesiumWriter existingInstance) + : base(existingInstance) + { + m_asCartesian = new Lazy>(CreateCartesianAdaptor, false); + m_asReference = new Lazy>(CreateReferenceAdaptor, false); + } + + /// + public override BoxDimensionsCesiumWriter Clone() + { + return new BoxDimensionsCesiumWriter(this); + } + + /// + /// Writes the value expressed as a cartesian, which is the dimensions specified as a three-dimensional Cartesian value `[X, Y, Z]`, with X representing width, Y representing depth, and Z representing height, in world coordinates in meters. + /// + /// The value. + public void WriteCartesian(Cartesian value) + { + const string PropertyName = CartesianPropertyName; + OpenIntervalIfNecessary(); + Output.WritePropertyName(PropertyName); + CesiumWritingHelper.WriteCartesian3(Output, value); + } + + /// + /// Writes the value expressed as a cartesian, which is the dimensions specified as a three-dimensional Cartesian value `[X, Y, Z]`, with X representing width, Y representing depth, and Z representing height, in world coordinates in meters. + /// + /// The dates at which the vector is specified. + /// The values corresponding to each date. + public void WriteCartesian(IList dates, IList values) + { + WriteCartesian(dates, values, 0, dates.Count); + } + + /// + /// Writes the value expressed as a cartesian, which is the dimensions specified as a three-dimensional Cartesian value `[X, Y, Z]`, with X representing width, Y representing depth, and Z representing height, in world coordinates in meters. + /// + /// The dates at which the vector is specified. + /// The values corresponding to each date. + /// The index of the first element to use in the `values` collection. + /// The number of elements to use from the `values` collection. + public void WriteCartesian(IList dates, IList values, int startIndex, int length) + { + const string PropertyName = CartesianPropertyName; + OpenIntervalIfNecessary(); + CesiumWritingHelper.WriteCartesian3(Output, PropertyName, dates, values, startIndex, length); + } + + /// + /// Writes the value expressed as a reference, which is the dimensions specified as a reference to another property. + /// + /// The reference. + public void WriteReference(Reference value) + { + const string PropertyName = ReferencePropertyName; + OpenIntervalIfNecessary(); + Output.WritePropertyName(PropertyName); + CesiumWritingHelper.WriteReference(Output, value); + } + + /// + /// Writes the value expressed as a reference, which is the dimensions specified as a reference to another property. + /// + /// The earliest date of the interval. + public void WriteReference(string value) + { + const string PropertyName = ReferencePropertyName; + OpenIntervalIfNecessary(); + Output.WritePropertyName(PropertyName); + CesiumWritingHelper.WriteReference(Output, value); + } + + /// + /// Writes the value expressed as a reference, which is the dimensions specified as a reference to another property. + /// + /// The identifier of the object which contains the referenced property. + /// The property on the referenced object. + public void WriteReference(string identifier, string propertyName) + { + const string PropertyName = ReferencePropertyName; + OpenIntervalIfNecessary(); + Output.WritePropertyName(PropertyName); + CesiumWritingHelper.WriteReference(Output, identifier, propertyName); + } + + /// + /// Writes the value expressed as a reference, which is the dimensions specified as a reference to another property. + /// + /// The identifier of the object which contains the referenced property. + /// The hierarchy of properties to be indexed on the referenced object. + public void WriteReference(string identifier, string[] propertyNames) + { + const string PropertyName = ReferencePropertyName; + OpenIntervalIfNecessary(); + Output.WritePropertyName(PropertyName); + CesiumWritingHelper.WriteReference(Output, identifier, propertyNames); + } + + /// + /// Returns a wrapper for this instance that implements to write a value in Cartesian format. Because the returned instance is a wrapper for this instance, you may call on either this instance or the wrapper, but you must not call it on both. + /// + /// The wrapper. + public ICesiumInterpolatableValuePropertyWriter AsCartesian() + { + return m_asCartesian.Value; + } + + private ICesiumInterpolatableValuePropertyWriter CreateCartesianAdaptor() + { + return new CesiumInterpolatableWriterAdaptor(this, (me, value) => me.WriteCartesian(value), (me, dates, values, startIndex, length) => me.WriteCartesian(dates, values, startIndex, length)); + } + + /// + /// Returns a wrapper for this instance that implements to write a value in Reference format. Because the returned instance is a wrapper for this instance, you may call on either this instance or the wrapper, but you must not call it on both. + /// + /// The wrapper. + public ICesiumValuePropertyWriter AsReference() + { + return m_asReference.Value; + } + + private ICesiumValuePropertyWriter CreateReferenceAdaptor() + { + return new CesiumWriterAdaptor(this, (me, value) => me.WriteReference(value)); + } + + } +} diff --git a/DotNet/CesiumLanguageWriter/Generated/CornerTypeCesiumWriter.cs b/DotNet/CesiumLanguageWriter/Generated/CornerTypeCesiumWriter.cs new file mode 100644 index 00000000..30fd63c3 --- /dev/null +++ b/DotNet/CesiumLanguageWriter/Generated/CornerTypeCesiumWriter.cs @@ -0,0 +1,151 @@ +// This file was generated automatically by GenerateFromSchema. Do NOT edit it. +// https://github.com/AnalyticalGraphicsInc/czml-writer + +using CesiumLanguageWriter.Advanced; +using System; + +namespace CesiumLanguageWriter +{ + /// + /// Writes a CornerType to a . A CornerType is the style of a corner. + /// + public class CornerTypeCesiumWriter : CesiumPropertyWriter + { + /// + /// The name of the CornerType property. + /// + public const string CornerTypePropertyName = "CornerType"; + + /// + /// The name of the reference property. + /// + public const string ReferencePropertyName = "reference"; + + private readonly Lazy> m_asCornerType; + private readonly Lazy> m_asReference; + + /// + /// Initializes a new instance. + /// + public CornerTypeCesiumWriter(string propertyName) + : base(propertyName) + { + m_asCornerType = new Lazy>(CreateCornerTypeAdaptor, false); + m_asReference = new Lazy>(CreateReferenceAdaptor, false); + } + + /// + /// Initializes a new instance as a copy of an existing instance. + /// + /// The existing instance to copy. + protected CornerTypeCesiumWriter(CornerTypeCesiumWriter existingInstance) + : base(existingInstance) + { + m_asCornerType = new Lazy>(CreateCornerTypeAdaptor, false); + m_asReference = new Lazy>(CreateReferenceAdaptor, false); + } + + /// + public override CornerTypeCesiumWriter Clone() + { + return new CornerTypeCesiumWriter(this); + } + + /// + /// Writes the value expressed as a CornerType, which is the corner style. Valid values are "ROUNDED", "MITERED", and "BEVELED". + /// + /// The style of a corner. + public void WriteCornerType(CesiumCornerType value) + { + const string PropertyName = CornerTypePropertyName; + if (ForceInterval) + { + OpenIntervalIfNecessary(); + } + if (IsInterval) + { + Output.WritePropertyName(PropertyName); + } + Output.WriteValue(CesiumFormattingHelper.CornerTypeToString(value)); + } + + /// + /// Writes the value expressed as a reference, which is the corner style specified as a reference to another property. + /// + /// The reference. + public void WriteReference(Reference value) + { + const string PropertyName = ReferencePropertyName; + OpenIntervalIfNecessary(); + Output.WritePropertyName(PropertyName); + CesiumWritingHelper.WriteReference(Output, value); + } + + /// + /// Writes the value expressed as a reference, which is the corner style specified as a reference to another property. + /// + /// The earliest date of the interval. + public void WriteReference(string value) + { + const string PropertyName = ReferencePropertyName; + OpenIntervalIfNecessary(); + Output.WritePropertyName(PropertyName); + CesiumWritingHelper.WriteReference(Output, value); + } + + /// + /// Writes the value expressed as a reference, which is the corner style specified as a reference to another property. + /// + /// The identifier of the object which contains the referenced property. + /// The property on the referenced object. + public void WriteReference(string identifier, string propertyName) + { + const string PropertyName = ReferencePropertyName; + OpenIntervalIfNecessary(); + Output.WritePropertyName(PropertyName); + CesiumWritingHelper.WriteReference(Output, identifier, propertyName); + } + + /// + /// Writes the value expressed as a reference, which is the corner style specified as a reference to another property. + /// + /// The identifier of the object which contains the referenced property. + /// The hierarchy of properties to be indexed on the referenced object. + public void WriteReference(string identifier, string[] propertyNames) + { + const string PropertyName = ReferencePropertyName; + OpenIntervalIfNecessary(); + Output.WritePropertyName(PropertyName); + CesiumWritingHelper.WriteReference(Output, identifier, propertyNames); + } + + /// + /// Returns a wrapper for this instance that implements to write a value in CornerType format. Because the returned instance is a wrapper for this instance, you may call on either this instance or the wrapper, but you must not call it on both. + /// + /// The wrapper. + public ICesiumValuePropertyWriter AsCornerType() + { + return m_asCornerType.Value; + } + + private ICesiumValuePropertyWriter CreateCornerTypeAdaptor() + { + return new CesiumWriterAdaptor(this, (me, value) => me.WriteCornerType(value)); + } + + /// + /// Returns a wrapper for this instance that implements to write a value in Reference format. Because the returned instance is a wrapper for this instance, you may call on either this instance or the wrapper, but you must not call it on both. + /// + /// The wrapper. + public ICesiumValuePropertyWriter AsReference() + { + return m_asReference.Value; + } + + private ICesiumValuePropertyWriter CreateReferenceAdaptor() + { + return new CesiumWriterAdaptor(this, (me, value) => me.WriteReference(value)); + } + + } +} diff --git a/DotNet/CesiumLanguageWriter/Generated/CorridorCesiumWriter.cs b/DotNet/CesiumLanguageWriter/Generated/CorridorCesiumWriter.cs new file mode 100644 index 00000000..6b8c3d40 --- /dev/null +++ b/DotNet/CesiumLanguageWriter/Generated/CorridorCesiumWriter.cs @@ -0,0 +1,1034 @@ +// This file was generated automatically by GenerateFromSchema. Do NOT edit it. +// https://github.com/AnalyticalGraphicsInc/czml-writer + +using CesiumLanguageWriter.Advanced; +using System; +using System.Collections.Generic; +using System.Drawing; + +namespace CesiumLanguageWriter +{ + /// + /// Writes a Corridor to a . A Corridor is a corridor, which is a shape defined by a centerline and width that conforms to the curvature of the globe. It can be placed on the surface or at altitude and can optionally be extruded into a volume. + /// + public class CorridorCesiumWriter : CesiumPropertyWriter + { + /// + /// The name of the show property. + /// + public const string ShowPropertyName = "show"; + + /// + /// The name of the width property. + /// + public const string WidthPropertyName = "width"; + + /// + /// The name of the height property. + /// + public const string HeightPropertyName = "height"; + + /// + /// The name of the extrudedHeight property. + /// + public const string ExtrudedHeightPropertyName = "extrudedHeight"; + + /// + /// The name of the cornerType property. + /// + public const string CornerTypePropertyName = "cornerType"; + + /// + /// The name of the granularity property. + /// + public const string GranularityPropertyName = "granularity"; + + /// + /// The name of the fill property. + /// + public const string FillPropertyName = "fill"; + + /// + /// The name of the material property. + /// + public const string MaterialPropertyName = "material"; + + /// + /// The name of the outline property. + /// + public const string OutlinePropertyName = "outline"; + + /// + /// The name of the outlineColor property. + /// + public const string OutlineColorPropertyName = "outlineColor"; + + /// + /// The name of the outlineWidth property. + /// + public const string OutlineWidthPropertyName = "outlineWidth"; + + private readonly Lazy m_show = new Lazy(() => new BooleanCesiumWriter(ShowPropertyName), false); + private readonly Lazy m_width = new Lazy(() => new DoubleCesiumWriter(WidthPropertyName), false); + private readonly Lazy m_height = new Lazy(() => new DoubleCesiumWriter(HeightPropertyName), false); + private readonly Lazy m_extrudedHeight = new Lazy(() => new DoubleCesiumWriter(ExtrudedHeightPropertyName), false); + private readonly Lazy m_cornerType = new Lazy(() => new CornerTypeCesiumWriter(CornerTypePropertyName), false); + private readonly Lazy m_granularity = new Lazy(() => new DoubleCesiumWriter(GranularityPropertyName), false); + private readonly Lazy m_fill = new Lazy(() => new BooleanCesiumWriter(FillPropertyName), false); + private readonly Lazy m_material = new Lazy(() => new MaterialCesiumWriter(MaterialPropertyName), false); + private readonly Lazy m_outline = new Lazy(() => new BooleanCesiumWriter(OutlinePropertyName), false); + private readonly Lazy m_outlineColor = new Lazy(() => new ColorCesiumWriter(OutlineColorPropertyName), false); + private readonly Lazy m_outlineWidth = new Lazy(() => new DoubleCesiumWriter(OutlineWidthPropertyName), false); + + /// + /// Initializes a new instance. + /// + public CorridorCesiumWriter(string propertyName) + : base(propertyName) + { + } + + /// + /// Initializes a new instance as a copy of an existing instance. + /// + /// The existing instance to copy. + protected CorridorCesiumWriter(CorridorCesiumWriter existingInstance) + : base(existingInstance) + { + } + + /// + public override CorridorCesiumWriter Clone() + { + return new CorridorCesiumWriter(this); + } + + /// + /// Gets the writer for the show property. The returned instance must be opened by calling the method before it can be used for writing. The show property defines whether or not the corridor is shown. + /// + public BooleanCesiumWriter ShowWriter + { + get { return m_show.Value; } + } + + /// + /// Opens and returns the writer for the show property. The show property defines whether or not the corridor is shown. + /// + public BooleanCesiumWriter OpenShowProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(ShowWriter); + } + + /// + /// Writes a value for the show property as a boolean value. The show property specifies whether or not the corridor is shown. + /// + /// The value. + public void WriteShowProperty(bool value) + { + using (var writer = OpenShowProperty()) + { + writer.WriteBoolean(value); + } + } + + /// + /// Writes a value for the show property as a reference value. The show property specifies whether or not the corridor is shown. + /// + /// The reference. + public void WriteShowPropertyReference(Reference value) + { + using (var writer = OpenShowProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the show property as a reference value. The show property specifies whether or not the corridor is shown. + /// + /// The earliest date of the interval. + public void WriteShowPropertyReference(string value) + { + using (var writer = OpenShowProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the show property as a reference value. The show property specifies whether or not the corridor is shown. + /// + /// The identifier of the object which contains the referenced property. + /// The property on the referenced object. + public void WriteShowPropertyReference(string identifier, string propertyName) + { + using (var writer = OpenShowProperty()) + { + writer.WriteReference(identifier, propertyName); + } + } + + /// + /// Writes a value for the show property as a reference value. The show property specifies whether or not the corridor is shown. + /// + /// The identifier of the object which contains the referenced property. + /// The hierarchy of properties to be indexed on the referenced object. + public void WriteShowPropertyReference(string identifier, string[] propertyNames) + { + using (var writer = OpenShowProperty()) + { + writer.WriteReference(identifier, propertyNames); + } + } + + /// + /// Gets the writer for the width property. The returned instance must be opened by calling the method before it can be used for writing. The width property defines the width of the corridor, which is the distance between the edges of the corridor. + /// + public DoubleCesiumWriter WidthWriter + { + get { return m_width.Value; } + } + + /// + /// Opens and returns the writer for the width property. The width property defines the width of the corridor, which is the distance between the edges of the corridor. + /// + public DoubleCesiumWriter OpenWidthProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(WidthWriter); + } + + /// + /// Writes a value for the width property as a number value. The width property specifies the width of the corridor, which is the distance between the edges of the corridor. + /// + /// The value. + public void WriteWidthProperty(double value) + { + using (var writer = OpenWidthProperty()) + { + writer.WriteNumber(value); + } + } + + /// + /// Writes a value for the width property as a number value. The width property specifies the width of the corridor, which is the distance between the edges of the corridor. + /// + /// The dates at which the value is specified. + /// The value corresponding to each date. + /// The index of the first element to use in the `values` collection. + /// The number of elements to use from the `values` collection. + public void WriteWidthProperty(IList dates, IList values, int startIndex, int length) + { + using (var writer = OpenWidthProperty()) + { + writer.WriteNumber(dates, values, startIndex, length); + } + } + + /// + /// Writes a value for the width property as a reference value. The width property specifies the width of the corridor, which is the distance between the edges of the corridor. + /// + /// The reference. + public void WriteWidthPropertyReference(Reference value) + { + using (var writer = OpenWidthProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the width property as a reference value. The width property specifies the width of the corridor, which is the distance between the edges of the corridor. + /// + /// The earliest date of the interval. + public void WriteWidthPropertyReference(string value) + { + using (var writer = OpenWidthProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the width property as a reference value. The width property specifies the width of the corridor, which is the distance between the edges of the corridor. + /// + /// The identifier of the object which contains the referenced property. + /// The property on the referenced object. + public void WriteWidthPropertyReference(string identifier, string propertyName) + { + using (var writer = OpenWidthProperty()) + { + writer.WriteReference(identifier, propertyName); + } + } + + /// + /// Writes a value for the width property as a reference value. The width property specifies the width of the corridor, which is the distance between the edges of the corridor. + /// + /// The identifier of the object which contains the referenced property. + /// The hierarchy of properties to be indexed on the referenced object. + public void WriteWidthPropertyReference(string identifier, string[] propertyNames) + { + using (var writer = OpenWidthProperty()) + { + writer.WriteReference(identifier, propertyNames); + } + } + + /// + /// Gets the writer for the height property. The returned instance must be opened by calling the method before it can be used for writing. The height property defines the height of the corridor, which is the altitude of the corridor relative to the surface. + /// + public DoubleCesiumWriter HeightWriter + { + get { return m_height.Value; } + } + + /// + /// Opens and returns the writer for the height property. The height property defines the height of the corridor, which is the altitude of the corridor relative to the surface. + /// + public DoubleCesiumWriter OpenHeightProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(HeightWriter); + } + + /// + /// Writes a value for the height property as a number value. The height property specifies the height of the corridor, which is the altitude of the corridor relative to the surface. + /// + /// The value. + public void WriteHeightProperty(double value) + { + using (var writer = OpenHeightProperty()) + { + writer.WriteNumber(value); + } + } + + /// + /// Writes a value for the height property as a number value. The height property specifies the height of the corridor, which is the altitude of the corridor relative to the surface. + /// + /// The dates at which the value is specified. + /// The value corresponding to each date. + /// The index of the first element to use in the `values` collection. + /// The number of elements to use from the `values` collection. + public void WriteHeightProperty(IList dates, IList values, int startIndex, int length) + { + using (var writer = OpenHeightProperty()) + { + writer.WriteNumber(dates, values, startIndex, length); + } + } + + /// + /// Writes a value for the height property as a reference value. The height property specifies the height of the corridor, which is the altitude of the corridor relative to the surface. + /// + /// The reference. + public void WriteHeightPropertyReference(Reference value) + { + using (var writer = OpenHeightProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the height property as a reference value. The height property specifies the height of the corridor, which is the altitude of the corridor relative to the surface. + /// + /// The earliest date of the interval. + public void WriteHeightPropertyReference(string value) + { + using (var writer = OpenHeightProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the height property as a reference value. The height property specifies the height of the corridor, which is the altitude of the corridor relative to the surface. + /// + /// The identifier of the object which contains the referenced property. + /// The property on the referenced object. + public void WriteHeightPropertyReference(string identifier, string propertyName) + { + using (var writer = OpenHeightProperty()) + { + writer.WriteReference(identifier, propertyName); + } + } + + /// + /// Writes a value for the height property as a reference value. The height property specifies the height of the corridor, which is the altitude of the corridor relative to the surface. + /// + /// The identifier of the object which contains the referenced property. + /// The hierarchy of properties to be indexed on the referenced object. + public void WriteHeightPropertyReference(string identifier, string[] propertyNames) + { + using (var writer = OpenHeightProperty()) + { + writer.WriteReference(identifier, propertyNames); + } + } + + /// + /// Gets the writer for the extrudedHeight property. The returned instance must be opened by calling the method before it can be used for writing. The extrudedHeight property defines the extruded height of the corridor, which is the altitude of the corridor's extruded face relative to the surface. + /// + public DoubleCesiumWriter ExtrudedHeightWriter + { + get { return m_extrudedHeight.Value; } + } + + /// + /// Opens and returns the writer for the extrudedHeight property. The extrudedHeight property defines the extruded height of the corridor, which is the altitude of the corridor's extruded face relative to the surface. + /// + public DoubleCesiumWriter OpenExtrudedHeightProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(ExtrudedHeightWriter); + } + + /// + /// Writes a value for the extrudedHeight property as a number value. The extrudedHeight property specifies the extruded height of the corridor, which is the altitude of the corridor's extruded face relative to the surface. + /// + /// The value. + public void WriteExtrudedHeightProperty(double value) + { + using (var writer = OpenExtrudedHeightProperty()) + { + writer.WriteNumber(value); + } + } + + /// + /// Writes a value for the extrudedHeight property as a number value. The extrudedHeight property specifies the extruded height of the corridor, which is the altitude of the corridor's extruded face relative to the surface. + /// + /// The dates at which the value is specified. + /// The value corresponding to each date. + /// The index of the first element to use in the `values` collection. + /// The number of elements to use from the `values` collection. + public void WriteExtrudedHeightProperty(IList dates, IList values, int startIndex, int length) + { + using (var writer = OpenExtrudedHeightProperty()) + { + writer.WriteNumber(dates, values, startIndex, length); + } + } + + /// + /// Writes a value for the extrudedHeight property as a reference value. The extrudedHeight property specifies the extruded height of the corridor, which is the altitude of the corridor's extruded face relative to the surface. + /// + /// The reference. + public void WriteExtrudedHeightPropertyReference(Reference value) + { + using (var writer = OpenExtrudedHeightProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the extrudedHeight property as a reference value. The extrudedHeight property specifies the extruded height of the corridor, which is the altitude of the corridor's extruded face relative to the surface. + /// + /// The earliest date of the interval. + public void WriteExtrudedHeightPropertyReference(string value) + { + using (var writer = OpenExtrudedHeightProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the extrudedHeight property as a reference value. The extrudedHeight property specifies the extruded height of the corridor, which is the altitude of the corridor's extruded face relative to the surface. + /// + /// The identifier of the object which contains the referenced property. + /// The property on the referenced object. + public void WriteExtrudedHeightPropertyReference(string identifier, string propertyName) + { + using (var writer = OpenExtrudedHeightProperty()) + { + writer.WriteReference(identifier, propertyName); + } + } + + /// + /// Writes a value for the extrudedHeight property as a reference value. The extrudedHeight property specifies the extruded height of the corridor, which is the altitude of the corridor's extruded face relative to the surface. + /// + /// The identifier of the object which contains the referenced property. + /// The hierarchy of properties to be indexed on the referenced object. + public void WriteExtrudedHeightPropertyReference(string identifier, string[] propertyNames) + { + using (var writer = OpenExtrudedHeightProperty()) + { + writer.WriteReference(identifier, propertyNames); + } + } + + /// + /// Gets the writer for the cornerType property. The returned instance must be opened by calling the method before it can be used for writing. The cornerType property defines the style of the corners of the corridor. + /// + public CornerTypeCesiumWriter CornerTypeWriter + { + get { return m_cornerType.Value; } + } + + /// + /// Opens and returns the writer for the cornerType property. The cornerType property defines the style of the corners of the corridor. + /// + public CornerTypeCesiumWriter OpenCornerTypeProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(CornerTypeWriter); + } + + /// + /// Writes a value for the cornerType property as a CornerType value. The cornerType property specifies the style of the corners of the corridor. + /// + /// The style of a corner. + public void WriteCornerTypeProperty(CesiumCornerType value) + { + using (var writer = OpenCornerTypeProperty()) + { + writer.WriteCornerType(value); + } + } + + /// + /// Writes a value for the cornerType property as a reference value. The cornerType property specifies the style of the corners of the corridor. + /// + /// The reference. + public void WriteCornerTypePropertyReference(Reference value) + { + using (var writer = OpenCornerTypeProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the cornerType property as a reference value. The cornerType property specifies the style of the corners of the corridor. + /// + /// The earliest date of the interval. + public void WriteCornerTypePropertyReference(string value) + { + using (var writer = OpenCornerTypeProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the cornerType property as a reference value. The cornerType property specifies the style of the corners of the corridor. + /// + /// The identifier of the object which contains the referenced property. + /// The property on the referenced object. + public void WriteCornerTypePropertyReference(string identifier, string propertyName) + { + using (var writer = OpenCornerTypeProperty()) + { + writer.WriteReference(identifier, propertyName); + } + } + + /// + /// Writes a value for the cornerType property as a reference value. The cornerType property specifies the style of the corners of the corridor. + /// + /// The identifier of the object which contains the referenced property. + /// The hierarchy of properties to be indexed on the referenced object. + public void WriteCornerTypePropertyReference(string identifier, string[] propertyNames) + { + using (var writer = OpenCornerTypeProperty()) + { + writer.WriteReference(identifier, propertyNames); + } + } + + /// + /// Gets the writer for the granularity property. The returned instance must be opened by calling the method before it can be used for writing. The granularity property defines the sampling distance, in radians. + /// + public DoubleCesiumWriter GranularityWriter + { + get { return m_granularity.Value; } + } + + /// + /// Opens and returns the writer for the granularity property. The granularity property defines the sampling distance, in radians. + /// + public DoubleCesiumWriter OpenGranularityProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(GranularityWriter); + } + + /// + /// Writes a value for the granularity property as a number value. The granularity property specifies the sampling distance, in radians. + /// + /// The value. + public void WriteGranularityProperty(double value) + { + using (var writer = OpenGranularityProperty()) + { + writer.WriteNumber(value); + } + } + + /// + /// Writes a value for the granularity property as a number value. The granularity property specifies the sampling distance, in radians. + /// + /// The dates at which the value is specified. + /// The value corresponding to each date. + /// The index of the first element to use in the `values` collection. + /// The number of elements to use from the `values` collection. + public void WriteGranularityProperty(IList dates, IList values, int startIndex, int length) + { + using (var writer = OpenGranularityProperty()) + { + writer.WriteNumber(dates, values, startIndex, length); + } + } + + /// + /// Writes a value for the granularity property as a reference value. The granularity property specifies the sampling distance, in radians. + /// + /// The reference. + public void WriteGranularityPropertyReference(Reference value) + { + using (var writer = OpenGranularityProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the granularity property as a reference value. The granularity property specifies the sampling distance, in radians. + /// + /// The earliest date of the interval. + public void WriteGranularityPropertyReference(string value) + { + using (var writer = OpenGranularityProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the granularity property as a reference value. The granularity property specifies the sampling distance, in radians. + /// + /// The identifier of the object which contains the referenced property. + /// The property on the referenced object. + public void WriteGranularityPropertyReference(string identifier, string propertyName) + { + using (var writer = OpenGranularityProperty()) + { + writer.WriteReference(identifier, propertyName); + } + } + + /// + /// Writes a value for the granularity property as a reference value. The granularity property specifies the sampling distance, in radians. + /// + /// The identifier of the object which contains the referenced property. + /// The hierarchy of properties to be indexed on the referenced object. + public void WriteGranularityPropertyReference(string identifier, string[] propertyNames) + { + using (var writer = OpenGranularityProperty()) + { + writer.WriteReference(identifier, propertyNames); + } + } + + /// + /// Gets the writer for the fill property. The returned instance must be opened by calling the method before it can be used for writing. The fill property defines whether or not the corridor is filled. + /// + public BooleanCesiumWriter FillWriter + { + get { return m_fill.Value; } + } + + /// + /// Opens and returns the writer for the fill property. The fill property defines whether or not the corridor is filled. + /// + public BooleanCesiumWriter OpenFillProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(FillWriter); + } + + /// + /// Writes a value for the fill property as a boolean value. The fill property specifies whether or not the corridor is filled. + /// + /// The value. + public void WriteFillProperty(bool value) + { + using (var writer = OpenFillProperty()) + { + writer.WriteBoolean(value); + } + } + + /// + /// Writes a value for the fill property as a reference value. The fill property specifies whether or not the corridor is filled. + /// + /// The reference. + public void WriteFillPropertyReference(Reference value) + { + using (var writer = OpenFillProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the fill property as a reference value. The fill property specifies whether or not the corridor is filled. + /// + /// The earliest date of the interval. + public void WriteFillPropertyReference(string value) + { + using (var writer = OpenFillProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the fill property as a reference value. The fill property specifies whether or not the corridor is filled. + /// + /// The identifier of the object which contains the referenced property. + /// The property on the referenced object. + public void WriteFillPropertyReference(string identifier, string propertyName) + { + using (var writer = OpenFillProperty()) + { + writer.WriteReference(identifier, propertyName); + } + } + + /// + /// Writes a value for the fill property as a reference value. The fill property specifies whether or not the corridor is filled. + /// + /// The identifier of the object which contains the referenced property. + /// The hierarchy of properties to be indexed on the referenced object. + public void WriteFillPropertyReference(string identifier, string[] propertyNames) + { + using (var writer = OpenFillProperty()) + { + writer.WriteReference(identifier, propertyNames); + } + } + + /// + /// Gets the writer for the material property. The returned instance must be opened by calling the method before it can be used for writing. The material property defines the material to display on the surface of the corridor. + /// + public MaterialCesiumWriter MaterialWriter + { + get { return m_material.Value; } + } + + /// + /// Opens and returns the writer for the material property. The material property defines the material to display on the surface of the corridor. + /// + public MaterialCesiumWriter OpenMaterialProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(MaterialWriter); + } + + /// + /// Gets the writer for the outline property. The returned instance must be opened by calling the method before it can be used for writing. The outline property defines whether or not the corridor is outlined. + /// + public BooleanCesiumWriter OutlineWriter + { + get { return m_outline.Value; } + } + + /// + /// Opens and returns the writer for the outline property. The outline property defines whether or not the corridor is outlined. + /// + public BooleanCesiumWriter OpenOutlineProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(OutlineWriter); + } + + /// + /// Writes a value for the outline property as a boolean value. The outline property specifies whether or not the corridor is outlined. + /// + /// The value. + public void WriteOutlineProperty(bool value) + { + using (var writer = OpenOutlineProperty()) + { + writer.WriteBoolean(value); + } + } + + /// + /// Writes a value for the outline property as a reference value. The outline property specifies whether or not the corridor is outlined. + /// + /// The reference. + public void WriteOutlinePropertyReference(Reference value) + { + using (var writer = OpenOutlineProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the outline property as a reference value. The outline property specifies whether or not the corridor is outlined. + /// + /// The earliest date of the interval. + public void WriteOutlinePropertyReference(string value) + { + using (var writer = OpenOutlineProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the outline property as a reference value. The outline property specifies whether or not the corridor is outlined. + /// + /// The identifier of the object which contains the referenced property. + /// The property on the referenced object. + public void WriteOutlinePropertyReference(string identifier, string propertyName) + { + using (var writer = OpenOutlineProperty()) + { + writer.WriteReference(identifier, propertyName); + } + } + + /// + /// Writes a value for the outline property as a reference value. The outline property specifies whether or not the corridor is outlined. + /// + /// The identifier of the object which contains the referenced property. + /// The hierarchy of properties to be indexed on the referenced object. + public void WriteOutlinePropertyReference(string identifier, string[] propertyNames) + { + using (var writer = OpenOutlineProperty()) + { + writer.WriteReference(identifier, propertyNames); + } + } + + /// + /// Gets the writer for the outlineColor property. The returned instance must be opened by calling the method before it can be used for writing. The outlineColor property defines the color of the corridor outline. + /// + public ColorCesiumWriter OutlineColorWriter + { + get { return m_outlineColor.Value; } + } + + /// + /// Opens and returns the writer for the outlineColor property. The outlineColor property defines the color of the corridor outline. + /// + public ColorCesiumWriter OpenOutlineColorProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(OutlineColorWriter); + } + + /// + /// Writes a value for the outlineColor property as a rgba value. The outlineColor property specifies the color of the corridor outline. + /// + /// The color. + public void WriteOutlineColorProperty(Color color) + { + using (var writer = OpenOutlineColorProperty()) + { + writer.WriteRgba(color); + } + } + + /// + /// Writes a value for the outlineColor property as a rgba value. The outlineColor property specifies the color of the corridor outline. + /// + /// The red component in the range 0 to 255. + /// The green component in the range 0 to 255. + /// The blue component in the range 0 to 255. + /// The alpha component in the range 0 to 255. + public void WriteOutlineColorProperty(int red, int green, int blue, int alpha) + { + using (var writer = OpenOutlineColorProperty()) + { + writer.WriteRgba(red, green, blue, alpha); + } + } + + /// + /// Writes a value for the outlineColor property as a rgba value. The outlineColor property specifies the color of the corridor outline. + /// + /// The dates at which the value is specified. + /// The color corresponding to each date. + /// The index of the first element to use in the `colors` collection. + /// The number of elements to use from the `colors` collection. + public void WriteOutlineColorProperty(IList dates, IList colors, int startIndex, int length) + { + using (var writer = OpenOutlineColorProperty()) + { + writer.WriteRgba(dates, colors, startIndex, length); + } + } + + /// + /// Writes a value for the outlineColor property as a rgbaf value. The outlineColor property specifies the color of the corridor outline. + /// + /// The red component in the range 0 to 1.0. + /// The green component in the range 0 to 1.0. + /// The blue component in the range 0 to 1.0. + /// The alpha component in the range 0 to 1.0. + public void WriteOutlineColorPropertyRgbaf(float red, float green, float blue, float alpha) + { + using (var writer = OpenOutlineColorProperty()) + { + writer.WriteRgbaf(red, green, blue, alpha); + } + } + + /// + /// Writes a value for the outlineColor property as a reference value. The outlineColor property specifies the color of the corridor outline. + /// + /// The reference. + public void WriteOutlineColorPropertyReference(Reference value) + { + using (var writer = OpenOutlineColorProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the outlineColor property as a reference value. The outlineColor property specifies the color of the corridor outline. + /// + /// The earliest date of the interval. + public void WriteOutlineColorPropertyReference(string value) + { + using (var writer = OpenOutlineColorProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the outlineColor property as a reference value. The outlineColor property specifies the color of the corridor outline. + /// + /// The identifier of the object which contains the referenced property. + /// The property on the referenced object. + public void WriteOutlineColorPropertyReference(string identifier, string propertyName) + { + using (var writer = OpenOutlineColorProperty()) + { + writer.WriteReference(identifier, propertyName); + } + } + + /// + /// Writes a value for the outlineColor property as a reference value. The outlineColor property specifies the color of the corridor outline. + /// + /// The identifier of the object which contains the referenced property. + /// The hierarchy of properties to be indexed on the referenced object. + public void WriteOutlineColorPropertyReference(string identifier, string[] propertyNames) + { + using (var writer = OpenOutlineColorProperty()) + { + writer.WriteReference(identifier, propertyNames); + } + } + + /// + /// Gets the writer for the outlineWidth property. The returned instance must be opened by calling the method before it can be used for writing. The outlineWidth property defines the width of the corridor outline. + /// + public DoubleCesiumWriter OutlineWidthWriter + { + get { return m_outlineWidth.Value; } + } + + /// + /// Opens and returns the writer for the outlineWidth property. The outlineWidth property defines the width of the corridor outline. + /// + public DoubleCesiumWriter OpenOutlineWidthProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(OutlineWidthWriter); + } + + /// + /// Writes a value for the outlineWidth property as a number value. The outlineWidth property specifies the width of the corridor outline. + /// + /// The value. + public void WriteOutlineWidthProperty(double value) + { + using (var writer = OpenOutlineWidthProperty()) + { + writer.WriteNumber(value); + } + } + + /// + /// Writes a value for the outlineWidth property as a number value. The outlineWidth property specifies the width of the corridor outline. + /// + /// The dates at which the value is specified. + /// The value corresponding to each date. + /// The index of the first element to use in the `values` collection. + /// The number of elements to use from the `values` collection. + public void WriteOutlineWidthProperty(IList dates, IList values, int startIndex, int length) + { + using (var writer = OpenOutlineWidthProperty()) + { + writer.WriteNumber(dates, values, startIndex, length); + } + } + + /// + /// Writes a value for the outlineWidth property as a reference value. The outlineWidth property specifies the width of the corridor outline. + /// + /// The reference. + public void WriteOutlineWidthPropertyReference(Reference value) + { + using (var writer = OpenOutlineWidthProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the outlineWidth property as a reference value. The outlineWidth property specifies the width of the corridor outline. + /// + /// The earliest date of the interval. + public void WriteOutlineWidthPropertyReference(string value) + { + using (var writer = OpenOutlineWidthProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the outlineWidth property as a reference value. The outlineWidth property specifies the width of the corridor outline. + /// + /// The identifier of the object which contains the referenced property. + /// The property on the referenced object. + public void WriteOutlineWidthPropertyReference(string identifier, string propertyName) + { + using (var writer = OpenOutlineWidthProperty()) + { + writer.WriteReference(identifier, propertyName); + } + } + + /// + /// Writes a value for the outlineWidth property as a reference value. The outlineWidth property specifies the width of the corridor outline. + /// + /// The identifier of the object which contains the referenced property. + /// The hierarchy of properties to be indexed on the referenced object. + public void WriteOutlineWidthPropertyReference(string identifier, string[] propertyNames) + { + using (var writer = OpenOutlineWidthProperty()) + { + writer.WriteReference(identifier, propertyNames); + } + } + + } +} diff --git a/DotNet/CesiumLanguageWriter/Generated/CylinderCesiumWriter.cs b/DotNet/CesiumLanguageWriter/Generated/CylinderCesiumWriter.cs new file mode 100644 index 00000000..912bb829 --- /dev/null +++ b/DotNet/CesiumLanguageWriter/Generated/CylinderCesiumWriter.cs @@ -0,0 +1,849 @@ +// This file was generated automatically by GenerateFromSchema. Do NOT edit it. +// https://github.com/AnalyticalGraphicsInc/czml-writer + +using CesiumLanguageWriter.Advanced; +using System; +using System.Collections.Generic; +using System.Drawing; + +namespace CesiumLanguageWriter +{ + /// + /// Writes a Cylinder to a . A Cylinder is a cylinder. + /// + public class CylinderCesiumWriter : CesiumPropertyWriter + { + /// + /// The name of the show property. + /// + public const string ShowPropertyName = "show"; + + /// + /// The name of the length property. + /// + public const string LengthPropertyName = "length"; + + /// + /// The name of the topRadius property. + /// + public const string TopRadiusPropertyName = "topRadius"; + + /// + /// The name of the bottomRadius property. + /// + public const string BottomRadiusPropertyName = "bottomRadius"; + + /// + /// The name of the fill property. + /// + public const string FillPropertyName = "fill"; + + /// + /// The name of the material property. + /// + public const string MaterialPropertyName = "material"; + + /// + /// The name of the outline property. + /// + public const string OutlinePropertyName = "outline"; + + /// + /// The name of the outlineColor property. + /// + public const string OutlineColorPropertyName = "outlineColor"; + + /// + /// The name of the outlineWidth property. + /// + public const string OutlineWidthPropertyName = "outlineWidth"; + + private readonly Lazy m_show = new Lazy(() => new BooleanCesiumWriter(ShowPropertyName), false); + private readonly Lazy m_length = new Lazy(() => new DoubleCesiumWriter(LengthPropertyName), false); + private readonly Lazy m_topRadius = new Lazy(() => new DoubleCesiumWriter(TopRadiusPropertyName), false); + private readonly Lazy m_bottomRadius = new Lazy(() => new DoubleCesiumWriter(BottomRadiusPropertyName), false); + private readonly Lazy m_fill = new Lazy(() => new BooleanCesiumWriter(FillPropertyName), false); + private readonly Lazy m_material = new Lazy(() => new MaterialCesiumWriter(MaterialPropertyName), false); + private readonly Lazy m_outline = new Lazy(() => new BooleanCesiumWriter(OutlinePropertyName), false); + private readonly Lazy m_outlineColor = new Lazy(() => new ColorCesiumWriter(OutlineColorPropertyName), false); + private readonly Lazy m_outlineWidth = new Lazy(() => new DoubleCesiumWriter(OutlineWidthPropertyName), false); + + /// + /// Initializes a new instance. + /// + public CylinderCesiumWriter(string propertyName) + : base(propertyName) + { + } + + /// + /// Initializes a new instance as a copy of an existing instance. + /// + /// The existing instance to copy. + protected CylinderCesiumWriter(CylinderCesiumWriter existingInstance) + : base(existingInstance) + { + } + + /// + public override CylinderCesiumWriter Clone() + { + return new CylinderCesiumWriter(this); + } + + /// + /// Gets the writer for the show property. The returned instance must be opened by calling the method before it can be used for writing. The show property defines whether or not the cylinder is shown. + /// + public BooleanCesiumWriter ShowWriter + { + get { return m_show.Value; } + } + + /// + /// Opens and returns the writer for the show property. The show property defines whether or not the cylinder is shown. + /// + public BooleanCesiumWriter OpenShowProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(ShowWriter); + } + + /// + /// Writes a value for the show property as a boolean value. The show property specifies whether or not the cylinder is shown. + /// + /// The value. + public void WriteShowProperty(bool value) + { + using (var writer = OpenShowProperty()) + { + writer.WriteBoolean(value); + } + } + + /// + /// Writes a value for the show property as a reference value. The show property specifies whether or not the cylinder is shown. + /// + /// The reference. + public void WriteShowPropertyReference(Reference value) + { + using (var writer = OpenShowProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the show property as a reference value. The show property specifies whether or not the cylinder is shown. + /// + /// The earliest date of the interval. + public void WriteShowPropertyReference(string value) + { + using (var writer = OpenShowProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the show property as a reference value. The show property specifies whether or not the cylinder is shown. + /// + /// The identifier of the object which contains the referenced property. + /// The property on the referenced object. + public void WriteShowPropertyReference(string identifier, string propertyName) + { + using (var writer = OpenShowProperty()) + { + writer.WriteReference(identifier, propertyName); + } + } + + /// + /// Writes a value for the show property as a reference value. The show property specifies whether or not the cylinder is shown. + /// + /// The identifier of the object which contains the referenced property. + /// The hierarchy of properties to be indexed on the referenced object. + public void WriteShowPropertyReference(string identifier, string[] propertyNames) + { + using (var writer = OpenShowProperty()) + { + writer.WriteReference(identifier, propertyNames); + } + } + + /// + /// Gets the writer for the length property. The returned instance must be opened by calling the method before it can be used for writing. The length property defines the length of the cylinder. + /// + public DoubleCesiumWriter LengthWriter + { + get { return m_length.Value; } + } + + /// + /// Opens and returns the writer for the length property. The length property defines the length of the cylinder. + /// + public DoubleCesiumWriter OpenLengthProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(LengthWriter); + } + + /// + /// Writes a value for the length property as a number value. The length property specifies the length of the cylinder. + /// + /// The value. + public void WriteLengthProperty(double value) + { + using (var writer = OpenLengthProperty()) + { + writer.WriteNumber(value); + } + } + + /// + /// Writes a value for the length property as a number value. The length property specifies the length of the cylinder. + /// + /// The dates at which the value is specified. + /// The value corresponding to each date. + /// The index of the first element to use in the `values` collection. + /// The number of elements to use from the `values` collection. + public void WriteLengthProperty(IList dates, IList values, int startIndex, int length) + { + using (var writer = OpenLengthProperty()) + { + writer.WriteNumber(dates, values, startIndex, length); + } + } + + /// + /// Writes a value for the length property as a reference value. The length property specifies the length of the cylinder. + /// + /// The reference. + public void WriteLengthPropertyReference(Reference value) + { + using (var writer = OpenLengthProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the length property as a reference value. The length property specifies the length of the cylinder. + /// + /// The earliest date of the interval. + public void WriteLengthPropertyReference(string value) + { + using (var writer = OpenLengthProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the length property as a reference value. The length property specifies the length of the cylinder. + /// + /// The identifier of the object which contains the referenced property. + /// The property on the referenced object. + public void WriteLengthPropertyReference(string identifier, string propertyName) + { + using (var writer = OpenLengthProperty()) + { + writer.WriteReference(identifier, propertyName); + } + } + + /// + /// Writes a value for the length property as a reference value. The length property specifies the length of the cylinder. + /// + /// The identifier of the object which contains the referenced property. + /// The hierarchy of properties to be indexed on the referenced object. + public void WriteLengthPropertyReference(string identifier, string[] propertyNames) + { + using (var writer = OpenLengthProperty()) + { + writer.WriteReference(identifier, propertyNames); + } + } + + /// + /// Gets the writer for the topRadius property. The returned instance must be opened by calling the method before it can be used for writing. The topRadius property defines the radius of the top of the cylinder. + /// + public DoubleCesiumWriter TopRadiusWriter + { + get { return m_topRadius.Value; } + } + + /// + /// Opens and returns the writer for the topRadius property. The topRadius property defines the radius of the top of the cylinder. + /// + public DoubleCesiumWriter OpenTopRadiusProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(TopRadiusWriter); + } + + /// + /// Writes a value for the topRadius property as a number value. The topRadius property specifies the radius of the top of the cylinder. + /// + /// The value. + public void WriteTopRadiusProperty(double value) + { + using (var writer = OpenTopRadiusProperty()) + { + writer.WriteNumber(value); + } + } + + /// + /// Writes a value for the topRadius property as a number value. The topRadius property specifies the radius of the top of the cylinder. + /// + /// The dates at which the value is specified. + /// The value corresponding to each date. + /// The index of the first element to use in the `values` collection. + /// The number of elements to use from the `values` collection. + public void WriteTopRadiusProperty(IList dates, IList values, int startIndex, int length) + { + using (var writer = OpenTopRadiusProperty()) + { + writer.WriteNumber(dates, values, startIndex, length); + } + } + + /// + /// Writes a value for the topRadius property as a reference value. The topRadius property specifies the radius of the top of the cylinder. + /// + /// The reference. + public void WriteTopRadiusPropertyReference(Reference value) + { + using (var writer = OpenTopRadiusProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the topRadius property as a reference value. The topRadius property specifies the radius of the top of the cylinder. + /// + /// The earliest date of the interval. + public void WriteTopRadiusPropertyReference(string value) + { + using (var writer = OpenTopRadiusProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the topRadius property as a reference value. The topRadius property specifies the radius of the top of the cylinder. + /// + /// The identifier of the object which contains the referenced property. + /// The property on the referenced object. + public void WriteTopRadiusPropertyReference(string identifier, string propertyName) + { + using (var writer = OpenTopRadiusProperty()) + { + writer.WriteReference(identifier, propertyName); + } + } + + /// + /// Writes a value for the topRadius property as a reference value. The topRadius property specifies the radius of the top of the cylinder. + /// + /// The identifier of the object which contains the referenced property. + /// The hierarchy of properties to be indexed on the referenced object. + public void WriteTopRadiusPropertyReference(string identifier, string[] propertyNames) + { + using (var writer = OpenTopRadiusProperty()) + { + writer.WriteReference(identifier, propertyNames); + } + } + + /// + /// Gets the writer for the bottomRadius property. The returned instance must be opened by calling the method before it can be used for writing. The bottomRadius property defines the radius of the bottom of the cylinder. + /// + public DoubleCesiumWriter BottomRadiusWriter + { + get { return m_bottomRadius.Value; } + } + + /// + /// Opens and returns the writer for the bottomRadius property. The bottomRadius property defines the radius of the bottom of the cylinder. + /// + public DoubleCesiumWriter OpenBottomRadiusProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(BottomRadiusWriter); + } + + /// + /// Writes a value for the bottomRadius property as a number value. The bottomRadius property specifies the radius of the bottom of the cylinder. + /// + /// The value. + public void WriteBottomRadiusProperty(double value) + { + using (var writer = OpenBottomRadiusProperty()) + { + writer.WriteNumber(value); + } + } + + /// + /// Writes a value for the bottomRadius property as a number value. The bottomRadius property specifies the radius of the bottom of the cylinder. + /// + /// The dates at which the value is specified. + /// The value corresponding to each date. + /// The index of the first element to use in the `values` collection. + /// The number of elements to use from the `values` collection. + public void WriteBottomRadiusProperty(IList dates, IList values, int startIndex, int length) + { + using (var writer = OpenBottomRadiusProperty()) + { + writer.WriteNumber(dates, values, startIndex, length); + } + } + + /// + /// Writes a value for the bottomRadius property as a reference value. The bottomRadius property specifies the radius of the bottom of the cylinder. + /// + /// The reference. + public void WriteBottomRadiusPropertyReference(Reference value) + { + using (var writer = OpenBottomRadiusProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the bottomRadius property as a reference value. The bottomRadius property specifies the radius of the bottom of the cylinder. + /// + /// The earliest date of the interval. + public void WriteBottomRadiusPropertyReference(string value) + { + using (var writer = OpenBottomRadiusProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the bottomRadius property as a reference value. The bottomRadius property specifies the radius of the bottom of the cylinder. + /// + /// The identifier of the object which contains the referenced property. + /// The property on the referenced object. + public void WriteBottomRadiusPropertyReference(string identifier, string propertyName) + { + using (var writer = OpenBottomRadiusProperty()) + { + writer.WriteReference(identifier, propertyName); + } + } + + /// + /// Writes a value for the bottomRadius property as a reference value. The bottomRadius property specifies the radius of the bottom of the cylinder. + /// + /// The identifier of the object which contains the referenced property. + /// The hierarchy of properties to be indexed on the referenced object. + public void WriteBottomRadiusPropertyReference(string identifier, string[] propertyNames) + { + using (var writer = OpenBottomRadiusProperty()) + { + writer.WriteReference(identifier, propertyNames); + } + } + + /// + /// Gets the writer for the fill property. The returned instance must be opened by calling the method before it can be used for writing. The fill property defines whether or not the cylinder is filled. + /// + public BooleanCesiumWriter FillWriter + { + get { return m_fill.Value; } + } + + /// + /// Opens and returns the writer for the fill property. The fill property defines whether or not the cylinder is filled. + /// + public BooleanCesiumWriter OpenFillProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(FillWriter); + } + + /// + /// Writes a value for the fill property as a boolean value. The fill property specifies whether or not the cylinder is filled. + /// + /// The value. + public void WriteFillProperty(bool value) + { + using (var writer = OpenFillProperty()) + { + writer.WriteBoolean(value); + } + } + + /// + /// Writes a value for the fill property as a reference value. The fill property specifies whether or not the cylinder is filled. + /// + /// The reference. + public void WriteFillPropertyReference(Reference value) + { + using (var writer = OpenFillProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the fill property as a reference value. The fill property specifies whether or not the cylinder is filled. + /// + /// The earliest date of the interval. + public void WriteFillPropertyReference(string value) + { + using (var writer = OpenFillProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the fill property as a reference value. The fill property specifies whether or not the cylinder is filled. + /// + /// The identifier of the object which contains the referenced property. + /// The property on the referenced object. + public void WriteFillPropertyReference(string identifier, string propertyName) + { + using (var writer = OpenFillProperty()) + { + writer.WriteReference(identifier, propertyName); + } + } + + /// + /// Writes a value for the fill property as a reference value. The fill property specifies whether or not the cylinder is filled. + /// + /// The identifier of the object which contains the referenced property. + /// The hierarchy of properties to be indexed on the referenced object. + public void WriteFillPropertyReference(string identifier, string[] propertyNames) + { + using (var writer = OpenFillProperty()) + { + writer.WriteReference(identifier, propertyNames); + } + } + + /// + /// Gets the writer for the material property. The returned instance must be opened by calling the method before it can be used for writing. The material property defines the material to display on the surface of the cylinder. + /// + public MaterialCesiumWriter MaterialWriter + { + get { return m_material.Value; } + } + + /// + /// Opens and returns the writer for the material property. The material property defines the material to display on the surface of the cylinder. + /// + public MaterialCesiumWriter OpenMaterialProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(MaterialWriter); + } + + /// + /// Gets the writer for the outline property. The returned instance must be opened by calling the method before it can be used for writing. The outline property defines whether or not the cylinder is outlined. + /// + public BooleanCesiumWriter OutlineWriter + { + get { return m_outline.Value; } + } + + /// + /// Opens and returns the writer for the outline property. The outline property defines whether or not the cylinder is outlined. + /// + public BooleanCesiumWriter OpenOutlineProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(OutlineWriter); + } + + /// + /// Writes a value for the outline property as a boolean value. The outline property specifies whether or not the cylinder is outlined. + /// + /// The value. + public void WriteOutlineProperty(bool value) + { + using (var writer = OpenOutlineProperty()) + { + writer.WriteBoolean(value); + } + } + + /// + /// Writes a value for the outline property as a reference value. The outline property specifies whether or not the cylinder is outlined. + /// + /// The reference. + public void WriteOutlinePropertyReference(Reference value) + { + using (var writer = OpenOutlineProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the outline property as a reference value. The outline property specifies whether or not the cylinder is outlined. + /// + /// The earliest date of the interval. + public void WriteOutlinePropertyReference(string value) + { + using (var writer = OpenOutlineProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the outline property as a reference value. The outline property specifies whether or not the cylinder is outlined. + /// + /// The identifier of the object which contains the referenced property. + /// The property on the referenced object. + public void WriteOutlinePropertyReference(string identifier, string propertyName) + { + using (var writer = OpenOutlineProperty()) + { + writer.WriteReference(identifier, propertyName); + } + } + + /// + /// Writes a value for the outline property as a reference value. The outline property specifies whether or not the cylinder is outlined. + /// + /// The identifier of the object which contains the referenced property. + /// The hierarchy of properties to be indexed on the referenced object. + public void WriteOutlinePropertyReference(string identifier, string[] propertyNames) + { + using (var writer = OpenOutlineProperty()) + { + writer.WriteReference(identifier, propertyNames); + } + } + + /// + /// Gets the writer for the outlineColor property. The returned instance must be opened by calling the method before it can be used for writing. The outlineColor property defines the color of the cylinder outline. + /// + public ColorCesiumWriter OutlineColorWriter + { + get { return m_outlineColor.Value; } + } + + /// + /// Opens and returns the writer for the outlineColor property. The outlineColor property defines the color of the cylinder outline. + /// + public ColorCesiumWriter OpenOutlineColorProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(OutlineColorWriter); + } + + /// + /// Writes a value for the outlineColor property as a rgba value. The outlineColor property specifies the color of the cylinder outline. + /// + /// The color. + public void WriteOutlineColorProperty(Color color) + { + using (var writer = OpenOutlineColorProperty()) + { + writer.WriteRgba(color); + } + } + + /// + /// Writes a value for the outlineColor property as a rgba value. The outlineColor property specifies the color of the cylinder outline. + /// + /// The red component in the range 0 to 255. + /// The green component in the range 0 to 255. + /// The blue component in the range 0 to 255. + /// The alpha component in the range 0 to 255. + public void WriteOutlineColorProperty(int red, int green, int blue, int alpha) + { + using (var writer = OpenOutlineColorProperty()) + { + writer.WriteRgba(red, green, blue, alpha); + } + } + + /// + /// Writes a value for the outlineColor property as a rgba value. The outlineColor property specifies the color of the cylinder outline. + /// + /// The dates at which the value is specified. + /// The color corresponding to each date. + /// The index of the first element to use in the `colors` collection. + /// The number of elements to use from the `colors` collection. + public void WriteOutlineColorProperty(IList dates, IList colors, int startIndex, int length) + { + using (var writer = OpenOutlineColorProperty()) + { + writer.WriteRgba(dates, colors, startIndex, length); + } + } + + /// + /// Writes a value for the outlineColor property as a rgbaf value. The outlineColor property specifies the color of the cylinder outline. + /// + /// The red component in the range 0 to 1.0. + /// The green component in the range 0 to 1.0. + /// The blue component in the range 0 to 1.0. + /// The alpha component in the range 0 to 1.0. + public void WriteOutlineColorPropertyRgbaf(float red, float green, float blue, float alpha) + { + using (var writer = OpenOutlineColorProperty()) + { + writer.WriteRgbaf(red, green, blue, alpha); + } + } + + /// + /// Writes a value for the outlineColor property as a reference value. The outlineColor property specifies the color of the cylinder outline. + /// + /// The reference. + public void WriteOutlineColorPropertyReference(Reference value) + { + using (var writer = OpenOutlineColorProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the outlineColor property as a reference value. The outlineColor property specifies the color of the cylinder outline. + /// + /// The earliest date of the interval. + public void WriteOutlineColorPropertyReference(string value) + { + using (var writer = OpenOutlineColorProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the outlineColor property as a reference value. The outlineColor property specifies the color of the cylinder outline. + /// + /// The identifier of the object which contains the referenced property. + /// The property on the referenced object. + public void WriteOutlineColorPropertyReference(string identifier, string propertyName) + { + using (var writer = OpenOutlineColorProperty()) + { + writer.WriteReference(identifier, propertyName); + } + } + + /// + /// Writes a value for the outlineColor property as a reference value. The outlineColor property specifies the color of the cylinder outline. + /// + /// The identifier of the object which contains the referenced property. + /// The hierarchy of properties to be indexed on the referenced object. + public void WriteOutlineColorPropertyReference(string identifier, string[] propertyNames) + { + using (var writer = OpenOutlineColorProperty()) + { + writer.WriteReference(identifier, propertyNames); + } + } + + /// + /// Gets the writer for the outlineWidth property. The returned instance must be opened by calling the method before it can be used for writing. The outlineWidth property defines the width of the cylinder outline. + /// + public DoubleCesiumWriter OutlineWidthWriter + { + get { return m_outlineWidth.Value; } + } + + /// + /// Opens and returns the writer for the outlineWidth property. The outlineWidth property defines the width of the cylinder outline. + /// + public DoubleCesiumWriter OpenOutlineWidthProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(OutlineWidthWriter); + } + + /// + /// Writes a value for the outlineWidth property as a number value. The outlineWidth property specifies the width of the cylinder outline. + /// + /// The value. + public void WriteOutlineWidthProperty(double value) + { + using (var writer = OpenOutlineWidthProperty()) + { + writer.WriteNumber(value); + } + } + + /// + /// Writes a value for the outlineWidth property as a number value. The outlineWidth property specifies the width of the cylinder outline. + /// + /// The dates at which the value is specified. + /// The value corresponding to each date. + /// The index of the first element to use in the `values` collection. + /// The number of elements to use from the `values` collection. + public void WriteOutlineWidthProperty(IList dates, IList values, int startIndex, int length) + { + using (var writer = OpenOutlineWidthProperty()) + { + writer.WriteNumber(dates, values, startIndex, length); + } + } + + /// + /// Writes a value for the outlineWidth property as a reference value. The outlineWidth property specifies the width of the cylinder outline. + /// + /// The reference. + public void WriteOutlineWidthPropertyReference(Reference value) + { + using (var writer = OpenOutlineWidthProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the outlineWidth property as a reference value. The outlineWidth property specifies the width of the cylinder outline. + /// + /// The earliest date of the interval. + public void WriteOutlineWidthPropertyReference(string value) + { + using (var writer = OpenOutlineWidthProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the outlineWidth property as a reference value. The outlineWidth property specifies the width of the cylinder outline. + /// + /// The identifier of the object which contains the referenced property. + /// The property on the referenced object. + public void WriteOutlineWidthPropertyReference(string identifier, string propertyName) + { + using (var writer = OpenOutlineWidthProperty()) + { + writer.WriteReference(identifier, propertyName); + } + } + + /// + /// Writes a value for the outlineWidth property as a reference value. The outlineWidth property specifies the width of the cylinder outline. + /// + /// The identifier of the object which contains the referenced property. + /// The hierarchy of properties to be indexed on the referenced object. + public void WriteOutlineWidthPropertyReference(string identifier, string[] propertyNames) + { + using (var writer = OpenOutlineWidthProperty()) + { + writer.WriteReference(identifier, propertyNames); + } + } + + } +} diff --git a/DotNet/CesiumLanguageWriter/Generated/PacketCesiumWriter.cs b/DotNet/CesiumLanguageWriter/Generated/PacketCesiumWriter.cs index 14ff8be7..e6ad309e 100644 --- a/DotNet/CesiumLanguageWriter/Generated/PacketCesiumWriter.cs +++ b/DotNet/CesiumLanguageWriter/Generated/PacketCesiumWriter.cs @@ -113,6 +113,21 @@ public class PacketCesiumWriter : CesiumElementWriter /// public const string EllipsePropertyName = "ellipse"; + /// + /// The name of the box property. + /// + public const string BoxPropertyName = "box"; + + /// + /// The name of the cylinder property. + /// + public const string CylinderPropertyName = "cylinder"; + + /// + /// The name of the corridor property. + /// + public const string CorridorPropertyName = "corridor"; + /// /// The name of the agi_conicSensor property. /// @@ -151,6 +166,9 @@ public class PacketCesiumWriter : CesiumElementWriter private readonly Lazy m_ellipsoid = new Lazy(() => new EllipsoidCesiumWriter(EllipsoidPropertyName), false); private readonly Lazy m_model = new Lazy(() => new ModelCesiumWriter(ModelPropertyName), false); private readonly Lazy m_ellipse = new Lazy(() => new EllipseCesiumWriter(EllipsePropertyName), false); + private readonly Lazy m_box = new Lazy(() => new BoxCesiumWriter(BoxPropertyName), false); + private readonly Lazy m_cylinder = new Lazy(() => new CylinderCesiumWriter(CylinderPropertyName), false); + private readonly Lazy m_corridor = new Lazy(() => new CorridorCesiumWriter(CorridorPropertyName), false); private readonly Lazy m_agi_conicSensor = new Lazy(() => new ConicSensorCesiumWriter(ConicSensorPropertyName), false); private readonly Lazy m_agi_customPatternSensor = new Lazy(() => new CustomPatternSensorCesiumWriter(CustomPatternSensorPropertyName), false); private readonly Lazy m_agi_rectangularSensor = new Lazy(() => new RectangularSensorCesiumWriter(RectangularSensorPropertyName), false); @@ -865,6 +883,54 @@ public EllipseCesiumWriter OpenEllipseProperty() return OpenAndReturn(EllipseWriter); } + /// + /// Gets the writer for the box property. The returned instance must be opened by calling the method before it can be used for writing. The box property defines a box, which is a closed rectangular cuboid. The box is positioned and oriented using the `position` and `orientation` properties. + /// + public BoxCesiumWriter BoxWriter + { + get { return m_box.Value; } + } + + /// + /// Opens and returns the writer for the box property. The box property defines a box, which is a closed rectangular cuboid. The box is positioned and oriented using the `position` and `orientation` properties. + /// + public BoxCesiumWriter OpenBoxProperty() + { + return OpenAndReturn(BoxWriter); + } + + /// + /// Gets the writer for the cylinder property. The returned instance must be opened by calling the method before it can be used for writing. The cylinder property defines a cylinder. The cylinder is positioned and oriented using the `position` and `orientation` properties. + /// + public CylinderCesiumWriter CylinderWriter + { + get { return m_cylinder.Value; } + } + + /// + /// Opens and returns the writer for the cylinder property. The cylinder property defines a cylinder. The cylinder is positioned and oriented using the `position` and `orientation` properties. + /// + public CylinderCesiumWriter OpenCylinderProperty() + { + return OpenAndReturn(CylinderWriter); + } + + /// + /// Gets the writer for the corridor property. The returned instance must be opened by calling the method before it can be used for writing. The corridor property defines a corridor, which is a shape defined by a centerline and width. + /// + public CorridorCesiumWriter CorridorWriter + { + get { return m_corridor.Value; } + } + + /// + /// Opens and returns the writer for the corridor property. The corridor property defines a corridor, which is a shape defined by a centerline and width. + /// + public CorridorCesiumWriter OpenCorridorProperty() + { + return OpenAndReturn(CorridorWriter); + } + /// /// Gets the writer for the agi_conicSensor property. The returned instance must be opened by calling the method before it can be used for writing. The agi_conicSensor property defines a conical sensor volume taking into account occlusion of an ellipsoid, i.e., the globe. The sensor is is positioned and oriented using the `position` and `orientation` properties. /// diff --git a/DotNet/GenerateFromSchema/GenerateCSharp.config.json b/DotNet/GenerateFromSchema/GenerateCSharp.config.json index 58f5b6d4..1ab1ec22 100644 --- a/DotNet/GenerateFromSchema/GenerateCSharp.config.json +++ b/DotNet/GenerateFromSchema/GenerateCSharp.config.json @@ -677,6 +677,19 @@ "needsInterval": false } ], + "CornerType": [ + { + "parameters": [ + { + "type": "CesiumCornerType", + "name": "value", + "description": "The style of a corner." + } + ], + "writeValue": "Output.WriteValue(CesiumFormattingHelper.CornerTypeToString(value));", + "needsInterval": false + } + ], "SensorVolumePortionToDisplay": [ { "parameters": [ diff --git a/Schema/Box.jsonschema b/Schema/Box.jsonschema new file mode 100644 index 00000000..578917e3 --- /dev/null +++ b/Schema/Box.jsonschema @@ -0,0 +1,41 @@ +{ + "title": "Box", + "description": "A box, which is a closed rectangular cuboid.", + "type": [ + "array", + "object" + ], + "items": { + "$ref": "#" + }, + "properties": { + "show": { + "$ref": "Boolean.jsonschema", + "description": "Whether or not the box is shown." + }, + "dimensions": { + "$ref": "BoxDimensions.jsonschema", + "description": "The dimensions of the box." + }, + "fill": { + "$ref": "Boolean.jsonschema", + "description": "Whether or not the box is filled." + }, + "material": { + "$ref": "Material.jsonschema", + "description": "The material to display on the surface of the box." + }, + "outline": { + "$ref": "Boolean.jsonschema", + "description": "Whether or not the box is outlined." + }, + "outlineColor": { + "$ref": "Color.jsonschema", + "description": "The color of the box outline." + }, + "outlineWidth": { + "$ref": "Double.jsonschema", + "description": "The width of the box outline." + } + } +} \ No newline at end of file diff --git a/Schema/BoxDimensions.jsonschema b/Schema/BoxDimensions.jsonschema new file mode 100644 index 00000000..17f26e29 --- /dev/null +++ b/Schema/BoxDimensions.jsonschema @@ -0,0 +1,26 @@ +{ + "title": "BoxDimensions", + "description": "The width, depth, and height of a box.", + "extends": { + "$ref": "InterpolatableProperty.jsonschema" + }, + "type": [ + "array", + "object" + ], + "items": { + "$ref": "#" + }, + "properties": { + "cartesian": { + "$ref": "Cartesian3Value.jsonschema", + "description": "The dimensions specified as a three-dimensional Cartesian value `[X, Y, Z]`, with X representing width, Y representing depth, and Z representing height, in world coordinates in meters.", + "czmlValue": true + }, + "reference": { + "$ref": "ReferenceValue.jsonschema", + "description": "The dimensions specified as a reference to another property.", + "czmlValue": true + } + } +} \ No newline at end of file diff --git a/Schema/CornerType.jsonschema b/Schema/CornerType.jsonschema new file mode 100644 index 00000000..6dc52942 --- /dev/null +++ b/Schema/CornerType.jsonschema @@ -0,0 +1,24 @@ +{ + "title": "CornerType", + "description": "The style of a corner.", + "type": [ + "array", + "object", + "string" + ], + "items": { + "$ref": "#" + }, + "properties": { + "CornerType": { + "$ref": "CornerTypeValue.jsonschema", + "description": "The corner style. Valid values are \"ROUNDED\", \"MITERED\", and \"BEVELED\".", + "czmlValue": true + }, + "reference": { + "$ref": "ReferenceValue.jsonschema", + "description": "The corner style specified as a reference to another property.", + "czmlValue": true + } + } +} \ No newline at end of file diff --git a/Schema/CornerTypeValue.jsonschema b/Schema/CornerTypeValue.jsonschema new file mode 100644 index 00000000..00c98dd8 --- /dev/null +++ b/Schema/CornerTypeValue.jsonschema @@ -0,0 +1,10 @@ +{ + "title": "CornerType", + "description": "The style of a corner.", + "type": "string", + "enum": [ + "ROUNDED", + "MITERED", + "BEVELED" + ] +} \ No newline at end of file diff --git a/Schema/Corridor.jsonschema b/Schema/Corridor.jsonschema new file mode 100644 index 00000000..7f5f015b --- /dev/null +++ b/Schema/Corridor.jsonschema @@ -0,0 +1,57 @@ +{ + "title": "Corridor", + "description": "A corridor, which is a shape defined by a centerline and width that conforms to the curvature of the globe. It can be placed on the surface or at altitude and can optionally be extruded into a volume.", + "type": [ + "array", + "object" + ], + "items": { + "$ref": "#" + }, + "properties": { + "show": { + "$ref": "Boolean.jsonschema", + "description": "Whether or not the corridor is shown." + }, + "width": { + "$ref": "Double.jsonschema", + "description": "The width of the corridor, which is the distance between the edges of the corridor." + }, + "height": { + "$ref": "Double.jsonschema", + "description": "The height of the corridor, which is the altitude of the corridor relative to the surface." + }, + "extrudedHeight": { + "$ref": "Double.jsonschema", + "description": "The extruded height of the corridor, which is the altitude of the corridor's extruded face relative to the surface." + }, + "cornerType": { + "$ref": "CornerType.jsonschema", + "description": "The style of the corners of the corridor." + }, + "granularity": { + "$ref": "Double.jsonschema", + "description": "The sampling distance, in radians." + }, + "fill": { + "$ref": "Boolean.jsonschema", + "description": "Whether or not the corridor is filled." + }, + "material": { + "$ref": "Material.jsonschema", + "description": "The material to display on the surface of the corridor." + }, + "outline": { + "$ref": "Boolean.jsonschema", + "description": "Whether or not the corridor is outlined." + }, + "outlineColor": { + "$ref": "Color.jsonschema", + "description": "The color of the corridor outline." + }, + "outlineWidth": { + "$ref": "Double.jsonschema", + "description": "The width of the corridor outline." + } + } +} \ No newline at end of file diff --git a/Schema/Cylinder.jsonschema b/Schema/Cylinder.jsonschema new file mode 100644 index 00000000..26355eb2 --- /dev/null +++ b/Schema/Cylinder.jsonschema @@ -0,0 +1,49 @@ +{ + "title": "Cylinder", + "description": "A cylinder.", + "type": [ + "array", + "object" + ], + "items": { + "$ref": "#" + }, + "properties": { + "show": { + "$ref": "Boolean.jsonschema", + "description": "Whether or not the cylinder is shown." + }, + "length": { + "$ref": "Double.jsonschema", + "description": "The length of the cylinder." + }, + "topRadius": { + "$ref": "Double.jsonschema", + "description": "The radius of the top of the cylinder." + }, + "bottomRadius": { + "$ref": "Double.jsonschema", + "description": "The radius of the bottom of the cylinder." + }, + "fill": { + "$ref": "Boolean.jsonschema", + "description": "Whether or not the cylinder is filled." + }, + "material": { + "$ref": "Material.jsonschema", + "description": "The material to display on the surface of the cylinder." + }, + "outline": { + "$ref": "Boolean.jsonschema", + "description": "Whether or not the cylinder is outlined." + }, + "outlineColor": { + "$ref": "Color.jsonschema", + "description": "The color of the cylinder outline." + }, + "outlineWidth": { + "$ref": "Double.jsonschema", + "description": "The width of the cylinder outline." + } + } +} \ No newline at end of file diff --git a/Schema/Packet.jsonschema b/Schema/Packet.jsonschema index 9bc3c9d3..dad8b4a7 100644 --- a/Schema/Packet.jsonschema +++ b/Schema/Packet.jsonschema @@ -89,6 +89,18 @@ "$ref": "Ellipse.jsonschema", "description": "An ellipse, which is a closed curve on the surface of the Earth. The ellipse is positioned using the `position` property." }, + "box": { + "$ref": "Box.jsonschema", + "description": "A box, which is a closed rectangular cuboid. The box is positioned and oriented using the `position` and `orientation` properties." + }, + "cylinder": { + "$ref": "Cylinder.jsonschema", + "description": "A cylinder. The cylinder is positioned and oriented using the `position` and `orientation` properties." + }, + "corridor": { + "$ref": "Corridor.jsonschema", + "description": "A corridor, which is a shape defined by a centerline and width." + }, "agi_conicSensor": { "$ref": "Extensions/AGI/ConicSensor.jsonschema", "description": "A conical sensor volume taking into account occlusion of an ellipsoid, i.e., the globe. The sensor is is positioned and oriented using the `position` and `orientation` properties." From 02f6e35df9bb4c2356c3d13380861862791c67f4 Mon Sep 17 00:00:00 2001 From: Scott Hunter Date: Mon, 13 Jun 2016 17:37:26 -0400 Subject: [PATCH 3/3] Translate Java. --- .../cesiumlanguagewriter/BoxCesiumWriter.java | 1015 +++++++++++ .../BoxDimensionsCesiumWriter.java | 245 +++ .../CesiumCornerType.java | 72 + .../CornerTypeCesiumWriter.java | 210 +++ .../CorridorCesiumWriter.java | 1593 +++++++++++++++++ .../CylinderCesiumWriter.java | 1305 ++++++++++++++ .../PacketCesiumWriter.java | 96 + .../advanced/CesiumFormattingHelper.java | 28 + .../advanced/CesiumPropertyWriter.java | 3 +- 9 files changed, 4566 insertions(+), 1 deletion(-) create mode 100644 Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/BoxCesiumWriter.java create mode 100644 Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/BoxDimensionsCesiumWriter.java create mode 100644 Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/CesiumCornerType.java create mode 100644 Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/CornerTypeCesiumWriter.java create mode 100644 Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/CorridorCesiumWriter.java create mode 100644 Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/CylinderCesiumWriter.java diff --git a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/BoxCesiumWriter.java b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/BoxCesiumWriter.java new file mode 100644 index 00000000..3cc2de8f --- /dev/null +++ b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/BoxCesiumWriter.java @@ -0,0 +1,1015 @@ +package cesiumlanguagewriter; + + +import agi.foundation.compatibility.*; +import agi.foundation.compatibility.DisposeHelper; +import agi.foundation.compatibility.Func1; +import agi.foundation.compatibility.Lazy; +import cesiumlanguagewriter.advanced.*; +import cesiumlanguagewriter.BooleanCesiumWriter; +import cesiumlanguagewriter.BoxDimensionsCesiumWriter; +import cesiumlanguagewriter.ColorCesiumWriter; +import cesiumlanguagewriter.DoubleCesiumWriter; +import cesiumlanguagewriter.MaterialCesiumWriter; +import java.awt.Color; +import java.util.List; + +/** + * + Writes a Box to a {@link CesiumOutputStream}. A Box is a box, which is a closed rectangular cuboid. + + + */ +public class BoxCesiumWriter extends CesiumPropertyWriter { + /** + * + The name of the show property. + + + */ + public static final String ShowPropertyName = "show"; + /** + * + The name of the dimensions property. + + + */ + public static final String DimensionsPropertyName = "dimensions"; + /** + * + The name of the fill property. + + + */ + public static final String FillPropertyName = "fill"; + /** + * + The name of the material property. + + + */ + public static final String MaterialPropertyName = "material"; + /** + * + The name of the outline property. + + + */ + public static final String OutlinePropertyName = "outline"; + /** + * + The name of the outlineColor property. + + + */ + public static final String OutlineColorPropertyName = "outlineColor"; + /** + * + The name of the outlineWidth property. + + + */ + public static final String OutlineWidthPropertyName = "outlineWidth"; + private Lazy m_show = new Lazy(new Func1() { + public cesiumlanguagewriter.BooleanCesiumWriter invoke() { + return new BooleanCesiumWriter(ShowPropertyName); + } + }, false); + private Lazy m_dimensions = new Lazy(new Func1() { + public cesiumlanguagewriter.BoxDimensionsCesiumWriter invoke() { + return new BoxDimensionsCesiumWriter(DimensionsPropertyName); + } + }, false); + private Lazy m_fill = new Lazy(new Func1() { + public cesiumlanguagewriter.BooleanCesiumWriter invoke() { + return new BooleanCesiumWriter(FillPropertyName); + } + }, false); + private Lazy m_material = new Lazy(new Func1() { + public cesiumlanguagewriter.MaterialCesiumWriter invoke() { + return new MaterialCesiumWriter(MaterialPropertyName); + } + }, false); + private Lazy m_outline = new Lazy(new Func1() { + public cesiumlanguagewriter.BooleanCesiumWriter invoke() { + return new BooleanCesiumWriter(OutlinePropertyName); + } + }, false); + private Lazy m_outlineColor = new Lazy(new Func1() { + public cesiumlanguagewriter.ColorCesiumWriter invoke() { + return new ColorCesiumWriter(OutlineColorPropertyName); + } + }, false); + private Lazy m_outlineWidth = new Lazy(new Func1() { + public cesiumlanguagewriter.DoubleCesiumWriter invoke() { + return new DoubleCesiumWriter(OutlineWidthPropertyName); + } + }, false); + + /** + * + Initializes a new instance. + + + */ + public BoxCesiumWriter(String propertyName) { + super(propertyName); + } + + /** + * + Initializes a new instance as a copy of an existing instance. + + + + * @param existingInstance The existing instance to copy. + */ + protected BoxCesiumWriter(BoxCesiumWriter existingInstance) { + super(existingInstance); + } + + @Override + public BoxCesiumWriter clone() { + return new BoxCesiumWriter(this); + } + + /** + * Gets the writer for the show property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The show property defines whether or not the box is shown. + + + */ + public final BooleanCesiumWriter getShowWriter() { + return m_show.getValue(); + } + + /** + * + Opens and returns the writer for the show property. The show property defines whether or not the box is shown. + + + */ + public final BooleanCesiumWriter openShowProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getShowWriter()); + } + + /** + * + Writes a value for the show property as a boolean value. The show property specifies whether or not the box is shown. + + + + * @param value The value. + */ + public final void writeShowProperty(boolean value) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openShowProperty(); + try { + writer.writeBoolean(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the show property as a reference value. The show property specifies whether or not the box is shown. + + + + * @param value The reference. + */ + public final void writeShowPropertyReference(Reference value) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openShowProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the show property as a reference value. The show property specifies whether or not the box is shown. + + + + * @param value The earliest date of the interval. + */ + public final void writeShowPropertyReference(String value) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openShowProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the show property as a reference value. The show property specifies whether or not the box is shown. + + + + + * @param identifier The identifier of the object which contains the referenced property. + * @param propertyName The property on the referenced object. + */ + public final void writeShowPropertyReference(String identifier, String propertyName) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openShowProperty(); + try { + writer.writeReference(identifier, propertyName); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the show property as a reference value. The show property specifies whether or not the box is shown. + + + + + * @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 writeShowPropertyReference(String identifier, String[] propertyNames) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openShowProperty(); + try { + writer.writeReference(identifier, propertyNames); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * Gets the writer for the dimensions property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The dimensions property defines the dimensions of the box. + + + */ + public final BoxDimensionsCesiumWriter getDimensionsWriter() { + return m_dimensions.getValue(); + } + + /** + * + Opens and returns the writer for the dimensions property. The dimensions property defines the dimensions of the box. + + + */ + public final BoxDimensionsCesiumWriter openDimensionsProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getDimensionsWriter()); + } + + /** + * + Writes a value for the dimensions property as a cartesian value. The dimensions property specifies the dimensions of the box. + + + + * @param value The value. + */ + public final void writeDimensionsProperty(Cartesian value) { + { + cesiumlanguagewriter.BoxDimensionsCesiumWriter writer = openDimensionsProperty(); + try { + writer.writeCartesian(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the dimensions property as a cartesian value. The dimensions property specifies the dimensions of the box. + + + + + * @param dates The dates at which the vector is specified. + * @param values The values corresponding to each date. + */ + public final void writeDimensionsProperty(List dates, List values) { + { + cesiumlanguagewriter.BoxDimensionsCesiumWriter writer = openDimensionsProperty(); + try { + writer.writeCartesian(dates, values); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the dimensions property as a cartesian value. The dimensions property specifies the dimensions of the box. + + + + + + + * @param dates The dates at which the vector is specified. + * @param values The values corresponding to each date. + * @param startIndex The index of the first element to use in the `values` collection. + * @param length The number of elements to use from the `values` collection. + */ + public final void writeDimensionsProperty(List dates, List values, int startIndex, int length) { + { + cesiumlanguagewriter.BoxDimensionsCesiumWriter writer = openDimensionsProperty(); + try { + writer.writeCartesian(dates, values, startIndex, length); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the dimensions property as a reference value. The dimensions property specifies the dimensions of the box. + + + + * @param value The reference. + */ + public final void writeDimensionsPropertyReference(Reference value) { + { + cesiumlanguagewriter.BoxDimensionsCesiumWriter writer = openDimensionsProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the dimensions property as a reference value. The dimensions property specifies the dimensions of the box. + + + + * @param value The earliest date of the interval. + */ + public final void writeDimensionsPropertyReference(String value) { + { + cesiumlanguagewriter.BoxDimensionsCesiumWriter writer = openDimensionsProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the dimensions property as a reference value. The dimensions property specifies the dimensions of the box. + + + + + * @param identifier The identifier of the object which contains the referenced property. + * @param propertyName The property on the referenced object. + */ + public final void writeDimensionsPropertyReference(String identifier, String propertyName) { + { + cesiumlanguagewriter.BoxDimensionsCesiumWriter writer = openDimensionsProperty(); + try { + writer.writeReference(identifier, propertyName); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the dimensions property as a reference value. The dimensions property specifies the dimensions of the box. + + + + + * @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 writeDimensionsPropertyReference(String identifier, String[] propertyNames) { + { + cesiumlanguagewriter.BoxDimensionsCesiumWriter writer = openDimensionsProperty(); + try { + writer.writeReference(identifier, propertyNames); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * Gets the writer for the fill property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The fill property defines whether or not the box is filled. + + + */ + public final BooleanCesiumWriter getFillWriter() { + return m_fill.getValue(); + } + + /** + * + Opens and returns the writer for the fill property. The fill property defines whether or not the box is filled. + + + */ + public final BooleanCesiumWriter openFillProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getFillWriter()); + } + + /** + * + Writes a value for the fill property as a boolean value. The fill property specifies whether or not the box is filled. + + + + * @param value The value. + */ + public final void writeFillProperty(boolean value) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openFillProperty(); + try { + writer.writeBoolean(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the fill property as a reference value. The fill property specifies whether or not the box is filled. + + + + * @param value The reference. + */ + public final void writeFillPropertyReference(Reference value) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openFillProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the fill property as a reference value. The fill property specifies whether or not the box is filled. + + + + * @param value The earliest date of the interval. + */ + public final void writeFillPropertyReference(String value) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openFillProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the fill property as a reference value. The fill property specifies whether or not the box is filled. + + + + + * @param identifier The identifier of the object which contains the referenced property. + * @param propertyName The property on the referenced object. + */ + public final void writeFillPropertyReference(String identifier, String propertyName) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openFillProperty(); + try { + writer.writeReference(identifier, propertyName); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the fill property as a reference value. The fill property specifies whether or not the box is filled. + + + + + * @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 writeFillPropertyReference(String identifier, String[] propertyNames) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openFillProperty(); + try { + writer.writeReference(identifier, propertyNames); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * Gets the writer for the material property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The material property defines the material to display on the surface of the box. + + + */ + public final MaterialCesiumWriter getMaterialWriter() { + return m_material.getValue(); + } + + /** + * + Opens and returns the writer for the material property. The material property defines the material to display on the surface of the box. + + + */ + public final MaterialCesiumWriter openMaterialProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getMaterialWriter()); + } + + /** + * Gets the writer for the outline property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The outline property defines whether or not the box is outlined. + + + */ + public final BooleanCesiumWriter getOutlineWriter() { + return m_outline.getValue(); + } + + /** + * + Opens and returns the writer for the outline property. The outline property defines whether or not the box is outlined. + + + */ + public final BooleanCesiumWriter openOutlineProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getOutlineWriter()); + } + + /** + * + Writes a value for the outline property as a boolean value. The outline property specifies whether or not the box is outlined. + + + + * @param value The value. + */ + public final void writeOutlineProperty(boolean value) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openOutlineProperty(); + try { + writer.writeBoolean(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outline property as a reference value. The outline property specifies whether or not the box is outlined. + + + + * @param value The reference. + */ + public final void writeOutlinePropertyReference(Reference value) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openOutlineProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outline property as a reference value. The outline property specifies whether or not the box is outlined. + + + + * @param value The earliest date of the interval. + */ + public final void writeOutlinePropertyReference(String value) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openOutlineProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outline property as a reference value. The outline property specifies whether or not the box is outlined. + + + + + * @param identifier The identifier of the object which contains the referenced property. + * @param propertyName The property on the referenced object. + */ + public final void writeOutlinePropertyReference(String identifier, String propertyName) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openOutlineProperty(); + try { + writer.writeReference(identifier, propertyName); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outline property as a reference value. The outline property specifies whether or not the box is outlined. + + + + + * @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 writeOutlinePropertyReference(String identifier, String[] propertyNames) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openOutlineProperty(); + try { + writer.writeReference(identifier, propertyNames); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * Gets the writer for the outlineColor property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The outlineColor property defines the color of the box outline. + + + */ + public final ColorCesiumWriter getOutlineColorWriter() { + return m_outlineColor.getValue(); + } + + /** + * + Opens and returns the writer for the outlineColor property. The outlineColor property defines the color of the box outline. + + + */ + public final ColorCesiumWriter openOutlineColorProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getOutlineColorWriter()); + } + + /** + * + Writes a value for the outlineColor property as a rgba value. The outlineColor property specifies the color of the box outline. + + + + * @param color The color. + */ + public final void writeOutlineColorProperty(Color color) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openOutlineColorProperty(); + try { + writer.writeRgba(color); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineColor property as a rgba value. The outlineColor property specifies the color of the box outline. + + + + + + + * @param red The red component in the range 0 to 255. + * @param green The green component in the range 0 to 255. + * @param blue The blue component in the range 0 to 255. + * @param alpha The alpha component in the range 0 to 255. + */ + public final void writeOutlineColorProperty(int red, int green, int blue, int alpha) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openOutlineColorProperty(); + try { + writer.writeRgba(red, green, blue, alpha); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineColor property as a rgba value. The outlineColor property specifies the color of the box outline. + + + + + + + * @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 use in the `colors` collection. + * @param length The number of elements to use from the `colors` collection. + */ + public final void writeOutlineColorProperty(List dates, List colors, int startIndex, int length) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openOutlineColorProperty(); + try { + writer.writeRgba(dates, colors, startIndex, length); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineColor property as a rgbaf value. The outlineColor property specifies the color of the box outline. + + + + + + + * @param red The red component in the range 0 to 1.0. + * @param green The green component in the range 0 to 1.0. + * @param blue The blue component in the range 0 to 1.0. + * @param alpha The alpha component in the range 0 to 1.0. + */ + public final void writeOutlineColorPropertyRgbaf(float red, float green, float blue, float alpha) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openOutlineColorProperty(); + try { + writer.writeRgbaf(red, green, blue, alpha); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineColor property as a reference value. The outlineColor property specifies the color of the box outline. + + + + * @param value The reference. + */ + public final void writeOutlineColorPropertyReference(Reference value) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openOutlineColorProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineColor property as a reference value. The outlineColor property specifies the color of the box outline. + + + + * @param value The earliest date of the interval. + */ + public final void writeOutlineColorPropertyReference(String value) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openOutlineColorProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineColor property as a reference value. The outlineColor property specifies the color of the box outline. + + + + + * @param identifier The identifier of the object which contains the referenced property. + * @param propertyName The property on the referenced object. + */ + public final void writeOutlineColorPropertyReference(String identifier, String propertyName) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openOutlineColorProperty(); + try { + writer.writeReference(identifier, propertyName); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineColor property as a reference value. The outlineColor property specifies the color of the box outline. + + + + + * @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 writeOutlineColorPropertyReference(String identifier, String[] propertyNames) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openOutlineColorProperty(); + try { + writer.writeReference(identifier, propertyNames); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * Gets the writer for the outlineWidth property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The outlineWidth property defines the width of the box outline. + + + */ + public final DoubleCesiumWriter getOutlineWidthWriter() { + return m_outlineWidth.getValue(); + } + + /** + * + Opens and returns the writer for the outlineWidth property. The outlineWidth property defines the width of the box outline. + + + */ + public final DoubleCesiumWriter openOutlineWidthProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getOutlineWidthWriter()); + } + + /** + * + Writes a value for the outlineWidth property as a number value. The outlineWidth property specifies the width of the box outline. + + + + * @param value The value. + */ + public final void writeOutlineWidthProperty(double value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openOutlineWidthProperty(); + try { + writer.writeNumber(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineWidth property as a number value. The outlineWidth property specifies the width of the box outline. + + + + + + + * @param dates The dates at which the value is specified. + * @param values The value corresponding to each date. + * @param startIndex The index of the first element to use in the `values` collection. + * @param length The number of elements to use from the `values` collection. + */ + public final void writeOutlineWidthProperty(List dates, List values, int startIndex, int length) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openOutlineWidthProperty(); + try { + writer.writeNumber(dates, values, startIndex, length); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineWidth property as a reference value. The outlineWidth property specifies the width of the box outline. + + + + * @param value The reference. + */ + public final void writeOutlineWidthPropertyReference(Reference value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openOutlineWidthProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineWidth property as a reference value. The outlineWidth property specifies the width of the box outline. + + + + * @param value The earliest date of the interval. + */ + public final void writeOutlineWidthPropertyReference(String value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openOutlineWidthProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineWidth property as a reference value. The outlineWidth property specifies the width of the box outline. + + + + + * @param identifier The identifier of the object which contains the referenced property. + * @param propertyName The property on the referenced object. + */ + public final void writeOutlineWidthPropertyReference(String identifier, String propertyName) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openOutlineWidthProperty(); + try { + writer.writeReference(identifier, propertyName); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineWidth property as a reference value. The outlineWidth property specifies the width of the box outline. + + + + + * @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 writeOutlineWidthPropertyReference(String identifier, String[] propertyNames) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openOutlineWidthProperty(); + try { + writer.writeReference(identifier, propertyNames); + } finally { + DisposeHelper.dispose(writer); + } + } + } +} \ No newline at end of file diff --git a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/BoxDimensionsCesiumWriter.java b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/BoxDimensionsCesiumWriter.java new file mode 100644 index 00000000..5fcf5735 --- /dev/null +++ b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/BoxDimensionsCesiumWriter.java @@ -0,0 +1,245 @@ +package cesiumlanguagewriter; + + +import agi.foundation.compatibility.*; +import agi.foundation.compatibility.Func1; +import agi.foundation.compatibility.Lazy; +import cesiumlanguagewriter.advanced.*; +import cesiumlanguagewriter.Cartesian; +import cesiumlanguagewriter.Reference; +import java.util.List; + +/** + * + Writes a BoxDimensions to a {@link CesiumOutputStream}. A BoxDimensions is the width, depth, and height of a box. + + + */ +public class BoxDimensionsCesiumWriter extends CesiumInterpolatablePropertyWriter { + /** + * + The name of the cartesian property. + + + */ + public static final String CartesianPropertyName = "cartesian"; + /** + * + The name of the reference property. + + + */ + public static final String ReferencePropertyName = "reference"; + private Lazy> m_asCartesian; + private Lazy> m_asReference; + + /** + * + Initializes a new instance. + + + */ + public BoxDimensionsCesiumWriter(String propertyName) { + super(propertyName); + m_asCartesian = new Lazy>( + new Func1>(this, "createCartesianAdaptor", new Class[] {}) { + public cesiumlanguagewriter.advanced.ICesiumInterpolatableValuePropertyWriter invoke() { + return createCartesianAdaptor(); + } + }, false); + m_asReference = new Lazy>(new Func1>(this, + "createReferenceAdaptor", new Class[] {}) { + public cesiumlanguagewriter.advanced.ICesiumValuePropertyWriter invoke() { + return createReferenceAdaptor(); + } + }, false); + } + + /** + * + Initializes a new instance as a copy of an existing instance. + + + + * @param existingInstance The existing instance to copy. + */ + protected BoxDimensionsCesiumWriter(BoxDimensionsCesiumWriter existingInstance) { + super(existingInstance); + m_asCartesian = new Lazy>( + new Func1>(this, "createCartesianAdaptor", new Class[] {}) { + public cesiumlanguagewriter.advanced.ICesiumInterpolatableValuePropertyWriter invoke() { + return createCartesianAdaptor(); + } + }, false); + m_asReference = new Lazy>(new Func1>(this, + "createReferenceAdaptor", new Class[] {}) { + public cesiumlanguagewriter.advanced.ICesiumValuePropertyWriter invoke() { + return createReferenceAdaptor(); + } + }, false); + } + + @Override + public BoxDimensionsCesiumWriter clone() { + return new BoxDimensionsCesiumWriter(this); + } + + /** + * + Writes the value expressed as a cartesian, which is the dimensions specified as a three-dimensional Cartesian value `[X, Y, Z]`, with X representing width, Y representing depth, and Z representing height, in world coordinates in meters. + + + + * @param value The value. + */ + public final void writeCartesian(Cartesian value) { + String PropertyName = CartesianPropertyName; + openIntervalIfNecessary(); + getOutput().writePropertyName(PropertyName); + CesiumWritingHelper.writeCartesian3(getOutput(), value); + } + + /** + * + Writes the value expressed as a cartesian, which is the dimensions specified as a three-dimensional Cartesian value `[X, Y, Z]`, with X representing width, Y representing depth, and Z representing height, in world coordinates in meters. + + + + + * @param dates The dates at which the vector is specified. + * @param values The values corresponding to each date. + */ + public final void writeCartesian(List dates, List values) { + writeCartesian(dates, values, 0, dates.size()); + } + + /** + * + Writes the value expressed as a cartesian, which is the dimensions specified as a three-dimensional Cartesian value `[X, Y, Z]`, with X representing width, Y representing depth, and Z representing height, in world coordinates in meters. + + + + + + + * @param dates The dates at which the vector is specified. + * @param values The values corresponding to each date. + * @param startIndex The index of the first element to use in the `values` collection. + * @param length The number of elements to use from the `values` collection. + */ + public final void writeCartesian(List dates, List values, int startIndex, int length) { + String PropertyName = CartesianPropertyName; + openIntervalIfNecessary(); + CesiumWritingHelper.writeCartesian3(getOutput(), PropertyName, dates, values, startIndex, length); + } + + /** + * + Writes the value expressed as a reference, which is the dimensions specified as a reference to another property. + + + + * @param value The reference. + */ + public final void writeReference(Reference value) { + String PropertyName = ReferencePropertyName; + openIntervalIfNecessary(); + getOutput().writePropertyName(PropertyName); + CesiumWritingHelper.writeReference(getOutput(), value); + } + + /** + * + Writes the value expressed as a reference, which is the dimensions specified as a reference to another property. + + + + * @param value The earliest date of the interval. + */ + public final void writeReference(String value) { + String PropertyName = ReferencePropertyName; + openIntervalIfNecessary(); + getOutput().writePropertyName(PropertyName); + CesiumWritingHelper.writeReference(getOutput(), value); + } + + /** + * + Writes the value expressed as a reference, which is the dimensions specified as a reference to another property. + + + + + * @param identifier The identifier of the object which contains the referenced property. + * @param propertyName The property on the referenced object. + */ + public final void writeReference(String identifier, String propertyName) { + String PropertyName = ReferencePropertyName; + openIntervalIfNecessary(); + getOutput().writePropertyName(PropertyName); + CesiumWritingHelper.writeReference(getOutput(), identifier, propertyName); + } + + /** + * + Writes the value expressed as a reference, which is the dimensions specified as a reference to another property. + + + + + * @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 writeReference(String identifier, String[] propertyNames) { + String PropertyName = ReferencePropertyName; + openIntervalIfNecessary(); + getOutput().writePropertyName(PropertyName); + CesiumWritingHelper.writeReference(getOutput(), identifier, propertyNames); + } + + /** + * + Returns a wrapper for this instance that implements {@link ICesiumInterpolatableValuePropertyWriter} to write a value in Cartesian format. Because the returned instance is a wrapper for this instance, you may call {@link ICesiumElementWriter#close} on either this instance or the wrapper, but you must not call it on both. + + + + * @return The wrapper. + */ + public final ICesiumInterpolatableValuePropertyWriter asCartesian() { + return m_asCartesian.getValue(); + } + + final private ICesiumInterpolatableValuePropertyWriter createCartesianAdaptor() { + return new CesiumInterpolatableWriterAdaptor(this, + new CesiumWriterAdaptorWriteCallback() { + public void invoke(BoxDimensionsCesiumWriter me, Cartesian value) { + me.writeCartesian(value); + } + }, new CesiumWriterAdaptorWriteSamplesCallback() { + public void invoke(BoxDimensionsCesiumWriter me, List dates, List values, int startIndex, int length) { + me.writeCartesian(dates, values, startIndex, length); + } + }); + } + + /** + * + Returns a wrapper for this instance that implements {@link ICesiumValuePropertyWriter} to write a value in Reference format. Because the returned instance is a wrapper for this instance, you may call {@link ICesiumElementWriter#close} on either this instance or the wrapper, but you must not call it on both. + + + + * @return The wrapper. + */ + public final ICesiumValuePropertyWriter asReference() { + return m_asReference.getValue(); + } + + final private ICesiumValuePropertyWriter createReferenceAdaptor() { + return new CesiumWriterAdaptor(this, + new CesiumWriterAdaptorWriteCallback() { + public void invoke(BoxDimensionsCesiumWriter me, Reference value) { + me.writeReference(value); + } + }); + } +} \ No newline at end of file diff --git a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/CesiumCornerType.java b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/CesiumCornerType.java new file mode 100644 index 00000000..4c7f1442 --- /dev/null +++ b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/CesiumCornerType.java @@ -0,0 +1,72 @@ +package cesiumlanguagewriter; + + +import agi.foundation.compatibility.*; +import agi.foundation.compatibility.Enumeration; + +/** + * + Specifies the style of a corner. + + + */ +public enum CesiumCornerType implements Enumeration { + /** + * + The corner has a smooth edge. + + + */ + ROUNDED(0), /** + * + The corner point is the intersection of adjacent edges. + + + */ + MITERED(1), /** + * + The corner is clipped. + + + */ + BEVELED(2); + private final int value; + + CesiumCornerType(int value) { + this.value = value; + } + + /** + * Get the numeric value associated with this enum constant. + * @return A numeric value. + */ + public int getValue() { + return value; + } + + /** + * Get the enum constant that is associated with the given numeric value. + * @return The enum constant associated with value. + * @param value a numeric value. + */ + public static CesiumCornerType getFromValue(int value) { + switch (value) { + case 0: + return ROUNDED; + case 1: + return MITERED; + case 2: + return BEVELED; + default: + throw new IllegalArgumentException("Undefined enum value."); + } + } + + /** + * Get the enum constant that is considered to be the default. + * @return The default enum constant. + */ + public static CesiumCornerType getDefault() { + return ROUNDED; + } +} \ No newline at end of file diff --git a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/CornerTypeCesiumWriter.java b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/CornerTypeCesiumWriter.java new file mode 100644 index 00000000..cd9d4052 --- /dev/null +++ b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/CornerTypeCesiumWriter.java @@ -0,0 +1,210 @@ +package cesiumlanguagewriter; + + +import agi.foundation.compatibility.*; +import agi.foundation.compatibility.Func1; +import agi.foundation.compatibility.Lazy; +import cesiumlanguagewriter.advanced.*; +import cesiumlanguagewriter.CesiumCornerType; +import cesiumlanguagewriter.Reference; + +/** + * + Writes a CornerType to a {@link CesiumOutputStream}. A CornerType is the style of a corner. + + + */ +public class CornerTypeCesiumWriter extends CesiumPropertyWriter { + /** + * + The name of the CornerType property. + + + */ + public static final String CornerTypePropertyName = "CornerType"; + /** + * + The name of the reference property. + + + */ + public static final String ReferencePropertyName = "reference"; + private Lazy> m_asCornerType; + private Lazy> m_asReference; + + /** + * + Initializes a new instance. + + + */ + public CornerTypeCesiumWriter(String propertyName) { + super(propertyName); + m_asCornerType = new Lazy>(new Func1>( + this, "createCornerTypeAdaptor", new Class[] {}) { + public cesiumlanguagewriter.advanced.ICesiumValuePropertyWriter invoke() { + return createCornerTypeAdaptor(); + } + }, false); + m_asReference = new Lazy>(new Func1>(this, + "createReferenceAdaptor", new Class[] {}) { + public cesiumlanguagewriter.advanced.ICesiumValuePropertyWriter invoke() { + return createReferenceAdaptor(); + } + }, false); + } + + /** + * + Initializes a new instance as a copy of an existing instance. + + + + * @param existingInstance The existing instance to copy. + */ + protected CornerTypeCesiumWriter(CornerTypeCesiumWriter existingInstance) { + super(existingInstance); + m_asCornerType = new Lazy>(new Func1>( + this, "createCornerTypeAdaptor", new Class[] {}) { + public cesiumlanguagewriter.advanced.ICesiumValuePropertyWriter invoke() { + return createCornerTypeAdaptor(); + } + }, false); + m_asReference = new Lazy>(new Func1>(this, + "createReferenceAdaptor", new Class[] {}) { + public cesiumlanguagewriter.advanced.ICesiumValuePropertyWriter invoke() { + return createReferenceAdaptor(); + } + }, false); + } + + @Override + public CornerTypeCesiumWriter clone() { + return new CornerTypeCesiumWriter(this); + } + + /** + * + Writes the value expressed as a CornerType, which is the corner style. Valid values are "ROUNDED", "MITERED", and "BEVELED". + + + + * @param value The style of a corner. + */ + public final void writeCornerType(CesiumCornerType value) { + String PropertyName = CornerTypePropertyName; + if (getForceInterval()) { + openIntervalIfNecessary(); + } + if (getIsInterval()) { + getOutput().writePropertyName(PropertyName); + } + getOutput().writeValue(CesiumFormattingHelper.cornerTypeToString(value)); + } + + /** + * + Writes the value expressed as a reference, which is the corner style specified as a reference to another property. + + + + * @param value The reference. + */ + public final void writeReference(Reference value) { + String PropertyName = ReferencePropertyName; + openIntervalIfNecessary(); + getOutput().writePropertyName(PropertyName); + CesiumWritingHelper.writeReference(getOutput(), value); + } + + /** + * + Writes the value expressed as a reference, which is the corner style specified as a reference to another property. + + + + * @param value The earliest date of the interval. + */ + public final void writeReference(String value) { + String PropertyName = ReferencePropertyName; + openIntervalIfNecessary(); + getOutput().writePropertyName(PropertyName); + CesiumWritingHelper.writeReference(getOutput(), value); + } + + /** + * + Writes the value expressed as a reference, which is the corner style specified as a reference to another property. + + + + + * @param identifier The identifier of the object which contains the referenced property. + * @param propertyName The property on the referenced object. + */ + public final void writeReference(String identifier, String propertyName) { + String PropertyName = ReferencePropertyName; + openIntervalIfNecessary(); + getOutput().writePropertyName(PropertyName); + CesiumWritingHelper.writeReference(getOutput(), identifier, propertyName); + } + + /** + * + Writes the value expressed as a reference, which is the corner style specified as a reference to another property. + + + + + * @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 writeReference(String identifier, String[] propertyNames) { + String PropertyName = ReferencePropertyName; + openIntervalIfNecessary(); + getOutput().writePropertyName(PropertyName); + CesiumWritingHelper.writeReference(getOutput(), identifier, propertyNames); + } + + /** + * + Returns a wrapper for this instance that implements {@link ICesiumValuePropertyWriter} to write a value in CornerType format. Because the returned instance is a wrapper for this instance, you may call {@link ICesiumElementWriter#close} on either this instance or the wrapper, but you must not call it on both. + + + + * @return The wrapper. + */ + public final ICesiumValuePropertyWriter asCornerType() { + return m_asCornerType.getValue(); + } + + final private ICesiumValuePropertyWriter createCornerTypeAdaptor() { + return new CesiumWriterAdaptor(this, + new CesiumWriterAdaptorWriteCallback() { + public void invoke(CornerTypeCesiumWriter me, CesiumCornerType value) { + me.writeCornerType(value); + } + }); + } + + /** + * + Returns a wrapper for this instance that implements {@link ICesiumValuePropertyWriter} to write a value in Reference format. Because the returned instance is a wrapper for this instance, you may call {@link ICesiumElementWriter#close} on either this instance or the wrapper, but you must not call it on both. + + + + * @return The wrapper. + */ + public final ICesiumValuePropertyWriter asReference() { + return m_asReference.getValue(); + } + + final private ICesiumValuePropertyWriter createReferenceAdaptor() { + return new CesiumWriterAdaptor(this, + new CesiumWriterAdaptorWriteCallback() { + public void invoke(CornerTypeCesiumWriter me, Reference value) { + me.writeReference(value); + } + }); + } +} \ No newline at end of file diff --git a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/CorridorCesiumWriter.java b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/CorridorCesiumWriter.java new file mode 100644 index 00000000..7592ecf1 --- /dev/null +++ b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/CorridorCesiumWriter.java @@ -0,0 +1,1593 @@ +package cesiumlanguagewriter; + + +import agi.foundation.compatibility.*; +import agi.foundation.compatibility.DisposeHelper; +import agi.foundation.compatibility.Func1; +import agi.foundation.compatibility.Lazy; +import cesiumlanguagewriter.advanced.*; +import cesiumlanguagewriter.BooleanCesiumWriter; +import cesiumlanguagewriter.ColorCesiumWriter; +import cesiumlanguagewriter.CornerTypeCesiumWriter; +import cesiumlanguagewriter.DoubleCesiumWriter; +import cesiumlanguagewriter.MaterialCesiumWriter; +import java.awt.Color; +import java.util.List; + +/** + * + Writes a Corridor to a {@link CesiumOutputStream}. A Corridor is a corridor, which is a shape defined by a centerline and width that conforms to the curvature of the globe. It can be placed on the surface or at altitude and can optionally be extruded into a volume. + + + */ +public class CorridorCesiumWriter extends CesiumPropertyWriter { + /** + * + The name of the show property. + + + */ + public static final String ShowPropertyName = "show"; + /** + * + The name of the width property. + + + */ + public static final String WidthPropertyName = "width"; + /** + * + The name of the height property. + + + */ + public static final String HeightPropertyName = "height"; + /** + * + The name of the extrudedHeight property. + + + */ + public static final String ExtrudedHeightPropertyName = "extrudedHeight"; + /** + * + The name of the cornerType property. + + + */ + public static final String CornerTypePropertyName = "cornerType"; + /** + * + The name of the granularity property. + + + */ + public static final String GranularityPropertyName = "granularity"; + /** + * + The name of the fill property. + + + */ + public static final String FillPropertyName = "fill"; + /** + * + The name of the material property. + + + */ + public static final String MaterialPropertyName = "material"; + /** + * + The name of the outline property. + + + */ + public static final String OutlinePropertyName = "outline"; + /** + * + The name of the outlineColor property. + + + */ + public static final String OutlineColorPropertyName = "outlineColor"; + /** + * + The name of the outlineWidth property. + + + */ + public static final String OutlineWidthPropertyName = "outlineWidth"; + private Lazy m_show = new Lazy(new Func1() { + public cesiumlanguagewriter.BooleanCesiumWriter invoke() { + return new BooleanCesiumWriter(ShowPropertyName); + } + }, false); + private Lazy m_width = new Lazy(new Func1() { + public cesiumlanguagewriter.DoubleCesiumWriter invoke() { + return new DoubleCesiumWriter(WidthPropertyName); + } + }, false); + private Lazy m_height = new Lazy(new Func1() { + public cesiumlanguagewriter.DoubleCesiumWriter invoke() { + return new DoubleCesiumWriter(HeightPropertyName); + } + }, false); + private Lazy m_extrudedHeight = new Lazy(new Func1() { + public cesiumlanguagewriter.DoubleCesiumWriter invoke() { + return new DoubleCesiumWriter(ExtrudedHeightPropertyName); + } + }, false); + private Lazy m_cornerType = new Lazy(new Func1() { + public cesiumlanguagewriter.CornerTypeCesiumWriter invoke() { + return new CornerTypeCesiumWriter(CornerTypePropertyName); + } + }, false); + private Lazy m_granularity = new Lazy(new Func1() { + public cesiumlanguagewriter.DoubleCesiumWriter invoke() { + return new DoubleCesiumWriter(GranularityPropertyName); + } + }, false); + private Lazy m_fill = new Lazy(new Func1() { + public cesiumlanguagewriter.BooleanCesiumWriter invoke() { + return new BooleanCesiumWriter(FillPropertyName); + } + }, false); + private Lazy m_material = new Lazy(new Func1() { + public cesiumlanguagewriter.MaterialCesiumWriter invoke() { + return new MaterialCesiumWriter(MaterialPropertyName); + } + }, false); + private Lazy m_outline = new Lazy(new Func1() { + public cesiumlanguagewriter.BooleanCesiumWriter invoke() { + return new BooleanCesiumWriter(OutlinePropertyName); + } + }, false); + private Lazy m_outlineColor = new Lazy(new Func1() { + public cesiumlanguagewriter.ColorCesiumWriter invoke() { + return new ColorCesiumWriter(OutlineColorPropertyName); + } + }, false); + private Lazy m_outlineWidth = new Lazy(new Func1() { + public cesiumlanguagewriter.DoubleCesiumWriter invoke() { + return new DoubleCesiumWriter(OutlineWidthPropertyName); + } + }, false); + + /** + * + Initializes a new instance. + + + */ + public CorridorCesiumWriter(String propertyName) { + super(propertyName); + } + + /** + * + Initializes a new instance as a copy of an existing instance. + + + + * @param existingInstance The existing instance to copy. + */ + protected CorridorCesiumWriter(CorridorCesiumWriter existingInstance) { + super(existingInstance); + } + + @Override + public CorridorCesiumWriter clone() { + return new CorridorCesiumWriter(this); + } + + /** + * Gets the writer for the show property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The show property defines whether or not the corridor is shown. + + + */ + public final BooleanCesiumWriter getShowWriter() { + return m_show.getValue(); + } + + /** + * + Opens and returns the writer for the show property. The show property defines whether or not the corridor is shown. + + + */ + public final BooleanCesiumWriter openShowProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getShowWriter()); + } + + /** + * + Writes a value for the show property as a boolean value. The show property specifies whether or not the corridor is shown. + + + + * @param value The value. + */ + public final void writeShowProperty(boolean value) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openShowProperty(); + try { + writer.writeBoolean(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the show property as a reference value. The show property specifies whether or not the corridor is shown. + + + + * @param value The reference. + */ + public final void writeShowPropertyReference(Reference value) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openShowProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the show property as a reference value. The show property specifies whether or not the corridor is shown. + + + + * @param value The earliest date of the interval. + */ + public final void writeShowPropertyReference(String value) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openShowProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the show property as a reference value. The show property specifies whether or not the corridor is shown. + + + + + * @param identifier The identifier of the object which contains the referenced property. + * @param propertyName The property on the referenced object. + */ + public final void writeShowPropertyReference(String identifier, String propertyName) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openShowProperty(); + try { + writer.writeReference(identifier, propertyName); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the show property as a reference value. The show property specifies whether or not the corridor is shown. + + + + + * @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 writeShowPropertyReference(String identifier, String[] propertyNames) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openShowProperty(); + try { + writer.writeReference(identifier, propertyNames); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * Gets the writer for the width property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The width property defines the width of the corridor, which is the distance between the edges of the corridor. + + + */ + public final DoubleCesiumWriter getWidthWriter() { + return m_width.getValue(); + } + + /** + * + Opens and returns the writer for the width property. The width property defines the width of the corridor, which is the distance between the edges of the corridor. + + + */ + public final DoubleCesiumWriter openWidthProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getWidthWriter()); + } + + /** + * + Writes a value for the width property as a number value. The width property specifies the width of the corridor, which is the distance between the edges of the corridor. + + + + * @param value The value. + */ + public final void writeWidthProperty(double value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openWidthProperty(); + try { + writer.writeNumber(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the width property as a number value. The width property specifies the width of the corridor, which is the distance between the edges of the corridor. + + + + + + + * @param dates The dates at which the value is specified. + * @param values The value corresponding to each date. + * @param startIndex The index of the first element to use in the `values` collection. + * @param length The number of elements to use from the `values` collection. + */ + public final void writeWidthProperty(List dates, List values, int startIndex, int length) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openWidthProperty(); + try { + writer.writeNumber(dates, values, startIndex, length); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the width property as a reference value. The width property specifies the width of the corridor, which is the distance between the edges of the corridor. + + + + * @param value The reference. + */ + public final void writeWidthPropertyReference(Reference value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openWidthProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the width property as a reference value. The width property specifies the width of the corridor, which is the distance between the edges of the corridor. + + + + * @param value The earliest date of the interval. + */ + public final void writeWidthPropertyReference(String value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openWidthProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the width property as a reference value. The width property specifies the width of the corridor, which is the distance between the edges of the corridor. + + + + + * @param identifier The identifier of the object which contains the referenced property. + * @param propertyName The property on the referenced object. + */ + public final void writeWidthPropertyReference(String identifier, String propertyName) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openWidthProperty(); + try { + writer.writeReference(identifier, propertyName); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the width property as a reference value. The width property specifies the width of the corridor, which is the distance between the edges of the corridor. + + + + + * @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 writeWidthPropertyReference(String identifier, String[] propertyNames) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openWidthProperty(); + try { + writer.writeReference(identifier, propertyNames); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * Gets the writer for the height property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The height property defines the height of the corridor, which is the altitude of the corridor relative to the surface. + + + */ + public final DoubleCesiumWriter getHeightWriter() { + return m_height.getValue(); + } + + /** + * + Opens and returns the writer for the height property. The height property defines the height of the corridor, which is the altitude of the corridor relative to the surface. + + + */ + public final DoubleCesiumWriter openHeightProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getHeightWriter()); + } + + /** + * + Writes a value for the height property as a number value. The height property specifies the height of the corridor, which is the altitude of the corridor relative to the surface. + + + + * @param value The value. + */ + public final void writeHeightProperty(double value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openHeightProperty(); + try { + writer.writeNumber(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the height property as a number value. The height property specifies the height of the corridor, which is the altitude of the corridor relative to the surface. + + + + + + + * @param dates The dates at which the value is specified. + * @param values The value corresponding to each date. + * @param startIndex The index of the first element to use in the `values` collection. + * @param length The number of elements to use from the `values` collection. + */ + public final void writeHeightProperty(List dates, List values, int startIndex, int length) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openHeightProperty(); + try { + writer.writeNumber(dates, values, startIndex, length); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the height property as a reference value. The height property specifies the height of the corridor, which is the altitude of the corridor relative to the surface. + + + + * @param value The reference. + */ + public final void writeHeightPropertyReference(Reference value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openHeightProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the height property as a reference value. The height property specifies the height of the corridor, which is the altitude of the corridor relative to the surface. + + + + * @param value The earliest date of the interval. + */ + public final void writeHeightPropertyReference(String value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openHeightProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the height property as a reference value. The height property specifies the height of the corridor, which is the altitude of the corridor relative to the surface. + + + + + * @param identifier The identifier of the object which contains the referenced property. + * @param propertyName The property on the referenced object. + */ + public final void writeHeightPropertyReference(String identifier, String propertyName) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openHeightProperty(); + try { + writer.writeReference(identifier, propertyName); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the height property as a reference value. The height property specifies the height of the corridor, which is the altitude of the corridor relative to the surface. + + + + + * @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 writeHeightPropertyReference(String identifier, String[] propertyNames) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openHeightProperty(); + try { + writer.writeReference(identifier, propertyNames); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * Gets the writer for the extrudedHeight property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The extrudedHeight property defines the extruded height of the corridor, which is the altitude of the corridor's extruded face relative to the surface. + + + */ + public final DoubleCesiumWriter getExtrudedHeightWriter() { + return m_extrudedHeight.getValue(); + } + + /** + * + Opens and returns the writer for the extrudedHeight property. The extrudedHeight property defines the extruded height of the corridor, which is the altitude of the corridor's extruded face relative to the surface. + + + */ + public final DoubleCesiumWriter openExtrudedHeightProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getExtrudedHeightWriter()); + } + + /** + * + Writes a value for the extrudedHeight property as a number value. The extrudedHeight property specifies the extruded height of the corridor, which is the altitude of the corridor's extruded face relative to the surface. + + + + * @param value The value. + */ + public final void writeExtrudedHeightProperty(double value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openExtrudedHeightProperty(); + try { + writer.writeNumber(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the extrudedHeight property as a number value. The extrudedHeight property specifies the extruded height of the corridor, which is the altitude of the corridor's extruded face relative to the surface. + + + + + + + * @param dates The dates at which the value is specified. + * @param values The value corresponding to each date. + * @param startIndex The index of the first element to use in the `values` collection. + * @param length The number of elements to use from the `values` collection. + */ + public final void writeExtrudedHeightProperty(List dates, List values, int startIndex, int length) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openExtrudedHeightProperty(); + try { + writer.writeNumber(dates, values, startIndex, length); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the extrudedHeight property as a reference value. The extrudedHeight property specifies the extruded height of the corridor, which is the altitude of the corridor's extruded face relative to the surface. + + + + * @param value The reference. + */ + public final void writeExtrudedHeightPropertyReference(Reference value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openExtrudedHeightProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the extrudedHeight property as a reference value. The extrudedHeight property specifies the extruded height of the corridor, which is the altitude of the corridor's extruded face relative to the surface. + + + + * @param value The earliest date of the interval. + */ + public final void writeExtrudedHeightPropertyReference(String value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openExtrudedHeightProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the extrudedHeight property as a reference value. The extrudedHeight property specifies the extruded height of the corridor, which is the altitude of the corridor's extruded face relative to the surface. + + + + + * @param identifier The identifier of the object which contains the referenced property. + * @param propertyName The property on the referenced object. + */ + public final void writeExtrudedHeightPropertyReference(String identifier, String propertyName) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openExtrudedHeightProperty(); + try { + writer.writeReference(identifier, propertyName); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the extrudedHeight property as a reference value. The extrudedHeight property specifies the extruded height of the corridor, which is the altitude of the corridor's extruded face relative to the surface. + + + + + * @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 writeExtrudedHeightPropertyReference(String identifier, String[] propertyNames) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openExtrudedHeightProperty(); + try { + writer.writeReference(identifier, propertyNames); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * Gets the writer for the cornerType property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The cornerType property defines the style of the corners of the corridor. + + + */ + public final CornerTypeCesiumWriter getCornerTypeWriter() { + return m_cornerType.getValue(); + } + + /** + * + Opens and returns the writer for the cornerType property. The cornerType property defines the style of the corners of the corridor. + + + */ + public final CornerTypeCesiumWriter openCornerTypeProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getCornerTypeWriter()); + } + + /** + * + Writes a value for the cornerType property as a CornerType value. The cornerType property specifies the style of the corners of the corridor. + + + + * @param value The style of a corner. + */ + public final void writeCornerTypeProperty(CesiumCornerType value) { + { + cesiumlanguagewriter.CornerTypeCesiumWriter writer = openCornerTypeProperty(); + try { + writer.writeCornerType(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the cornerType property as a reference value. The cornerType property specifies the style of the corners of the corridor. + + + + * @param value The reference. + */ + public final void writeCornerTypePropertyReference(Reference value) { + { + cesiumlanguagewriter.CornerTypeCesiumWriter writer = openCornerTypeProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the cornerType property as a reference value. The cornerType property specifies the style of the corners of the corridor. + + + + * @param value The earliest date of the interval. + */ + public final void writeCornerTypePropertyReference(String value) { + { + cesiumlanguagewriter.CornerTypeCesiumWriter writer = openCornerTypeProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the cornerType property as a reference value. The cornerType property specifies the style of the corners of the corridor. + + + + + * @param identifier The identifier of the object which contains the referenced property. + * @param propertyName The property on the referenced object. + */ + public final void writeCornerTypePropertyReference(String identifier, String propertyName) { + { + cesiumlanguagewriter.CornerTypeCesiumWriter writer = openCornerTypeProperty(); + try { + writer.writeReference(identifier, propertyName); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the cornerType property as a reference value. The cornerType property specifies the style of the corners of the corridor. + + + + + * @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 writeCornerTypePropertyReference(String identifier, String[] propertyNames) { + { + cesiumlanguagewriter.CornerTypeCesiumWriter writer = openCornerTypeProperty(); + try { + writer.writeReference(identifier, propertyNames); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * Gets the writer for the granularity property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The granularity property defines the sampling distance, in radians. + + + */ + public final DoubleCesiumWriter getGranularityWriter() { + return m_granularity.getValue(); + } + + /** + * + Opens and returns the writer for the granularity property. The granularity property defines the sampling distance, in radians. + + + */ + public final DoubleCesiumWriter openGranularityProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getGranularityWriter()); + } + + /** + * + Writes a value for the granularity property as a number value. The granularity property specifies the sampling distance, in radians. + + + + * @param value The value. + */ + public final void writeGranularityProperty(double value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openGranularityProperty(); + try { + writer.writeNumber(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the granularity property as a number value. The granularity property specifies the sampling distance, in radians. + + + + + + + * @param dates The dates at which the value is specified. + * @param values The value corresponding to each date. + * @param startIndex The index of the first element to use in the `values` collection. + * @param length The number of elements to use from the `values` collection. + */ + public final void writeGranularityProperty(List dates, List values, int startIndex, int length) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openGranularityProperty(); + try { + writer.writeNumber(dates, values, startIndex, length); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the granularity property as a reference value. The granularity property specifies the sampling distance, in radians. + + + + * @param value The reference. + */ + public final void writeGranularityPropertyReference(Reference value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openGranularityProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the granularity property as a reference value. The granularity property specifies the sampling distance, in radians. + + + + * @param value The earliest date of the interval. + */ + public final void writeGranularityPropertyReference(String value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openGranularityProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the granularity property as a reference value. The granularity property specifies the sampling distance, in radians. + + + + + * @param identifier The identifier of the object which contains the referenced property. + * @param propertyName The property on the referenced object. + */ + public final void writeGranularityPropertyReference(String identifier, String propertyName) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openGranularityProperty(); + try { + writer.writeReference(identifier, propertyName); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the granularity property as a reference value. The granularity property specifies the sampling distance, in radians. + + + + + * @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 writeGranularityPropertyReference(String identifier, String[] propertyNames) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openGranularityProperty(); + try { + writer.writeReference(identifier, propertyNames); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * Gets the writer for the fill property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The fill property defines whether or not the corridor is filled. + + + */ + public final BooleanCesiumWriter getFillWriter() { + return m_fill.getValue(); + } + + /** + * + Opens and returns the writer for the fill property. The fill property defines whether or not the corridor is filled. + + + */ + public final BooleanCesiumWriter openFillProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getFillWriter()); + } + + /** + * + Writes a value for the fill property as a boolean value. The fill property specifies whether or not the corridor is filled. + + + + * @param value The value. + */ + public final void writeFillProperty(boolean value) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openFillProperty(); + try { + writer.writeBoolean(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the fill property as a reference value. The fill property specifies whether or not the corridor is filled. + + + + * @param value The reference. + */ + public final void writeFillPropertyReference(Reference value) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openFillProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the fill property as a reference value. The fill property specifies whether or not the corridor is filled. + + + + * @param value The earliest date of the interval. + */ + public final void writeFillPropertyReference(String value) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openFillProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the fill property as a reference value. The fill property specifies whether or not the corridor is filled. + + + + + * @param identifier The identifier of the object which contains the referenced property. + * @param propertyName The property on the referenced object. + */ + public final void writeFillPropertyReference(String identifier, String propertyName) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openFillProperty(); + try { + writer.writeReference(identifier, propertyName); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the fill property as a reference value. The fill property specifies whether or not the corridor is filled. + + + + + * @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 writeFillPropertyReference(String identifier, String[] propertyNames) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openFillProperty(); + try { + writer.writeReference(identifier, propertyNames); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * Gets the writer for the material property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The material property defines the material to display on the surface of the corridor. + + + */ + public final MaterialCesiumWriter getMaterialWriter() { + return m_material.getValue(); + } + + /** + * + Opens and returns the writer for the material property. The material property defines the material to display on the surface of the corridor. + + + */ + public final MaterialCesiumWriter openMaterialProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getMaterialWriter()); + } + + /** + * Gets the writer for the outline property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The outline property defines whether or not the corridor is outlined. + + + */ + public final BooleanCesiumWriter getOutlineWriter() { + return m_outline.getValue(); + } + + /** + * + Opens and returns the writer for the outline property. The outline property defines whether or not the corridor is outlined. + + + */ + public final BooleanCesiumWriter openOutlineProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getOutlineWriter()); + } + + /** + * + Writes a value for the outline property as a boolean value. The outline property specifies whether or not the corridor is outlined. + + + + * @param value The value. + */ + public final void writeOutlineProperty(boolean value) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openOutlineProperty(); + try { + writer.writeBoolean(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outline property as a reference value. The outline property specifies whether or not the corridor is outlined. + + + + * @param value The reference. + */ + public final void writeOutlinePropertyReference(Reference value) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openOutlineProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outline property as a reference value. The outline property specifies whether or not the corridor is outlined. + + + + * @param value The earliest date of the interval. + */ + public final void writeOutlinePropertyReference(String value) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openOutlineProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outline property as a reference value. The outline property specifies whether or not the corridor is outlined. + + + + + * @param identifier The identifier of the object which contains the referenced property. + * @param propertyName The property on the referenced object. + */ + public final void writeOutlinePropertyReference(String identifier, String propertyName) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openOutlineProperty(); + try { + writer.writeReference(identifier, propertyName); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outline property as a reference value. The outline property specifies whether or not the corridor is outlined. + + + + + * @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 writeOutlinePropertyReference(String identifier, String[] propertyNames) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openOutlineProperty(); + try { + writer.writeReference(identifier, propertyNames); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * Gets the writer for the outlineColor property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The outlineColor property defines the color of the corridor outline. + + + */ + public final ColorCesiumWriter getOutlineColorWriter() { + return m_outlineColor.getValue(); + } + + /** + * + Opens and returns the writer for the outlineColor property. The outlineColor property defines the color of the corridor outline. + + + */ + public final ColorCesiumWriter openOutlineColorProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getOutlineColorWriter()); + } + + /** + * + Writes a value for the outlineColor property as a rgba value. The outlineColor property specifies the color of the corridor outline. + + + + * @param color The color. + */ + public final void writeOutlineColorProperty(Color color) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openOutlineColorProperty(); + try { + writer.writeRgba(color); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineColor property as a rgba value. The outlineColor property specifies the color of the corridor outline. + + + + + + + * @param red The red component in the range 0 to 255. + * @param green The green component in the range 0 to 255. + * @param blue The blue component in the range 0 to 255. + * @param alpha The alpha component in the range 0 to 255. + */ + public final void writeOutlineColorProperty(int red, int green, int blue, int alpha) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openOutlineColorProperty(); + try { + writer.writeRgba(red, green, blue, alpha); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineColor property as a rgba value. The outlineColor property specifies the color of the corridor outline. + + + + + + + * @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 use in the `colors` collection. + * @param length The number of elements to use from the `colors` collection. + */ + public final void writeOutlineColorProperty(List dates, List colors, int startIndex, int length) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openOutlineColorProperty(); + try { + writer.writeRgba(dates, colors, startIndex, length); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineColor property as a rgbaf value. The outlineColor property specifies the color of the corridor outline. + + + + + + + * @param red The red component in the range 0 to 1.0. + * @param green The green component in the range 0 to 1.0. + * @param blue The blue component in the range 0 to 1.0. + * @param alpha The alpha component in the range 0 to 1.0. + */ + public final void writeOutlineColorPropertyRgbaf(float red, float green, float blue, float alpha) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openOutlineColorProperty(); + try { + writer.writeRgbaf(red, green, blue, alpha); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineColor property as a reference value. The outlineColor property specifies the color of the corridor outline. + + + + * @param value The reference. + */ + public final void writeOutlineColorPropertyReference(Reference value) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openOutlineColorProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineColor property as a reference value. The outlineColor property specifies the color of the corridor outline. + + + + * @param value The earliest date of the interval. + */ + public final void writeOutlineColorPropertyReference(String value) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openOutlineColorProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineColor property as a reference value. The outlineColor property specifies the color of the corridor outline. + + + + + * @param identifier The identifier of the object which contains the referenced property. + * @param propertyName The property on the referenced object. + */ + public final void writeOutlineColorPropertyReference(String identifier, String propertyName) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openOutlineColorProperty(); + try { + writer.writeReference(identifier, propertyName); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineColor property as a reference value. The outlineColor property specifies the color of the corridor outline. + + + + + * @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 writeOutlineColorPropertyReference(String identifier, String[] propertyNames) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openOutlineColorProperty(); + try { + writer.writeReference(identifier, propertyNames); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * Gets the writer for the outlineWidth property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The outlineWidth property defines the width of the corridor outline. + + + */ + public final DoubleCesiumWriter getOutlineWidthWriter() { + return m_outlineWidth.getValue(); + } + + /** + * + Opens and returns the writer for the outlineWidth property. The outlineWidth property defines the width of the corridor outline. + + + */ + public final DoubleCesiumWriter openOutlineWidthProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getOutlineWidthWriter()); + } + + /** + * + Writes a value for the outlineWidth property as a number value. The outlineWidth property specifies the width of the corridor outline. + + + + * @param value The value. + */ + public final void writeOutlineWidthProperty(double value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openOutlineWidthProperty(); + try { + writer.writeNumber(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineWidth property as a number value. The outlineWidth property specifies the width of the corridor outline. + + + + + + + * @param dates The dates at which the value is specified. + * @param values The value corresponding to each date. + * @param startIndex The index of the first element to use in the `values` collection. + * @param length The number of elements to use from the `values` collection. + */ + public final void writeOutlineWidthProperty(List dates, List values, int startIndex, int length) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openOutlineWidthProperty(); + try { + writer.writeNumber(dates, values, startIndex, length); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineWidth property as a reference value. The outlineWidth property specifies the width of the corridor outline. + + + + * @param value The reference. + */ + public final void writeOutlineWidthPropertyReference(Reference value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openOutlineWidthProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineWidth property as a reference value. The outlineWidth property specifies the width of the corridor outline. + + + + * @param value The earliest date of the interval. + */ + public final void writeOutlineWidthPropertyReference(String value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openOutlineWidthProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineWidth property as a reference value. The outlineWidth property specifies the width of the corridor outline. + + + + + * @param identifier The identifier of the object which contains the referenced property. + * @param propertyName The property on the referenced object. + */ + public final void writeOutlineWidthPropertyReference(String identifier, String propertyName) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openOutlineWidthProperty(); + try { + writer.writeReference(identifier, propertyName); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineWidth property as a reference value. The outlineWidth property specifies the width of the corridor outline. + + + + + * @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 writeOutlineWidthPropertyReference(String identifier, String[] propertyNames) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openOutlineWidthProperty(); + try { + writer.writeReference(identifier, propertyNames); + } finally { + DisposeHelper.dispose(writer); + } + } + } +} \ No newline at end of file diff --git a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/CylinderCesiumWriter.java b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/CylinderCesiumWriter.java new file mode 100644 index 00000000..8e508d2b --- /dev/null +++ b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/CylinderCesiumWriter.java @@ -0,0 +1,1305 @@ +package cesiumlanguagewriter; + + +import agi.foundation.compatibility.*; +import agi.foundation.compatibility.DisposeHelper; +import agi.foundation.compatibility.Func1; +import agi.foundation.compatibility.Lazy; +import cesiumlanguagewriter.advanced.*; +import cesiumlanguagewriter.BooleanCesiumWriter; +import cesiumlanguagewriter.ColorCesiumWriter; +import cesiumlanguagewriter.DoubleCesiumWriter; +import cesiumlanguagewriter.MaterialCesiumWriter; +import java.awt.Color; +import java.util.List; + +/** + * + Writes a Cylinder to a {@link CesiumOutputStream}. A Cylinder is a cylinder. + + + */ +public class CylinderCesiumWriter extends CesiumPropertyWriter { + /** + * + The name of the show property. + + + */ + public static final String ShowPropertyName = "show"; + /** + * + The name of the length property. + + + */ + public static final String LengthPropertyName = "length"; + /** + * + The name of the topRadius property. + + + */ + public static final String TopRadiusPropertyName = "topRadius"; + /** + * + The name of the bottomRadius property. + + + */ + public static final String BottomRadiusPropertyName = "bottomRadius"; + /** + * + The name of the fill property. + + + */ + public static final String FillPropertyName = "fill"; + /** + * + The name of the material property. + + + */ + public static final String MaterialPropertyName = "material"; + /** + * + The name of the outline property. + + + */ + public static final String OutlinePropertyName = "outline"; + /** + * + The name of the outlineColor property. + + + */ + public static final String OutlineColorPropertyName = "outlineColor"; + /** + * + The name of the outlineWidth property. + + + */ + public static final String OutlineWidthPropertyName = "outlineWidth"; + private Lazy m_show = new Lazy(new Func1() { + public cesiumlanguagewriter.BooleanCesiumWriter invoke() { + return new BooleanCesiumWriter(ShowPropertyName); + } + }, false); + private Lazy m_length = new Lazy(new Func1() { + public cesiumlanguagewriter.DoubleCesiumWriter invoke() { + return new DoubleCesiumWriter(LengthPropertyName); + } + }, false); + private Lazy m_topRadius = new Lazy(new Func1() { + public cesiumlanguagewriter.DoubleCesiumWriter invoke() { + return new DoubleCesiumWriter(TopRadiusPropertyName); + } + }, false); + private Lazy m_bottomRadius = new Lazy(new Func1() { + public cesiumlanguagewriter.DoubleCesiumWriter invoke() { + return new DoubleCesiumWriter(BottomRadiusPropertyName); + } + }, false); + private Lazy m_fill = new Lazy(new Func1() { + public cesiumlanguagewriter.BooleanCesiumWriter invoke() { + return new BooleanCesiumWriter(FillPropertyName); + } + }, false); + private Lazy m_material = new Lazy(new Func1() { + public cesiumlanguagewriter.MaterialCesiumWriter invoke() { + return new MaterialCesiumWriter(MaterialPropertyName); + } + }, false); + private Lazy m_outline = new Lazy(new Func1() { + public cesiumlanguagewriter.BooleanCesiumWriter invoke() { + return new BooleanCesiumWriter(OutlinePropertyName); + } + }, false); + private Lazy m_outlineColor = new Lazy(new Func1() { + public cesiumlanguagewriter.ColorCesiumWriter invoke() { + return new ColorCesiumWriter(OutlineColorPropertyName); + } + }, false); + private Lazy m_outlineWidth = new Lazy(new Func1() { + public cesiumlanguagewriter.DoubleCesiumWriter invoke() { + return new DoubleCesiumWriter(OutlineWidthPropertyName); + } + }, false); + + /** + * + Initializes a new instance. + + + */ + public CylinderCesiumWriter(String propertyName) { + super(propertyName); + } + + /** + * + Initializes a new instance as a copy of an existing instance. + + + + * @param existingInstance The existing instance to copy. + */ + protected CylinderCesiumWriter(CylinderCesiumWriter existingInstance) { + super(existingInstance); + } + + @Override + public CylinderCesiumWriter clone() { + return new CylinderCesiumWriter(this); + } + + /** + * Gets the writer for the show property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The show property defines whether or not the cylinder is shown. + + + */ + public final BooleanCesiumWriter getShowWriter() { + return m_show.getValue(); + } + + /** + * + Opens and returns the writer for the show property. The show property defines whether or not the cylinder is shown. + + + */ + public final BooleanCesiumWriter openShowProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getShowWriter()); + } + + /** + * + Writes a value for the show property as a boolean value. The show property specifies whether or not the cylinder is shown. + + + + * @param value The value. + */ + public final void writeShowProperty(boolean value) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openShowProperty(); + try { + writer.writeBoolean(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the show property as a reference value. The show property specifies whether or not the cylinder is shown. + + + + * @param value The reference. + */ + public final void writeShowPropertyReference(Reference value) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openShowProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the show property as a reference value. The show property specifies whether or not the cylinder is shown. + + + + * @param value The earliest date of the interval. + */ + public final void writeShowPropertyReference(String value) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openShowProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the show property as a reference value. The show property specifies whether or not the cylinder is shown. + + + + + * @param identifier The identifier of the object which contains the referenced property. + * @param propertyName The property on the referenced object. + */ + public final void writeShowPropertyReference(String identifier, String propertyName) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openShowProperty(); + try { + writer.writeReference(identifier, propertyName); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the show property as a reference value. The show property specifies whether or not the cylinder is shown. + + + + + * @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 writeShowPropertyReference(String identifier, String[] propertyNames) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openShowProperty(); + try { + writer.writeReference(identifier, propertyNames); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * Gets the writer for the length property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The length property defines the length of the cylinder. + + + */ + public final DoubleCesiumWriter getLengthWriter() { + return m_length.getValue(); + } + + /** + * + Opens and returns the writer for the length property. The length property defines the length of the cylinder. + + + */ + public final DoubleCesiumWriter openLengthProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getLengthWriter()); + } + + /** + * + Writes a value for the length property as a number value. The length property specifies the length of the cylinder. + + + + * @param value The value. + */ + public final void writeLengthProperty(double value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openLengthProperty(); + try { + writer.writeNumber(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the length property as a number value. The length property specifies the length of the cylinder. + + + + + + + * @param dates The dates at which the value is specified. + * @param values The value corresponding to each date. + * @param startIndex The index of the first element to use in the `values` collection. + * @param length The number of elements to use from the `values` collection. + */ + public final void writeLengthProperty(List dates, List values, int startIndex, int length) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openLengthProperty(); + try { + writer.writeNumber(dates, values, startIndex, length); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the length property as a reference value. The length property specifies the length of the cylinder. + + + + * @param value The reference. + */ + public final void writeLengthPropertyReference(Reference value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openLengthProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the length property as a reference value. The length property specifies the length of the cylinder. + + + + * @param value The earliest date of the interval. + */ + public final void writeLengthPropertyReference(String value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openLengthProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the length property as a reference value. The length property specifies the length of the cylinder. + + + + + * @param identifier The identifier of the object which contains the referenced property. + * @param propertyName The property on the referenced object. + */ + public final void writeLengthPropertyReference(String identifier, String propertyName) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openLengthProperty(); + try { + writer.writeReference(identifier, propertyName); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the length property as a reference value. The length property specifies the length of the cylinder. + + + + + * @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 writeLengthPropertyReference(String identifier, String[] propertyNames) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openLengthProperty(); + try { + writer.writeReference(identifier, propertyNames); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * Gets the writer for the topRadius property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The topRadius property defines the radius of the top of the cylinder. + + + */ + public final DoubleCesiumWriter getTopRadiusWriter() { + return m_topRadius.getValue(); + } + + /** + * + Opens and returns the writer for the topRadius property. The topRadius property defines the radius of the top of the cylinder. + + + */ + public final DoubleCesiumWriter openTopRadiusProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getTopRadiusWriter()); + } + + /** + * + Writes a value for the topRadius property as a number value. The topRadius property specifies the radius of the top of the cylinder. + + + + * @param value The value. + */ + public final void writeTopRadiusProperty(double value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openTopRadiusProperty(); + try { + writer.writeNumber(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the topRadius property as a number value. The topRadius property specifies the radius of the top of the cylinder. + + + + + + + * @param dates The dates at which the value is specified. + * @param values The value corresponding to each date. + * @param startIndex The index of the first element to use in the `values` collection. + * @param length The number of elements to use from the `values` collection. + */ + public final void writeTopRadiusProperty(List dates, List values, int startIndex, int length) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openTopRadiusProperty(); + try { + writer.writeNumber(dates, values, startIndex, length); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the topRadius property as a reference value. The topRadius property specifies the radius of the top of the cylinder. + + + + * @param value The reference. + */ + public final void writeTopRadiusPropertyReference(Reference value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openTopRadiusProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the topRadius property as a reference value. The topRadius property specifies the radius of the top of the cylinder. + + + + * @param value The earliest date of the interval. + */ + public final void writeTopRadiusPropertyReference(String value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openTopRadiusProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the topRadius property as a reference value. The topRadius property specifies the radius of the top of the cylinder. + + + + + * @param identifier The identifier of the object which contains the referenced property. + * @param propertyName The property on the referenced object. + */ + public final void writeTopRadiusPropertyReference(String identifier, String propertyName) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openTopRadiusProperty(); + try { + writer.writeReference(identifier, propertyName); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the topRadius property as a reference value. The topRadius property specifies the radius of the top of the cylinder. + + + + + * @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 writeTopRadiusPropertyReference(String identifier, String[] propertyNames) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openTopRadiusProperty(); + try { + writer.writeReference(identifier, propertyNames); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * Gets the writer for the bottomRadius property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The bottomRadius property defines the radius of the bottom of the cylinder. + + + */ + public final DoubleCesiumWriter getBottomRadiusWriter() { + return m_bottomRadius.getValue(); + } + + /** + * + Opens and returns the writer for the bottomRadius property. The bottomRadius property defines the radius of the bottom of the cylinder. + + + */ + public final DoubleCesiumWriter openBottomRadiusProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getBottomRadiusWriter()); + } + + /** + * + Writes a value for the bottomRadius property as a number value. The bottomRadius property specifies the radius of the bottom of the cylinder. + + + + * @param value The value. + */ + public final void writeBottomRadiusProperty(double value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openBottomRadiusProperty(); + try { + writer.writeNumber(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the bottomRadius property as a number value. The bottomRadius property specifies the radius of the bottom of the cylinder. + + + + + + + * @param dates The dates at which the value is specified. + * @param values The value corresponding to each date. + * @param startIndex The index of the first element to use in the `values` collection. + * @param length The number of elements to use from the `values` collection. + */ + public final void writeBottomRadiusProperty(List dates, List values, int startIndex, int length) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openBottomRadiusProperty(); + try { + writer.writeNumber(dates, values, startIndex, length); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the bottomRadius property as a reference value. The bottomRadius property specifies the radius of the bottom of the cylinder. + + + + * @param value The reference. + */ + public final void writeBottomRadiusPropertyReference(Reference value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openBottomRadiusProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the bottomRadius property as a reference value. The bottomRadius property specifies the radius of the bottom of the cylinder. + + + + * @param value The earliest date of the interval. + */ + public final void writeBottomRadiusPropertyReference(String value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openBottomRadiusProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the bottomRadius property as a reference value. The bottomRadius property specifies the radius of the bottom of the cylinder. + + + + + * @param identifier The identifier of the object which contains the referenced property. + * @param propertyName The property on the referenced object. + */ + public final void writeBottomRadiusPropertyReference(String identifier, String propertyName) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openBottomRadiusProperty(); + try { + writer.writeReference(identifier, propertyName); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the bottomRadius property as a reference value. The bottomRadius property specifies the radius of the bottom of the cylinder. + + + + + * @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 writeBottomRadiusPropertyReference(String identifier, String[] propertyNames) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openBottomRadiusProperty(); + try { + writer.writeReference(identifier, propertyNames); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * Gets the writer for the fill property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The fill property defines whether or not the cylinder is filled. + + + */ + public final BooleanCesiumWriter getFillWriter() { + return m_fill.getValue(); + } + + /** + * + Opens and returns the writer for the fill property. The fill property defines whether or not the cylinder is filled. + + + */ + public final BooleanCesiumWriter openFillProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getFillWriter()); + } + + /** + * + Writes a value for the fill property as a boolean value. The fill property specifies whether or not the cylinder is filled. + + + + * @param value The value. + */ + public final void writeFillProperty(boolean value) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openFillProperty(); + try { + writer.writeBoolean(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the fill property as a reference value. The fill property specifies whether or not the cylinder is filled. + + + + * @param value The reference. + */ + public final void writeFillPropertyReference(Reference value) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openFillProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the fill property as a reference value. The fill property specifies whether or not the cylinder is filled. + + + + * @param value The earliest date of the interval. + */ + public final void writeFillPropertyReference(String value) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openFillProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the fill property as a reference value. The fill property specifies whether or not the cylinder is filled. + + + + + * @param identifier The identifier of the object which contains the referenced property. + * @param propertyName The property on the referenced object. + */ + public final void writeFillPropertyReference(String identifier, String propertyName) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openFillProperty(); + try { + writer.writeReference(identifier, propertyName); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the fill property as a reference value. The fill property specifies whether or not the cylinder is filled. + + + + + * @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 writeFillPropertyReference(String identifier, String[] propertyNames) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openFillProperty(); + try { + writer.writeReference(identifier, propertyNames); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * Gets the writer for the material property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The material property defines the material to display on the surface of the cylinder. + + + */ + public final MaterialCesiumWriter getMaterialWriter() { + return m_material.getValue(); + } + + /** + * + Opens and returns the writer for the material property. The material property defines the material to display on the surface of the cylinder. + + + */ + public final MaterialCesiumWriter openMaterialProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getMaterialWriter()); + } + + /** + * Gets the writer for the outline property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The outline property defines whether or not the cylinder is outlined. + + + */ + public final BooleanCesiumWriter getOutlineWriter() { + return m_outline.getValue(); + } + + /** + * + Opens and returns the writer for the outline property. The outline property defines whether or not the cylinder is outlined. + + + */ + public final BooleanCesiumWriter openOutlineProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getOutlineWriter()); + } + + /** + * + Writes a value for the outline property as a boolean value. The outline property specifies whether or not the cylinder is outlined. + + + + * @param value The value. + */ + public final void writeOutlineProperty(boolean value) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openOutlineProperty(); + try { + writer.writeBoolean(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outline property as a reference value. The outline property specifies whether or not the cylinder is outlined. + + + + * @param value The reference. + */ + public final void writeOutlinePropertyReference(Reference value) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openOutlineProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outline property as a reference value. The outline property specifies whether or not the cylinder is outlined. + + + + * @param value The earliest date of the interval. + */ + public final void writeOutlinePropertyReference(String value) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openOutlineProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outline property as a reference value. The outline property specifies whether or not the cylinder is outlined. + + + + + * @param identifier The identifier of the object which contains the referenced property. + * @param propertyName The property on the referenced object. + */ + public final void writeOutlinePropertyReference(String identifier, String propertyName) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openOutlineProperty(); + try { + writer.writeReference(identifier, propertyName); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outline property as a reference value. The outline property specifies whether or not the cylinder is outlined. + + + + + * @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 writeOutlinePropertyReference(String identifier, String[] propertyNames) { + { + cesiumlanguagewriter.BooleanCesiumWriter writer = openOutlineProperty(); + try { + writer.writeReference(identifier, propertyNames); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * Gets the writer for the outlineColor property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The outlineColor property defines the color of the cylinder outline. + + + */ + public final ColorCesiumWriter getOutlineColorWriter() { + return m_outlineColor.getValue(); + } + + /** + * + Opens and returns the writer for the outlineColor property. The outlineColor property defines the color of the cylinder outline. + + + */ + public final ColorCesiumWriter openOutlineColorProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getOutlineColorWriter()); + } + + /** + * + Writes a value for the outlineColor property as a rgba value. The outlineColor property specifies the color of the cylinder outline. + + + + * @param color The color. + */ + public final void writeOutlineColorProperty(Color color) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openOutlineColorProperty(); + try { + writer.writeRgba(color); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineColor property as a rgba value. The outlineColor property specifies the color of the cylinder outline. + + + + + + + * @param red The red component in the range 0 to 255. + * @param green The green component in the range 0 to 255. + * @param blue The blue component in the range 0 to 255. + * @param alpha The alpha component in the range 0 to 255. + */ + public final void writeOutlineColorProperty(int red, int green, int blue, int alpha) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openOutlineColorProperty(); + try { + writer.writeRgba(red, green, blue, alpha); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineColor property as a rgba value. The outlineColor property specifies the color of the cylinder outline. + + + + + + + * @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 use in the `colors` collection. + * @param length The number of elements to use from the `colors` collection. + */ + public final void writeOutlineColorProperty(List dates, List colors, int startIndex, int length) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openOutlineColorProperty(); + try { + writer.writeRgba(dates, colors, startIndex, length); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineColor property as a rgbaf value. The outlineColor property specifies the color of the cylinder outline. + + + + + + + * @param red The red component in the range 0 to 1.0. + * @param green The green component in the range 0 to 1.0. + * @param blue The blue component in the range 0 to 1.0. + * @param alpha The alpha component in the range 0 to 1.0. + */ + public final void writeOutlineColorPropertyRgbaf(float red, float green, float blue, float alpha) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openOutlineColorProperty(); + try { + writer.writeRgbaf(red, green, blue, alpha); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineColor property as a reference value. The outlineColor property specifies the color of the cylinder outline. + + + + * @param value The reference. + */ + public final void writeOutlineColorPropertyReference(Reference value) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openOutlineColorProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineColor property as a reference value. The outlineColor property specifies the color of the cylinder outline. + + + + * @param value The earliest date of the interval. + */ + public final void writeOutlineColorPropertyReference(String value) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openOutlineColorProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineColor property as a reference value. The outlineColor property specifies the color of the cylinder outline. + + + + + * @param identifier The identifier of the object which contains the referenced property. + * @param propertyName The property on the referenced object. + */ + public final void writeOutlineColorPropertyReference(String identifier, String propertyName) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openOutlineColorProperty(); + try { + writer.writeReference(identifier, propertyName); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineColor property as a reference value. The outlineColor property specifies the color of the cylinder outline. + + + + + * @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 writeOutlineColorPropertyReference(String identifier, String[] propertyNames) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openOutlineColorProperty(); + try { + writer.writeReference(identifier, propertyNames); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * Gets the writer for the outlineWidth property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The outlineWidth property defines the width of the cylinder outline. + + + */ + public final DoubleCesiumWriter getOutlineWidthWriter() { + return m_outlineWidth.getValue(); + } + + /** + * + Opens and returns the writer for the outlineWidth property. The outlineWidth property defines the width of the cylinder outline. + + + */ + public final DoubleCesiumWriter openOutlineWidthProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getOutlineWidthWriter()); + } + + /** + * + Writes a value for the outlineWidth property as a number value. The outlineWidth property specifies the width of the cylinder outline. + + + + * @param value The value. + */ + public final void writeOutlineWidthProperty(double value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openOutlineWidthProperty(); + try { + writer.writeNumber(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineWidth property as a number value. The outlineWidth property specifies the width of the cylinder outline. + + + + + + + * @param dates The dates at which the value is specified. + * @param values The value corresponding to each date. + * @param startIndex The index of the first element to use in the `values` collection. + * @param length The number of elements to use from the `values` collection. + */ + public final void writeOutlineWidthProperty(List dates, List values, int startIndex, int length) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openOutlineWidthProperty(); + try { + writer.writeNumber(dates, values, startIndex, length); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineWidth property as a reference value. The outlineWidth property specifies the width of the cylinder outline. + + + + * @param value The reference. + */ + public final void writeOutlineWidthPropertyReference(Reference value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openOutlineWidthProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineWidth property as a reference value. The outlineWidth property specifies the width of the cylinder outline. + + + + * @param value The earliest date of the interval. + */ + public final void writeOutlineWidthPropertyReference(String value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openOutlineWidthProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineWidth property as a reference value. The outlineWidth property specifies the width of the cylinder outline. + + + + + * @param identifier The identifier of the object which contains the referenced property. + * @param propertyName The property on the referenced object. + */ + public final void writeOutlineWidthPropertyReference(String identifier, String propertyName) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openOutlineWidthProperty(); + try { + writer.writeReference(identifier, propertyName); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the outlineWidth property as a reference value. The outlineWidth property specifies the width of the cylinder outline. + + + + + * @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 writeOutlineWidthPropertyReference(String identifier, String[] propertyNames) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openOutlineWidthProperty(); + try { + writer.writeReference(identifier, propertyNames); + } finally { + DisposeHelper.dispose(writer); + } + } + } +} \ No newline at end of file diff --git a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PacketCesiumWriter.java b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PacketCesiumWriter.java index 4d38c7d8..05fbaa0f 100644 --- a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PacketCesiumWriter.java +++ b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PacketCesiumWriter.java @@ -7,9 +7,12 @@ import agi.foundation.compatibility.Lazy; import cesiumlanguagewriter.advanced.*; import cesiumlanguagewriter.BillboardCesiumWriter; +import cesiumlanguagewriter.BoxCesiumWriter; import cesiumlanguagewriter.ClockCesiumWriter; import cesiumlanguagewriter.ConicSensorCesiumWriter; +import cesiumlanguagewriter.CorridorCesiumWriter; import cesiumlanguagewriter.CustomPatternSensorCesiumWriter; +import cesiumlanguagewriter.CylinderCesiumWriter; import cesiumlanguagewriter.EllipseCesiumWriter; import cesiumlanguagewriter.EllipsoidCesiumWriter; import cesiumlanguagewriter.FanCesiumWriter; @@ -173,6 +176,27 @@ public class PacketCesiumWriter extends CesiumElementWriter { */ public static final String EllipsePropertyName = "ellipse"; + /** + * + The name of the box property. + + + */ + public static final String BoxPropertyName = "box"; + /** + * + The name of the cylinder property. + + + */ + public static final String CylinderPropertyName = "cylinder"; + /** + * + The name of the corridor property. + + + */ + public static final String CorridorPropertyName = "corridor"; /** * The name of the agi_conicSensor property. @@ -273,6 +297,21 @@ public cesiumlanguagewriter.EllipseCesiumWriter invoke() { return new EllipseCesiumWriter(EllipsePropertyName); } }, false); + private Lazy m_box = new Lazy(new Func1() { + public cesiumlanguagewriter.BoxCesiumWriter invoke() { + return new BoxCesiumWriter(BoxPropertyName); + } + }, false); + private Lazy m_cylinder = new Lazy(new Func1() { + public cesiumlanguagewriter.CylinderCesiumWriter invoke() { + return new CylinderCesiumWriter(CylinderPropertyName); + } + }, false); + private Lazy m_corridor = new Lazy(new Func1() { + public cesiumlanguagewriter.CorridorCesiumWriter invoke() { + return new CorridorCesiumWriter(CorridorPropertyName); + } + }, false); private Lazy m_agi_conicSensor = new Lazy(new Func1() { public cesiumlanguagewriter.ConicSensorCesiumWriter invoke() { return new ConicSensorCesiumWriter(ConicSensorPropertyName); @@ -1313,6 +1352,63 @@ public final EllipseCesiumWriter openEllipseProperty() { return this. openAndReturn(getEllipseWriter()); } + /** + * Gets the writer for the box property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The box property defines a box, which is a closed rectangular cuboid. The box is positioned and oriented using the `position` and `orientation` properties. + + + */ + public final BoxCesiumWriter getBoxWriter() { + return m_box.getValue(); + } + + /** + * + Opens and returns the writer for the box property. The box property defines a box, which is a closed rectangular cuboid. The box is positioned and oriented using the `position` and `orientation` properties. + + + */ + public final BoxCesiumWriter openBoxProperty() { + return this. openAndReturn(getBoxWriter()); + } + + /** + * Gets the writer for the cylinder property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The cylinder property defines a cylinder. The cylinder is positioned and oriented using the `position` and `orientation` properties. + + + */ + public final CylinderCesiumWriter getCylinderWriter() { + return m_cylinder.getValue(); + } + + /** + * + Opens and returns the writer for the cylinder property. The cylinder property defines a cylinder. The cylinder is positioned and oriented using the `position` and `orientation` properties. + + + */ + public final CylinderCesiumWriter openCylinderProperty() { + return this. openAndReturn(getCylinderWriter()); + } + + /** + * Gets the writer for the corridor property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The corridor property defines a corridor, which is a shape defined by a centerline and width. + + + */ + public final CorridorCesiumWriter getCorridorWriter() { + return m_corridor.getValue(); + } + + /** + * + Opens and returns the writer for the corridor property. The corridor property defines a corridor, which is a shape defined by a centerline and width. + + + */ + public final CorridorCesiumWriter openCorridorProperty() { + return this. openAndReturn(getCorridorWriter()); + } + /** * Gets the writer for the agi_conicSensor property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The agi_conicSensor property defines a conical sensor volume taking into account occlusion of an ellipsoid, i.e., the globe. The sensor is is positioned and oriented using the `position` and `orientation` properties. diff --git a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/advanced/CesiumFormattingHelper.java b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/advanced/CesiumFormattingHelper.java index f161c3e5..2820b7d8 100644 --- a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/advanced/CesiumFormattingHelper.java +++ b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/advanced/CesiumFormattingHelper.java @@ -458,6 +458,34 @@ public static String labelStyleToString(CesiumLabelStyle labelStyle) { } } + /** + * + Converts a {@link CesiumCornerType} to the corresponding string in a + CZML stream. + + + + + * @param cornerType The label style to convert. + * @return The string representing the specified {@link CesiumCornerType}. + */ + public static String cornerTypeToString(CesiumCornerType cornerType) { + switch (cornerType) { + case ROUNDED: { + return "ROUNDED"; + } + case MITERED: { + return "MITERED"; + } + case BEVELED: { + return "BEVELED"; + } + default: { + throw new ArgumentException(CesiumLocalization.getUnknownEnumerationValue(), "cornerType"); + } + } + } + /** * Converts a {@link CesiumLabelStyle} to the corresponding string in a diff --git a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/advanced/CesiumPropertyWriter.java b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/advanced/CesiumPropertyWriter.java index 82cbbfd7..8eaae2b1 100644 --- a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/advanced/CesiumPropertyWriter.java +++ b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/advanced/CesiumPropertyWriter.java @@ -268,7 +268,8 @@ final protected void openIntervalIfNecessary() { final private TDerived copyForInterval() { TDerived result = clone(); - result.m_elementType = ElementType.INTERVAL; + CesiumPropertyWriter cesiumPropertyWriter = result; + cesiumPropertyWriter.m_elementType = ElementType.INTERVAL; return result; }