From 40b3d690f006a56da11a91dd856621cc9eee174c Mon Sep 17 00:00:00 2001 From: Matthew Amato Date: Thu, 10 Jul 2014 10:36:08 -0400 Subject: [PATCH 1/3] Make Polyline and Path use materials Get rid of most invidual properties and use materials instead Add PolylineOutline and PolylineGlow materials. --- DotNet/CesiumLanguageWriter.sln | 2 + .../CesiumLanguageWriter.csproj | 2 + .../Generated/MaterialCesiumWriter.cs | 46 ++ .../Generated/PathCesiumWriter.cs | 356 +--------- .../Generated/PolylineCesiumWriter.cs | 356 +--------- .../PolylineGlowMaterialCesiumWriter.cs | 271 ++++++++ .../PolylineOutlineMaterialCesiumWriter.cs | 401 ++++++++++++ DotNet/ShapefileToCesiumLanguage/Polyline.cs | 6 +- .../ShapefileToCesiumLanguageTests.cs | 2 +- .../WebGlGlobeJsonToCesiumLanguage/Series.cs | 7 +- .../TestWebGlGlobeJsonConverter.cs | 4 +- .../MaterialCesiumWriter.java | 67 ++ .../PathCesiumWriter.java | 561 +--------------- .../PolylineCesiumWriter.java | 561 +--------------- .../PolylineGlowMaterialCesiumWriter.java | 410 ++++++++++++ .../PolylineOutlineMaterialCesiumWriter.java | 616 ++++++++++++++++++ Schema/Material.jsonschema | 10 +- Schema/Path.jsonschema | 14 +- Schema/Polyline.jsonschema | 14 +- Schema/PolylineGlowMaterial.jsonschema | 16 + Schema/PolylineOutlineMaterial.jsonschema | 20 + 21 files changed, 1922 insertions(+), 1820 deletions(-) create mode 100644 DotNet/CesiumLanguageWriter/Generated/PolylineGlowMaterialCesiumWriter.cs create mode 100644 DotNet/CesiumLanguageWriter/Generated/PolylineOutlineMaterialCesiumWriter.cs create mode 100644 Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PolylineGlowMaterialCesiumWriter.java create mode 100644 Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PolylineOutlineMaterialCesiumWriter.java create mode 100644 Schema/PolylineGlowMaterial.jsonschema create mode 100644 Schema/PolylineOutlineMaterial.jsonschema diff --git a/DotNet/CesiumLanguageWriter.sln b/DotNet/CesiumLanguageWriter.sln index 0cd42220..540b8877 100644 --- a/DotNet/CesiumLanguageWriter.sln +++ b/DotNet/CesiumLanguageWriter.sln @@ -51,6 +51,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Schema", "Schema", "{04E49F ..\Schema\Point.jsonschema = ..\Schema\Point.jsonschema ..\Schema\Polygon.jsonschema = ..\Schema\Polygon.jsonschema ..\Schema\Polyline.jsonschema = ..\Schema\Polyline.jsonschema + ..\Schema\PolylineGlowMaterial.jsonschema = ..\Schema\PolylineGlowMaterial.jsonschema + ..\Schema\PolylineOutlineMaterial.jsonschema = ..\Schema\PolylineOutlineMaterial.jsonschema ..\Schema\Position.jsonschema = ..\Schema\Position.jsonschema ..\Schema\PositionList.jsonschema = ..\Schema\PositionList.jsonschema ..\Schema\Pyramid.jsonschema = ..\Schema\Pyramid.jsonschema diff --git a/DotNet/CesiumLanguageWriter/CesiumLanguageWriter.csproj b/DotNet/CesiumLanguageWriter/CesiumLanguageWriter.csproj index 5c1f8805..349b090e 100644 --- a/DotNet/CesiumLanguageWriter/CesiumLanguageWriter.csproj +++ b/DotNet/CesiumLanguageWriter/CesiumLanguageWriter.csproj @@ -108,6 +108,8 @@ + + diff --git a/DotNet/CesiumLanguageWriter/Generated/MaterialCesiumWriter.cs b/DotNet/CesiumLanguageWriter/Generated/MaterialCesiumWriter.cs index 2b72c47c..55cddf00 100644 --- a/DotNet/CesiumLanguageWriter/Generated/MaterialCesiumWriter.cs +++ b/DotNet/CesiumLanguageWriter/Generated/MaterialCesiumWriter.cs @@ -33,10 +33,22 @@ public class MaterialCesiumWriter : CesiumPropertyWriter /// public const string StripePropertyName = "stripe"; + /// + /// The name of the polylineOutline property. + /// + public const string PolylineOutlinePropertyName = "polylineOutline"; + + /// + /// The name of the polylineGlow property. + /// + public const string PolylineGlowPropertyName = "polylineGlow"; + private readonly Lazy m_solidColor = new Lazy(() => new SolidColorMaterialCesiumWriter(SolidColorPropertyName), false); private readonly Lazy m_image = new Lazy(() => new ImageMaterialCesiumWriter(ImagePropertyName), false); private readonly Lazy m_grid = new Lazy(() => new GridMaterialCesiumWriter(GridPropertyName), false); private readonly Lazy m_stripe = new Lazy(() => new StripeMaterialCesiumWriter(StripePropertyName), false); + private readonly Lazy m_polylineOutline = new Lazy(() => new PolylineOutlineMaterialCesiumWriter(PolylineOutlinePropertyName), false); + private readonly Lazy m_polylineGlow = new Lazy(() => new PolylineGlowMaterialCesiumWriter(PolylineGlowPropertyName), false); /// /// Initializes a new instance. @@ -129,5 +141,39 @@ public StripeMaterialCesiumWriter OpenStripeProperty() return OpenAndReturn(StripeWriter); } + /// + /// Gets the writer for the polylineOutline property. The returned instance must be opened by calling the method before it can be used for writing. The polylineOutline property defines fills the surface of a line with an outlined color. + /// + public PolylineOutlineMaterialCesiumWriter PolylineOutlineWriter + { + get { return m_polylineOutline.Value; } + } + + /// + /// Opens and returns the writer for the polylineOutline property. The polylineOutline property defines fills the surface of a line with an outlined color. + /// + public PolylineOutlineMaterialCesiumWriter OpenPolylineOutlineProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(PolylineOutlineWriter); + } + + /// + /// Gets the writer for the polylineGlow property. The returned instance must be opened by calling the method before it can be used for writing. The polylineGlow property defines fills the surface of a line with a glowing color. + /// + public PolylineGlowMaterialCesiumWriter PolylineGlowWriter + { + get { return m_polylineGlow.Value; } + } + + /// + /// Opens and returns the writer for the polylineGlow property. The polylineGlow property defines fills the surface of a line with a glowing color. + /// + public PolylineGlowMaterialCesiumWriter OpenPolylineGlowProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(PolylineGlowWriter); + } + } } diff --git a/DotNet/CesiumLanguageWriter/Generated/PathCesiumWriter.cs b/DotNet/CesiumLanguageWriter/Generated/PathCesiumWriter.cs index d2fa3f04..d8062197 100644 --- a/DotNet/CesiumLanguageWriter/Generated/PathCesiumWriter.cs +++ b/DotNet/CesiumLanguageWriter/Generated/PathCesiumWriter.cs @@ -3,7 +3,6 @@ using CesiumLanguageWriter.Advanced; using System; -using System.Drawing; using System.Collections.Generic; namespace CesiumLanguageWriter @@ -19,9 +18,9 @@ public class PathCesiumWriter : CesiumPropertyWriter public const string ShowPropertyName = "show"; /// - /// The name of the color property. + /// The name of the material property. /// - public const string ColorPropertyName = "color"; + public const string MaterialPropertyName = "material"; /// /// The name of the width property. @@ -33,16 +32,6 @@ public class PathCesiumWriter : CesiumPropertyWriter /// public const string ResolutionPropertyName = "resolution"; - /// - /// The name of the outlineColor property. - /// - public const string OutlineColorPropertyName = "outlineColor"; - - /// - /// The name of the outlineWidth property. - /// - public const string OutlineWidthPropertyName = "outlineWidth"; - /// /// The name of the leadTime property. /// @@ -54,11 +43,9 @@ public class PathCesiumWriter : CesiumPropertyWriter public const string TrailTimePropertyName = "trailTime"; private readonly Lazy m_show = new Lazy(() => new BooleanCesiumWriter(ShowPropertyName), false); - private readonly Lazy m_color = new Lazy(() => new ColorCesiumWriter(ColorPropertyName), false); + private readonly Lazy m_material = new Lazy(() => new MaterialCesiumWriter(MaterialPropertyName), false); private readonly Lazy m_width = new Lazy(() => new DoubleCesiumWriter(WidthPropertyName), false); private readonly Lazy m_resolution = new Lazy(() => new DoubleCesiumWriter(ResolutionPropertyName), false); - private readonly Lazy m_outlineColor = new Lazy(() => new ColorCesiumWriter(OutlineColorPropertyName), false); - private readonly Lazy m_outlineWidth = new Lazy(() => new DoubleCesiumWriter(OutlineWidthPropertyName), false); private readonly Lazy m_leadTime = new Lazy(() => new DoubleCesiumWriter(LeadTimePropertyName), false); private readonly Lazy m_trailTime = new Lazy(() => new DoubleCesiumWriter(TrailTimePropertyName), false); @@ -115,127 +102,20 @@ public void WriteShowProperty(bool value) } /// - /// Gets the writer for the color property. The returned instance must be opened by calling the method before it can be used for writing. The color property defines the color of the path line. + /// 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 use to draw the path. /// - public ColorCesiumWriter ColorWriter + public MaterialCesiumWriter MaterialWriter { - get { return m_color.Value; } + get { return m_material.Value; } } /// - /// Opens and returns the writer for the color property. The color property defines the color of the path line. + /// Opens and returns the writer for the material property. The material property defines the material to use to draw the path. /// - public ColorCesiumWriter OpenColorProperty() + public MaterialCesiumWriter OpenMaterialProperty() { OpenIntervalIfNecessary(); - return OpenAndReturn(ColorWriter); - } - - /// - /// Writes a value for the color property as a rgba value. The color property specifies the color of the path line. - /// - /// The color. - public void WriteColorProperty(Color color) - { - using (var writer = OpenColorProperty()) - { - writer.WriteRgba(color); - } - } - - /// - /// Writes a value for the color property as a rgba value. The color property specifies the color of the path line. - /// - /// 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 WriteColorProperty(int red, int green, int blue, int alpha) - { - using (var writer = OpenColorProperty()) - { - writer.WriteRgba(red, green, blue, alpha); - } - } - - /// - /// Writes a value for the color property as a rgba value. The color property specifies the color of the path line. - /// - /// 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 WriteColorProperty(IList dates, IList colors, int startIndex, int length) - { - using (var writer = OpenColorProperty()) - { - writer.WriteRgba(dates, colors, startIndex, length); - } - } - - /// - /// Writes a value for the color property as a rgbaf value. The color property specifies the color of the path line. - /// - /// 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 WriteColorPropertyRgbaf(float red, float green, float blue, float alpha) - { - using (var writer = OpenColorProperty()) - { - writer.WriteRgbaf(red, green, blue, alpha); - } - } - - /// - /// Writes a value for the color property as a reference value. The color property specifies the color of the path line. - /// - /// The reference. - public void WriteColorPropertyReference(Reference value) - { - using (var writer = OpenColorProperty()) - { - writer.WriteReference(value); - } - } - - /// - /// Writes a value for the color property as a reference value. The color property specifies the color of the path line. - /// - /// The earliest date of the interval. - public void WriteColorPropertyReference(string value) - { - using (var writer = OpenColorProperty()) - { - writer.WriteReference(value); - } - } - - /// - /// Writes a value for the color property as a reference value. The color property specifies the color of the path line. - /// - /// The identifier of the object which contains the referenced property. - /// The property on the referenced object. - public void WriteColorPropertyReference(string identifier, string propertyName) - { - using (var writer = OpenColorProperty()) - { - writer.WriteReference(identifier, propertyName); - } - } - - /// - /// Writes a value for the color property as a reference value. The color property specifies the color of the path line. - /// - /// The identifier of the object which contains the referenced property. - /// The hierarchy of properties to be indexed on the referenced object. - public void WriteColorPropertyReference(string identifier, string[] propertyNames) - { - using (var writer = OpenColorProperty()) - { - writer.WriteReference(identifier, propertyNames); - } + return OpenAndReturn(MaterialWriter); } /// @@ -426,224 +306,6 @@ public void WriteResolutionPropertyReference(string identifier, string[] propert } } - /// - /// 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 outline of the path. - /// - 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 outline of the path. - /// - 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 outline of the path. - /// - /// 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 outline of the path. - /// - /// 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 outline of the path. - /// - /// 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 outline of the path. - /// - /// 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 outline of the path. - /// - /// 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 outline of the path. - /// - /// 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 outline of the path. - /// - /// 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 outline of the path. - /// - /// 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 outline of the path. - /// - 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 outline of the path. - /// - 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 outline of the path. - /// - /// 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 outline of the path. - /// - /// 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 outline of the path. - /// - /// 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 outline of the path. - /// - /// 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 outline of the path. - /// - /// 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 outline of the path. - /// - /// 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); - } - } - /// /// Gets the writer for the leadTime property. The returned instance must be opened by calling the method before it can be used for writing. The leadTime property defines the time ahead of the animation time, in seconds, to show the path. /// diff --git a/DotNet/CesiumLanguageWriter/Generated/PolylineCesiumWriter.cs b/DotNet/CesiumLanguageWriter/Generated/PolylineCesiumWriter.cs index 096555d1..c1fe6673 100644 --- a/DotNet/CesiumLanguageWriter/Generated/PolylineCesiumWriter.cs +++ b/DotNet/CesiumLanguageWriter/Generated/PolylineCesiumWriter.cs @@ -4,7 +4,6 @@ using CesiumLanguageWriter.Advanced; using System; using System.Collections.Generic; -using System.Drawing; namespace CesiumLanguageWriter { @@ -24,31 +23,19 @@ public class PolylineCesiumWriter : CesiumPropertyWriter public const string ShowPropertyName = "show"; /// - /// The name of the color property. + /// The name of the material property. /// - public const string ColorPropertyName = "color"; + public const string MaterialPropertyName = "material"; /// /// The name of the width property. /// public const string WidthPropertyName = "width"; - /// - /// 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_positions = new Lazy(() => new PositionListCesiumWriter(PositionsPropertyName), false); private readonly Lazy m_show = new Lazy(() => new BooleanCesiumWriter(ShowPropertyName), false); - private readonly Lazy m_color = new Lazy(() => new ColorCesiumWriter(ColorPropertyName), false); + private readonly Lazy m_material = new Lazy(() => new MaterialCesiumWriter(MaterialPropertyName), false); private readonly Lazy m_width = new Lazy(() => new DoubleCesiumWriter(WidthPropertyName), 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. @@ -168,127 +155,20 @@ public void WriteShowProperty(bool value) } /// - /// Gets the writer for the color property. The returned instance must be opened by calling the method before it can be used for writing. The color property defines the color of the polyline. + /// 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 use to draw the polyline. /// - public ColorCesiumWriter ColorWriter + public MaterialCesiumWriter MaterialWriter { - get { return m_color.Value; } + get { return m_material.Value; } } /// - /// Opens and returns the writer for the color property. The color property defines the color of the polyline. + /// Opens and returns the writer for the material property. The material property defines the material to use to draw the polyline. /// - public ColorCesiumWriter OpenColorProperty() + public MaterialCesiumWriter OpenMaterialProperty() { OpenIntervalIfNecessary(); - return OpenAndReturn(ColorWriter); - } - - /// - /// Writes a value for the color property as a rgba value. The color property specifies the color of the polyline. - /// - /// The color. - public void WriteColorProperty(Color color) - { - using (var writer = OpenColorProperty()) - { - writer.WriteRgba(color); - } - } - - /// - /// Writes a value for the color property as a rgba value. The color property specifies the color of the polyline. - /// - /// 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 WriteColorProperty(int red, int green, int blue, int alpha) - { - using (var writer = OpenColorProperty()) - { - writer.WriteRgba(red, green, blue, alpha); - } - } - - /// - /// Writes a value for the color property as a rgba value. The color property specifies the color of the polyline. - /// - /// 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 WriteColorProperty(IList dates, IList colors, int startIndex, int length) - { - using (var writer = OpenColorProperty()) - { - writer.WriteRgba(dates, colors, startIndex, length); - } - } - - /// - /// Writes a value for the color property as a rgbaf value. The color property specifies the color of the polyline. - /// - /// 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 WriteColorPropertyRgbaf(float red, float green, float blue, float alpha) - { - using (var writer = OpenColorProperty()) - { - writer.WriteRgbaf(red, green, blue, alpha); - } - } - - /// - /// Writes a value for the color property as a reference value. The color property specifies the color of the polyline. - /// - /// The reference. - public void WriteColorPropertyReference(Reference value) - { - using (var writer = OpenColorProperty()) - { - writer.WriteReference(value); - } - } - - /// - /// Writes a value for the color property as a reference value. The color property specifies the color of the polyline. - /// - /// The earliest date of the interval. - public void WriteColorPropertyReference(string value) - { - using (var writer = OpenColorProperty()) - { - writer.WriteReference(value); - } - } - - /// - /// Writes a value for the color property as a reference value. The color property specifies the color of the polyline. - /// - /// The identifier of the object which contains the referenced property. - /// The property on the referenced object. - public void WriteColorPropertyReference(string identifier, string propertyName) - { - using (var writer = OpenColorProperty()) - { - writer.WriteReference(identifier, propertyName); - } - } - - /// - /// Writes a value for the color property as a reference value. The color property specifies the color of the polyline. - /// - /// The identifier of the object which contains the referenced property. - /// The hierarchy of properties to be indexed on the referenced object. - public void WriteColorPropertyReference(string identifier, string[] propertyNames) - { - using (var writer = OpenColorProperty()) - { - writer.WriteReference(identifier, propertyNames); - } + return OpenAndReturn(MaterialWriter); } /// @@ -385,223 +265,5 @@ public void WriteWidthPropertyReference(string identifier, string[] propertyName } } - /// - /// 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 outline of the polyline. - /// - 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 outline of the polyline. - /// - 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 outline of the polyline. - /// - /// 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 outline of the polyline. - /// - /// 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 outline of the polyline. - /// - /// 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 outline of the polyline. - /// - /// 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 outline of the polyline. - /// - /// 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 outline of the polyline. - /// - /// 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 outline of the polyline. - /// - /// 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 outline of the polyline. - /// - /// 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 outline of the polyline. - /// - 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 outline of the polyline. - /// - 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 outline of the polyline. - /// - /// 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 outline of the polyline. - /// - /// 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 outline of the polyline. - /// - /// 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 outline of the polyline. - /// - /// 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 outline of the polyline. - /// - /// 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 outline of the polyline. - /// - /// 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/PolylineGlowMaterialCesiumWriter.cs b/DotNet/CesiumLanguageWriter/Generated/PolylineGlowMaterialCesiumWriter.cs new file mode 100644 index 00000000..a9ab846f --- /dev/null +++ b/DotNet/CesiumLanguageWriter/Generated/PolylineGlowMaterialCesiumWriter.cs @@ -0,0 +1,271 @@ +// This file was generated automatically by GenerateFromSchema. Do NOT edit it. +// https://github.com/AnalyticalGraphicsInc/czml-writer + +using CesiumLanguageWriter.Advanced; +using System; +using System.Drawing; +using System.Collections.Generic; + +namespace CesiumLanguageWriter +{ + /// + /// Writes a PolylineGlowMaterial to a . A PolylineGlowMaterial fills the surface of a line with a glowing color. + /// + public class PolylineGlowMaterialCesiumWriter : CesiumPropertyWriter + { + /// + /// The name of the color property. + /// + public const string ColorPropertyName = "color"; + + /// + /// The name of the glowPower property. + /// + public const string GlowPowerPropertyName = "glowPower"; + + private readonly Lazy m_color = new Lazy(() => new ColorCesiumWriter(ColorPropertyName), false); + private readonly Lazy m_glowPower = new Lazy(() => new DoubleCesiumWriter(GlowPowerPropertyName), false); + + /// + /// Initializes a new instance. + /// + public PolylineGlowMaterialCesiumWriter(string propertyName) + : base(propertyName) + { + } + + /// + /// Initializes a new instance as a copy of an existing instance. + /// + /// The existing instance to copy. + protected PolylineGlowMaterialCesiumWriter(PolylineGlowMaterialCesiumWriter existingInstance) + : base(existingInstance) + { + } + + /// + public override PolylineGlowMaterialCesiumWriter Clone() + { + return new PolylineGlowMaterialCesiumWriter(this); + } + + /// + /// Gets the writer for the color property. The returned instance must be opened by calling the method before it can be used for writing. The color property defines the color of the surface. + /// + public ColorCesiumWriter ColorWriter + { + get { return m_color.Value; } + } + + /// + /// Opens and returns the writer for the color property. The color property defines the color of the surface. + /// + public ColorCesiumWriter OpenColorProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(ColorWriter); + } + + /// + /// Writes a value for the color property as a rgba value. The color property specifies the color of the surface. + /// + /// The color. + public void WriteColorProperty(Color color) + { + using (var writer = OpenColorProperty()) + { + writer.WriteRgba(color); + } + } + + /// + /// Writes a value for the color property as a rgba value. The color property specifies the color of the surface. + /// + /// 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 WriteColorProperty(int red, int green, int blue, int alpha) + { + using (var writer = OpenColorProperty()) + { + writer.WriteRgba(red, green, blue, alpha); + } + } + + /// + /// Writes a value for the color property as a rgba value. The color property specifies the color of the surface. + /// + /// 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 WriteColorProperty(IList dates, IList colors, int startIndex, int length) + { + using (var writer = OpenColorProperty()) + { + writer.WriteRgba(dates, colors, startIndex, length); + } + } + + /// + /// Writes a value for the color property as a rgbaf value. The color property specifies the color of the surface. + /// + /// 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 WriteColorPropertyRgbaf(float red, float green, float blue, float alpha) + { + using (var writer = OpenColorProperty()) + { + writer.WriteRgbaf(red, green, blue, alpha); + } + } + + /// + /// Writes a value for the color property as a reference value. The color property specifies the color of the surface. + /// + /// The reference. + public void WriteColorPropertyReference(Reference value) + { + using (var writer = OpenColorProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the color property as a reference value. The color property specifies the color of the surface. + /// + /// The earliest date of the interval. + public void WriteColorPropertyReference(string value) + { + using (var writer = OpenColorProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the color property as a reference value. The color property specifies the color of the surface. + /// + /// The identifier of the object which contains the referenced property. + /// The property on the referenced object. + public void WriteColorPropertyReference(string identifier, string propertyName) + { + using (var writer = OpenColorProperty()) + { + writer.WriteReference(identifier, propertyName); + } + } + + /// + /// Writes a value for the color property as a reference value. The color property specifies the color of 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 WriteColorPropertyReference(string identifier, string[] propertyNames) + { + using (var writer = OpenColorProperty()) + { + writer.WriteReference(identifier, propertyNames); + } + } + + /// + /// Gets the writer for the glowPower property. The returned instance must be opened by calling the method before it can be used for writing. The glowPower property defines the strength of the glow. + /// + public DoubleCesiumWriter GlowPowerWriter + { + get { return m_glowPower.Value; } + } + + /// + /// Opens and returns the writer for the glowPower property. The glowPower property defines the strength of the glow. + /// + public DoubleCesiumWriter OpenGlowPowerProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(GlowPowerWriter); + } + + /// + /// Writes a value for the glowPower property as a number value. The glowPower property specifies the strength of the glow. + /// + /// The value. + public void WriteGlowPowerProperty(double value) + { + using (var writer = OpenGlowPowerProperty()) + { + writer.WriteNumber(value); + } + } + + /// + /// Writes a value for the glowPower property as a number value. The glowPower property specifies the strength of the glow. + /// + /// 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 WriteGlowPowerProperty(IList dates, IList values, int startIndex, int length) + { + using (var writer = OpenGlowPowerProperty()) + { + writer.WriteNumber(dates, values, startIndex, length); + } + } + + /// + /// Writes a value for the glowPower property as a reference value. The glowPower property specifies the strength of the glow. + /// + /// The reference. + public void WriteGlowPowerPropertyReference(Reference value) + { + using (var writer = OpenGlowPowerProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the glowPower property as a reference value. The glowPower property specifies the strength of the glow. + /// + /// The earliest date of the interval. + public void WriteGlowPowerPropertyReference(string value) + { + using (var writer = OpenGlowPowerProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the glowPower property as a reference value. The glowPower property specifies the strength of the glow. + /// + /// The identifier of the object which contains the referenced property. + /// The property on the referenced object. + public void WriteGlowPowerPropertyReference(string identifier, string propertyName) + { + using (var writer = OpenGlowPowerProperty()) + { + writer.WriteReference(identifier, propertyName); + } + } + + /// + /// Writes a value for the glowPower property as a reference value. The glowPower property specifies the strength of the glow. + /// + /// The identifier of the object which contains the referenced property. + /// The hierarchy of properties to be indexed on the referenced object. + public void WriteGlowPowerPropertyReference(string identifier, string[] propertyNames) + { + using (var writer = OpenGlowPowerProperty()) + { + writer.WriteReference(identifier, propertyNames); + } + } + + } +} diff --git a/DotNet/CesiumLanguageWriter/Generated/PolylineOutlineMaterialCesiumWriter.cs b/DotNet/CesiumLanguageWriter/Generated/PolylineOutlineMaterialCesiumWriter.cs new file mode 100644 index 00000000..921b7909 --- /dev/null +++ b/DotNet/CesiumLanguageWriter/Generated/PolylineOutlineMaterialCesiumWriter.cs @@ -0,0 +1,401 @@ +// This file was generated automatically by GenerateFromSchema. Do NOT edit it. +// https://github.com/AnalyticalGraphicsInc/czml-writer + +using CesiumLanguageWriter.Advanced; +using System; +using System.Drawing; +using System.Collections.Generic; + +namespace CesiumLanguageWriter +{ + /// + /// Writes a PolylineOutlineMaterial to a . A PolylineOutlineMaterial fills the surface of a line with an outlined color. + /// + public class PolylineOutlineMaterialCesiumWriter : CesiumPropertyWriter + { + /// + /// The name of the color property. + /// + public const string ColorPropertyName = "color"; + + /// + /// 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_color = new Lazy(() => new ColorCesiumWriter(ColorPropertyName), 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 PolylineOutlineMaterialCesiumWriter(string propertyName) + : base(propertyName) + { + } + + /// + /// Initializes a new instance as a copy of an existing instance. + /// + /// The existing instance to copy. + protected PolylineOutlineMaterialCesiumWriter(PolylineOutlineMaterialCesiumWriter existingInstance) + : base(existingInstance) + { + } + + /// + public override PolylineOutlineMaterialCesiumWriter Clone() + { + return new PolylineOutlineMaterialCesiumWriter(this); + } + + /// + /// Gets the writer for the color property. The returned instance must be opened by calling the method before it can be used for writing. The color property defines the color of the surface. + /// + public ColorCesiumWriter ColorWriter + { + get { return m_color.Value; } + } + + /// + /// Opens and returns the writer for the color property. The color property defines the color of the surface. + /// + public ColorCesiumWriter OpenColorProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(ColorWriter); + } + + /// + /// Writes a value for the color property as a rgba value. The color property specifies the color of the surface. + /// + /// The color. + public void WriteColorProperty(Color color) + { + using (var writer = OpenColorProperty()) + { + writer.WriteRgba(color); + } + } + + /// + /// Writes a value for the color property as a rgba value. The color property specifies the color of the surface. + /// + /// 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 WriteColorProperty(int red, int green, int blue, int alpha) + { + using (var writer = OpenColorProperty()) + { + writer.WriteRgba(red, green, blue, alpha); + } + } + + /// + /// Writes a value for the color property as a rgba value. The color property specifies the color of the surface. + /// + /// 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 WriteColorProperty(IList dates, IList colors, int startIndex, int length) + { + using (var writer = OpenColorProperty()) + { + writer.WriteRgba(dates, colors, startIndex, length); + } + } + + /// + /// Writes a value for the color property as a rgbaf value. The color property specifies the color of the surface. + /// + /// 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 WriteColorPropertyRgbaf(float red, float green, float blue, float alpha) + { + using (var writer = OpenColorProperty()) + { + writer.WriteRgbaf(red, green, blue, alpha); + } + } + + /// + /// Writes a value for the color property as a reference value. The color property specifies the color of the surface. + /// + /// The reference. + public void WriteColorPropertyReference(Reference value) + { + using (var writer = OpenColorProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the color property as a reference value. The color property specifies the color of the surface. + /// + /// The earliest date of the interval. + public void WriteColorPropertyReference(string value) + { + using (var writer = OpenColorProperty()) + { + writer.WriteReference(value); + } + } + + /// + /// Writes a value for the color property as a reference value. The color property specifies the color of the surface. + /// + /// The identifier of the object which contains the referenced property. + /// The property on the referenced object. + public void WriteColorPropertyReference(string identifier, string propertyName) + { + using (var writer = OpenColorProperty()) + { + writer.WriteReference(identifier, propertyName); + } + } + + /// + /// Writes a value for the color property as a reference value. The color property specifies the color of 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 WriteColorPropertyReference(string identifier, string[] propertyNames) + { + using (var writer = OpenColorProperty()) + { + 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 surface 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 surface 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 surface 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 surface 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 surface 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 surface 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 surface 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 surface 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 surface 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 surface 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 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 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 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 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 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 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 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 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/ShapefileToCesiumLanguage/Polyline.cs b/DotNet/ShapefileToCesiumLanguage/Polyline.cs index 93209910..9bc8a01f 100644 --- a/DotNet/ShapefileToCesiumLanguage/Polyline.cs +++ b/DotNet/ShapefileToCesiumLanguage/Polyline.cs @@ -34,7 +34,11 @@ public override void Write() packetWriter.WriteId(Guid.NewGuid().ToString()); using (PolylineCesiumWriter polylineWriter = packetWriter.OpenPolylineProperty()) { - polylineWriter.WriteColorProperty(m_color); + using (var materialWriter = polylineWriter.OpenMaterialProperty()) + using (var colorWriter = materialWriter.OpenSolidColorProperty()) + { + colorWriter.WriteColorProperty(m_color); + } List positions = new List(); for (int x = 0; x < part.Count; x++) diff --git a/DotNet/ShapefileToCesiumLanguageTests/ShapefileToCesiumLanguageTests.cs b/DotNet/ShapefileToCesiumLanguageTests/ShapefileToCesiumLanguageTests.cs index 5815ea32..5f17a2d6 100644 --- a/DotNet/ShapefileToCesiumLanguageTests/ShapefileToCesiumLanguageTests.cs +++ b/DotNet/ShapefileToCesiumLanguageTests/ShapefileToCesiumLanguageTests.cs @@ -29,7 +29,7 @@ public void SetUp() m_metadata = new StringDictionary(); m_pointPattern = @"{""id"":""[0-9a-zA-Z-]+"",""position"":{""cartographicRadians"":\[-?(\d)*(\.([\de-])*)?,-?(\d)*(\.([\de-])*)?,-?(\d)*(\.([\de-])*)?\]},""point"":{""color"":{""rgba"":\[\d{1,3},\d{1,3},\d{1,3},\d{1,3}\]}}}"; m_polygonPattern = @"{""id"":""[0-9a-zA-Z-]+"",""polygon"":{""material"":{""solidColor"":{""color"":{""rgba"":\[\d{1,3},\d{1,3},\d{1,3},\d{1,3}\]}}},""positions"":{""cartographicRadians"":\[(-?(\d)*(\.([\de-])*)?,-?(\d)*(\.([\de-])*)?,-?(\d)*(\.([\de-])*)?,?)+\]}}}"; - m_polylinePattern = @"{""id"":""[0-9a-zA-Z-]+"",""polyline"":{""color"":{""rgba"":\[\d{1,3},\d{1,3},\d{1,3},\d{1,3}\]},""positions"":{""cartographicRadians"":\[(-?(\d)*(\.([\de-])*)?,-?(\d)*(\.([\de-])*)?,-?(\d)*(\.([\de-])*)?,?)+\]}}}"; + m_polylinePattern = @"{""id"":""[0-9a-zA-Z-]+"",""polyline"":{""material"":{""solidColor"":{""color"":{""rgba"":\[\d{1,3},\d{1,3},\d{1,3},\d{1,3}\]}}},""positions"":{""cartographicRadians"":\[(-?(\d)*(\.([\de-])*)?,-?(\d)*(\.([\de-])*)?,-?(\d)*(\.([\de-])*)?,?)+\]}}}"; m_trianglePattern = @"{""id"":""[0-9a-zA-Z-]+"",""polygon"":{""material"":{""solidColor"":{""color"":{""rgba"":\[\d{1,3},\d{1,3},\d{1,3},\d{1,3}\]}}},""positions"":{""cartographicRadians"":\[(-?(\d)*(\.([\de-])*)?,?){9}\]}}}"; } diff --git a/DotNet/WebGlGlobeJsonToCesiumLanguage/Series.cs b/DotNet/WebGlGlobeJsonToCesiumLanguage/Series.cs index f475a14b..ddf178ae 100644 --- a/DotNet/WebGlGlobeJsonToCesiumLanguage/Series.cs +++ b/DotNet/WebGlGlobeJsonToCesiumLanguage/Series.cs @@ -75,7 +75,12 @@ public void WritePacket(int index) packetWriter.WriteId(m_id + index); using (PolylineCesiumWriter polyline = packetWriter.OpenPolylineProperty()) { - polyline.WriteColorProperty(ColorFromHSV(0.6 - (m_coordinates[index].Height * 0.5), 1.0, 1.0)); + using (var materialWriter = polyline.OpenMaterialProperty()) + using (var colorWriter = materialWriter.OpenSolidColorProperty()) + { + colorWriter.WriteColorProperty(ColorFromHSV(0.6 - (m_coordinates[index].Height * 0.5), 1.0, 1.0)); + } + Cartographic[] positions = new Cartographic[] { new Cartographic(m_coordinates[index].Longitude, m_coordinates[index].Latitude, 0.0), new Cartographic(m_coordinates[index].Longitude, m_coordinates[index].Latitude, m_coordinates[index].Height * m_scalar)}; diff --git a/DotNet/WebGlGlobeJsonToCesiumLanguageTests/TestWebGlGlobeJsonConverter.cs b/DotNet/WebGlGlobeJsonToCesiumLanguageTests/TestWebGlGlobeJsonConverter.cs index b9882ed1..1aa60799 100644 --- a/DotNet/WebGlGlobeJsonToCesiumLanguageTests/TestWebGlGlobeJsonConverter.cs +++ b/DotNet/WebGlGlobeJsonToCesiumLanguageTests/TestWebGlGlobeJsonConverter.cs @@ -23,8 +23,8 @@ public void ConvertsValidJson() WebGLGlobeJsonConverter.WebGLGlobeJsonToCesiumLanguage(json, m_stringWriter); string result = m_stringWriter.ToString(); - StringAssert.Contains("{\"id\":\"alpha0\",\"polyline\":{\"color\":{\"rgba\":[255,153,0,255]},\"positions\":{\"cartographicDegrees\":[-90,45,0,-90,45,1]}}}", result); - StringAssert.Contains("{\"id\":\"bravo0\",\"polyline\":{\"color\":{\"rgba\":[255,0,0,255]},\"positions\":{\"cartographicDegrees\":[-70,50,0,-70,50,2]}}}", result); + StringAssert.Contains("{\"id\":\"alpha0\",\"polyline\":{\"material\":{\"solidColor\":{\"color\":{\"rgba\":[255,153,0,255]}}},\"positions\":{\"cartographicDegrees\":[-90,45,0,-90,45,1]}}}", result); + StringAssert.Contains("{\"id\":\"bravo0\",\"polyline\":{\"material\":{\"solidColor\":{\"color\":{\"rgba\":[255,0,0,255]}}},\"positions\":{\"cartographicDegrees\":[-70,50,0,-70,50,2]}}}", result); } [Test] diff --git a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/MaterialCesiumWriter.java b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/MaterialCesiumWriter.java index 5d871f55..64b5a556 100644 --- a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/MaterialCesiumWriter.java +++ b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/MaterialCesiumWriter.java @@ -7,6 +7,8 @@ import cesiumlanguagewriter.advanced.*; import cesiumlanguagewriter.GridMaterialCesiumWriter; import cesiumlanguagewriter.ImageMaterialCesiumWriter; +import cesiumlanguagewriter.PolylineGlowMaterialCesiumWriter; +import cesiumlanguagewriter.PolylineOutlineMaterialCesiumWriter; import cesiumlanguagewriter.SolidColorMaterialCesiumWriter; import cesiumlanguagewriter.StripeMaterialCesiumWriter; @@ -45,6 +47,20 @@ public class MaterialCesiumWriter extends CesiumPropertyWriterpolylineOutline property. + + + */ + public static final String PolylineOutlinePropertyName = "polylineOutline"; + /** + * + The name of the polylineGlow property. + + + */ + public static final String PolylineGlowPropertyName = "polylineGlow"; private Lazy m_solidColor = new Lazy(new Func1() { public cesiumlanguagewriter.SolidColorMaterialCesiumWriter invoke() { return new SolidColorMaterialCesiumWriter(SolidColorPropertyName); @@ -65,6 +81,17 @@ public cesiumlanguagewriter.StripeMaterialCesiumWriter invoke() { return new StripeMaterialCesiumWriter(StripePropertyName); } }, false); + private Lazy m_polylineOutline = new Lazy( + new Func1() { + public cesiumlanguagewriter.PolylineOutlineMaterialCesiumWriter invoke() { + return new PolylineOutlineMaterialCesiumWriter(PolylineOutlinePropertyName); + } + }, false); + private Lazy m_polylineGlow = new Lazy(new Func1() { + public cesiumlanguagewriter.PolylineGlowMaterialCesiumWriter invoke() { + return new PolylineGlowMaterialCesiumWriter(PolylineGlowPropertyName); + } + }, false); /** * @@ -172,4 +199,44 @@ public final StripeMaterialCesiumWriter openStripeProperty() { openIntervalIfNecessary(); return this. openAndReturn(getStripeWriter()); } + + /** + * Gets the writer for the polylineOutline property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The polylineOutline property defines fills the surface of a line with an outlined color. + + + */ + public final PolylineOutlineMaterialCesiumWriter getPolylineOutlineWriter() { + return m_polylineOutline.getValue(); + } + + /** + * + Opens and returns the writer for the polylineOutline property. The polylineOutline property defines fills the surface of a line with an outlined color. + + + */ + public final PolylineOutlineMaterialCesiumWriter openPolylineOutlineProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getPolylineOutlineWriter()); + } + + /** + * Gets the writer for the polylineGlow property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The polylineGlow property defines fills the surface of a line with a glowing color. + + + */ + public final PolylineGlowMaterialCesiumWriter getPolylineGlowWriter() { + return m_polylineGlow.getValue(); + } + + /** + * + Opens and returns the writer for the polylineGlow property. The polylineGlow property defines fills the surface of a line with a glowing color. + + + */ + public final PolylineGlowMaterialCesiumWriter openPolylineGlowProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getPolylineGlowWriter()); + } } \ No newline at end of file diff --git a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PathCesiumWriter.java b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PathCesiumWriter.java index 46695346..597007cc 100644 --- a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PathCesiumWriter.java +++ b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PathCesiumWriter.java @@ -7,9 +7,8 @@ import agi.foundation.compatibility.Lazy; import cesiumlanguagewriter.advanced.*; import cesiumlanguagewriter.BooleanCesiumWriter; -import cesiumlanguagewriter.ColorCesiumWriter; import cesiumlanguagewriter.DoubleCesiumWriter; -import java.awt.Color; +import cesiumlanguagewriter.MaterialCesiumWriter; import java.util.List; /** @@ -28,11 +27,11 @@ public class PathCesiumWriter extends CesiumPropertyWriter { public static final String ShowPropertyName = "show"; /** * - The name of the color property. + The name of the material property. */ - public static final String ColorPropertyName = "color"; + public static final String MaterialPropertyName = "material"; /** * The name of the width property. @@ -47,20 +46,6 @@ public class PathCesiumWriter extends CesiumPropertyWriter { */ public static final String ResolutionPropertyName = "resolution"; - /** - * - The name of the outlineColor property. - - - */ - public static final String OutlineColorPropertyName = "outlineColor"; - /** - * - The name of the outlineWidth property. - - - */ - public static final String OutlineWidthPropertyName = "outlineWidth"; /** * The name of the leadTime property. @@ -80,9 +65,9 @@ public cesiumlanguagewriter.BooleanCesiumWriter invoke() { return new BooleanCesiumWriter(ShowPropertyName); } }, false); - private Lazy m_color = new Lazy(new Func1() { - public cesiumlanguagewriter.ColorCesiumWriter invoke() { - return new ColorCesiumWriter(ColorPropertyName); + private Lazy m_material = new Lazy(new Func1() { + public cesiumlanguagewriter.MaterialCesiumWriter invoke() { + return new MaterialCesiumWriter(MaterialPropertyName); } }, false); private Lazy m_width = new Lazy(new Func1() { @@ -95,16 +80,6 @@ public cesiumlanguagewriter.DoubleCesiumWriter invoke() { return new DoubleCesiumWriter(ResolutionPropertyName); } }, 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); private Lazy m_leadTime = new Lazy(new Func1() { public cesiumlanguagewriter.DoubleCesiumWriter invoke() { return new DoubleCesiumWriter(LeadTimePropertyName); @@ -183,197 +158,23 @@ public final void writeShowProperty(boolean value) { } /** - * Gets the writer for the color property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The color property defines the color of the path line. + * 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 use to draw the path. */ - public final ColorCesiumWriter getColorWriter() { - return m_color.getValue(); + public final MaterialCesiumWriter getMaterialWriter() { + return m_material.getValue(); } /** * - Opens and returns the writer for the color property. The color property defines the color of the path line. + Opens and returns the writer for the material property. The material property defines the material to use to draw the path. */ - public final ColorCesiumWriter openColorProperty() { + public final MaterialCesiumWriter openMaterialProperty() { openIntervalIfNecessary(); - return this. openAndReturn(getColorWriter()); - } - - /** - * - Writes a value for the color property as a rgba value. The color property specifies the color of the path line. - - - - * @param color The color. - */ - public final void writeColorProperty(Color color) { - { - cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); - try { - writer.writeRgba(color); - } finally { - DisposeHelper.dispose(writer); - } - } - } - - /** - * - Writes a value for the color property as a rgba value. The color property specifies the color of the path line. - - - - - - - * @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 writeColorProperty(int red, int green, int blue, int alpha) { - { - cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); - try { - writer.writeRgba(red, green, blue, alpha); - } finally { - DisposeHelper.dispose(writer); - } - } - } - - /** - * - Writes a value for the color property as a rgba value. The color property specifies the color of the path line. - - - - - - - * @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 writeColorProperty(List dates, List colors, int startIndex, int length) { - { - cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); - try { - writer.writeRgba(dates, colors, startIndex, length); - } finally { - DisposeHelper.dispose(writer); - } - } - } - - /** - * - Writes a value for the color property as a rgbaf value. The color property specifies the color of the path line. - - - - - - - * @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 writeColorPropertyRgbaf(float red, float green, float blue, float alpha) { - { - cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); - try { - writer.writeRgbaf(red, green, blue, alpha); - } finally { - DisposeHelper.dispose(writer); - } - } - } - - /** - * - Writes a value for the color property as a reference value. The color property specifies the color of the path line. - - - - * @param value The reference. - */ - public final void writeColorPropertyReference(Reference value) { - { - cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); - try { - writer.writeReference(value); - } finally { - DisposeHelper.dispose(writer); - } - } - } - - /** - * - Writes a value for the color property as a reference value. The color property specifies the color of the path line. - - - - * @param value The earliest date of the interval. - */ - public final void writeColorPropertyReference(String value) { - { - cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); - try { - writer.writeReference(value); - } finally { - DisposeHelper.dispose(writer); - } - } - } - - /** - * - Writes a value for the color property as a reference value. The color property specifies the color of the path line. - - - - - * @param identifier The identifier of the object which contains the referenced property. - * @param propertyName The property on the referenced object. - */ - public final void writeColorPropertyReference(String identifier, String propertyName) { - { - cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); - try { - writer.writeReference(identifier, propertyName); - } finally { - DisposeHelper.dispose(writer); - } - } - } - - /** - * - Writes a value for the color property as a reference value. The color property specifies the color of the path line. - - - - - * @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 writeColorPropertyReference(String identifier, String[] propertyNames) { - { - cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); - try { - writer.writeReference(identifier, propertyNames); - } finally { - DisposeHelper.dispose(writer); - } - } + return this. openAndReturn(getMaterialWriter()); } /** @@ -664,344 +465,6 @@ public final void writeResolutionPropertyReference(String identifier, String[] p } } - /** - * 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 outline of the path. - - - */ - 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 outline of the path. - - - */ - 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 outline of the path. - - - - * @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 outline of the path. - - - - - - - * @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 outline of the path. - - - - - - - * @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 outline of the path. - - - - - - - * @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 outline of the path. - - - - * @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 outline of the path. - - - - * @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 outline of the path. - - - - - * @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 outline of the path. - - - - - * @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 outline of the path. - - - */ - 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 outline of the path. - - - */ - 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 outline of the path. - - - - * @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 outline of the path. - - - - - - - * @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 outline of the path. - - - - * @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 outline of the path. - - - - * @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 outline of the path. - - - - - * @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 outline of the path. - - - - - * @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); - } - } - } - /** * Gets the writer for the leadTime property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The leadTime property defines the time ahead of the animation time, in seconds, to show the path. diff --git a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PolylineCesiumWriter.java b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PolylineCesiumWriter.java index 5d8546bd..39aef7a4 100644 --- a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PolylineCesiumWriter.java +++ b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PolylineCesiumWriter.java @@ -7,10 +7,9 @@ import agi.foundation.compatibility.Lazy; import cesiumlanguagewriter.advanced.*; import cesiumlanguagewriter.BooleanCesiumWriter; -import cesiumlanguagewriter.ColorCesiumWriter; import cesiumlanguagewriter.DoubleCesiumWriter; +import cesiumlanguagewriter.MaterialCesiumWriter; import cesiumlanguagewriter.PositionListCesiumWriter; -import java.awt.Color; import java.util.List; /** @@ -36,11 +35,11 @@ public class PolylineCesiumWriter extends CesiumPropertyWritercolor property. + The name of the material property. */ - public static final String ColorPropertyName = "color"; + public static final String MaterialPropertyName = "material"; /** * The name of the width property. @@ -48,20 +47,6 @@ public class PolylineCesiumWriter extends CesiumPropertyWriteroutlineColor property. - - - */ - public static final String OutlineColorPropertyName = "outlineColor"; - /** - * - The name of the outlineWidth property. - - - */ - public static final String OutlineWidthPropertyName = "outlineWidth"; private Lazy m_positions = new Lazy(new Func1() { public cesiumlanguagewriter.PositionListCesiumWriter invoke() { return new PositionListCesiumWriter(PositionsPropertyName); @@ -72,9 +57,9 @@ public cesiumlanguagewriter.BooleanCesiumWriter invoke() { return new BooleanCesiumWriter(ShowPropertyName); } }, false); - private Lazy m_color = new Lazy(new Func1() { - public cesiumlanguagewriter.ColorCesiumWriter invoke() { - return new ColorCesiumWriter(ColorPropertyName); + private Lazy m_material = new Lazy(new Func1() { + public cesiumlanguagewriter.MaterialCesiumWriter invoke() { + return new MaterialCesiumWriter(MaterialPropertyName); } }, false); private Lazy m_width = new Lazy(new Func1() { @@ -82,16 +67,6 @@ public cesiumlanguagewriter.DoubleCesiumWriter invoke() { return new DoubleCesiumWriter(WidthPropertyName); } }, 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); /** * @@ -256,197 +231,23 @@ public final void writeShowProperty(boolean value) { } /** - * Gets the writer for the color property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The color property defines the color of the polyline. + * 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 use to draw the polyline. */ - public final ColorCesiumWriter getColorWriter() { - return m_color.getValue(); + public final MaterialCesiumWriter getMaterialWriter() { + return m_material.getValue(); } /** * - Opens and returns the writer for the color property. The color property defines the color of the polyline. + Opens and returns the writer for the material property. The material property defines the material to use to draw the polyline. */ - public final ColorCesiumWriter openColorProperty() { + public final MaterialCesiumWriter openMaterialProperty() { openIntervalIfNecessary(); - return this. openAndReturn(getColorWriter()); - } - - /** - * - Writes a value for the color property as a rgba value. The color property specifies the color of the polyline. - - - - * @param color The color. - */ - public final void writeColorProperty(Color color) { - { - cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); - try { - writer.writeRgba(color); - } finally { - DisposeHelper.dispose(writer); - } - } - } - - /** - * - Writes a value for the color property as a rgba value. The color property specifies the color of the polyline. - - - - - - - * @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 writeColorProperty(int red, int green, int blue, int alpha) { - { - cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); - try { - writer.writeRgba(red, green, blue, alpha); - } finally { - DisposeHelper.dispose(writer); - } - } - } - - /** - * - Writes a value for the color property as a rgba value. The color property specifies the color of the polyline. - - - - - - - * @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 writeColorProperty(List dates, List colors, int startIndex, int length) { - { - cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); - try { - writer.writeRgba(dates, colors, startIndex, length); - } finally { - DisposeHelper.dispose(writer); - } - } - } - - /** - * - Writes a value for the color property as a rgbaf value. The color property specifies the color of the polyline. - - - - - - - * @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 writeColorPropertyRgbaf(float red, float green, float blue, float alpha) { - { - cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); - try { - writer.writeRgbaf(red, green, blue, alpha); - } finally { - DisposeHelper.dispose(writer); - } - } - } - - /** - * - Writes a value for the color property as a reference value. The color property specifies the color of the polyline. - - - - * @param value The reference. - */ - public final void writeColorPropertyReference(Reference value) { - { - cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); - try { - writer.writeReference(value); - } finally { - DisposeHelper.dispose(writer); - } - } - } - - /** - * - Writes a value for the color property as a reference value. The color property specifies the color of the polyline. - - - - * @param value The earliest date of the interval. - */ - public final void writeColorPropertyReference(String value) { - { - cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); - try { - writer.writeReference(value); - } finally { - DisposeHelper.dispose(writer); - } - } - } - - /** - * - Writes a value for the color property as a reference value. The color property specifies the color of the polyline. - - - - - * @param identifier The identifier of the object which contains the referenced property. - * @param propertyName The property on the referenced object. - */ - public final void writeColorPropertyReference(String identifier, String propertyName) { - { - cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); - try { - writer.writeReference(identifier, propertyName); - } finally { - DisposeHelper.dispose(writer); - } - } - } - - /** - * - Writes a value for the color property as a reference value. The color property specifies the color of the polyline. - - - - - * @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 writeColorPropertyReference(String identifier, String[] propertyNames) { - { - cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); - try { - writer.writeReference(identifier, propertyNames); - } finally { - DisposeHelper.dispose(writer); - } - } + return this. openAndReturn(getMaterialWriter()); } /** @@ -592,342 +393,4 @@ public final void writeWidthPropertyReference(String identifier, String[] proper } } } - - /** - * 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 outline of the polyline. - - - */ - 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 outline of the polyline. - - - */ - 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 outline of the polyline. - - - - * @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 outline of the polyline. - - - - - - - * @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 outline of the polyline. - - - - - - - * @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 outline of the polyline. - - - - - - - * @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 outline of the polyline. - - - - * @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 outline of the polyline. - - - - * @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 outline of the polyline. - - - - - * @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 outline of the polyline. - - - - - * @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 outline of the polyline. - - - */ - 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 outline of the polyline. - - - */ - 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 outline of the polyline. - - - - * @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 outline of the polyline. - - - - - - - * @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 outline of the polyline. - - - - * @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 outline of the polyline. - - - - * @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 outline of the polyline. - - - - - * @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 outline of the polyline. - - - - - * @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/PolylineGlowMaterialCesiumWriter.java b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PolylineGlowMaterialCesiumWriter.java new file mode 100644 index 00000000..2eac8912 --- /dev/null +++ b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PolylineGlowMaterialCesiumWriter.java @@ -0,0 +1,410 @@ +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.ColorCesiumWriter; +import cesiumlanguagewriter.DoubleCesiumWriter; +import java.awt.Color; +import java.util.List; + +/** + * + Writes a PolylineGlowMaterial to a {@link CesiumOutputStream}. A PolylineGlowMaterial fills the surface of a line with a glowing color. + + + */ +public class PolylineGlowMaterialCesiumWriter extends CesiumPropertyWriter { + /** + * + The name of the color property. + + + */ + public static final String ColorPropertyName = "color"; + /** + * + The name of the glowPower property. + + + */ + public static final String GlowPowerPropertyName = "glowPower"; + private Lazy m_color = new Lazy(new Func1() { + public cesiumlanguagewriter.ColorCesiumWriter invoke() { + return new ColorCesiumWriter(ColorPropertyName); + } + }, false); + private Lazy m_glowPower = new Lazy(new Func1() { + public cesiumlanguagewriter.DoubleCesiumWriter invoke() { + return new DoubleCesiumWriter(GlowPowerPropertyName); + } + }, false); + + /** + * + Initializes a new instance. + + + */ + public PolylineGlowMaterialCesiumWriter(String propertyName) { + super(propertyName); + } + + /** + * + Initializes a new instance as a copy of an existing instance. + + + + * @param existingInstance The existing instance to copy. + */ + protected PolylineGlowMaterialCesiumWriter(PolylineGlowMaterialCesiumWriter existingInstance) { + super(existingInstance); + } + + @Override + public PolylineGlowMaterialCesiumWriter clone() { + return new PolylineGlowMaterialCesiumWriter(this); + } + + /** + * Gets the writer for the color property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The color property defines the color of the surface. + + + */ + public final ColorCesiumWriter getColorWriter() { + return m_color.getValue(); + } + + /** + * + Opens and returns the writer for the color property. The color property defines the color of the surface. + + + */ + public final ColorCesiumWriter openColorProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getColorWriter()); + } + + /** + * + Writes a value for the color property as a rgba value. The color property specifies the color of the surface. + + + + * @param color The color. + */ + public final void writeColorProperty(Color color) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); + try { + writer.writeRgba(color); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the color property as a rgba value. The color property specifies the color of the surface. + + + + + + + * @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 writeColorProperty(int red, int green, int blue, int alpha) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); + try { + writer.writeRgba(red, green, blue, alpha); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the color property as a rgba value. The color property specifies the color of the surface. + + + + + + + * @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 writeColorProperty(List dates, List colors, int startIndex, int length) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); + try { + writer.writeRgba(dates, colors, startIndex, length); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the color property as a rgbaf value. The color property specifies the color of the surface. + + + + + + + * @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 writeColorPropertyRgbaf(float red, float green, float blue, float alpha) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); + try { + writer.writeRgbaf(red, green, blue, alpha); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the color property as a reference value. The color property specifies the color of the surface. + + + + * @param value The reference. + */ + public final void writeColorPropertyReference(Reference value) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the color property as a reference value. The color property specifies the color of the surface. + + + + * @param value The earliest date of the interval. + */ + public final void writeColorPropertyReference(String value) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the color property as a reference value. The color property specifies the color of 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 writeColorPropertyReference(String identifier, String propertyName) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); + try { + writer.writeReference(identifier, propertyName); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the color property as a reference value. The color property specifies the color of 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 writeColorPropertyReference(String identifier, String[] propertyNames) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); + try { + writer.writeReference(identifier, propertyNames); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * Gets the writer for the glowPower property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The glowPower property defines the strength of the glow. + + + */ + public final DoubleCesiumWriter getGlowPowerWriter() { + return m_glowPower.getValue(); + } + + /** + * + Opens and returns the writer for the glowPower property. The glowPower property defines the strength of the glow. + + + */ + public final DoubleCesiumWriter openGlowPowerProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getGlowPowerWriter()); + } + + /** + * + Writes a value for the glowPower property as a number value. The glowPower property specifies the strength of the glow. + + + + * @param value The value. + */ + public final void writeGlowPowerProperty(double value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openGlowPowerProperty(); + try { + writer.writeNumber(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the glowPower property as a number value. The glowPower property specifies the strength of the glow. + + + + + + + * @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 writeGlowPowerProperty(List dates, List values, int startIndex, int length) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openGlowPowerProperty(); + try { + writer.writeNumber(dates, values, startIndex, length); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the glowPower property as a reference value. The glowPower property specifies the strength of the glow. + + + + * @param value The reference. + */ + public final void writeGlowPowerPropertyReference(Reference value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openGlowPowerProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the glowPower property as a reference value. The glowPower property specifies the strength of the glow. + + + + * @param value The earliest date of the interval. + */ + public final void writeGlowPowerPropertyReference(String value) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openGlowPowerProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the glowPower property as a reference value. The glowPower property specifies the strength of the glow. + + + + + * @param identifier The identifier of the object which contains the referenced property. + * @param propertyName The property on the referenced object. + */ + public final void writeGlowPowerPropertyReference(String identifier, String propertyName) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openGlowPowerProperty(); + try { + writer.writeReference(identifier, propertyName); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the glowPower property as a reference value. The glowPower property specifies the strength of the glow. + + + + + * @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 writeGlowPowerPropertyReference(String identifier, String[] propertyNames) { + { + cesiumlanguagewriter.DoubleCesiumWriter writer = openGlowPowerProperty(); + try { + writer.writeReference(identifier, propertyNames); + } finally { + DisposeHelper.dispose(writer); + } + } + } +} \ No newline at end of file diff --git a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PolylineOutlineMaterialCesiumWriter.java b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PolylineOutlineMaterialCesiumWriter.java new file mode 100644 index 00000000..585b06f7 --- /dev/null +++ b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PolylineOutlineMaterialCesiumWriter.java @@ -0,0 +1,616 @@ +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.ColorCesiumWriter; +import cesiumlanguagewriter.DoubleCesiumWriter; +import java.awt.Color; +import java.util.List; + +/** + * + Writes a PolylineOutlineMaterial to a {@link CesiumOutputStream}. A PolylineOutlineMaterial fills the surface of a line with an outlined color. + + + */ +public class PolylineOutlineMaterialCesiumWriter extends CesiumPropertyWriter { + /** + * + The name of the color property. + + + */ + public static final String ColorPropertyName = "color"; + /** + * + 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_color = new Lazy(new Func1() { + public cesiumlanguagewriter.ColorCesiumWriter invoke() { + return new ColorCesiumWriter(ColorPropertyName); + } + }, 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 PolylineOutlineMaterialCesiumWriter(String propertyName) { + super(propertyName); + } + + /** + * + Initializes a new instance as a copy of an existing instance. + + + + * @param existingInstance The existing instance to copy. + */ + protected PolylineOutlineMaterialCesiumWriter(PolylineOutlineMaterialCesiumWriter existingInstance) { + super(existingInstance); + } + + @Override + public PolylineOutlineMaterialCesiumWriter clone() { + return new PolylineOutlineMaterialCesiumWriter(this); + } + + /** + * Gets the writer for the color property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The color property defines the color of the surface. + + + */ + public final ColorCesiumWriter getColorWriter() { + return m_color.getValue(); + } + + /** + * + Opens and returns the writer for the color property. The color property defines the color of the surface. + + + */ + public final ColorCesiumWriter openColorProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getColorWriter()); + } + + /** + * + Writes a value for the color property as a rgba value. The color property specifies the color of the surface. + + + + * @param color The color. + */ + public final void writeColorProperty(Color color) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); + try { + writer.writeRgba(color); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the color property as a rgba value. The color property specifies the color of the surface. + + + + + + + * @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 writeColorProperty(int red, int green, int blue, int alpha) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); + try { + writer.writeRgba(red, green, blue, alpha); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the color property as a rgba value. The color property specifies the color of the surface. + + + + + + + * @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 writeColorProperty(List dates, List colors, int startIndex, int length) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); + try { + writer.writeRgba(dates, colors, startIndex, length); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the color property as a rgbaf value. The color property specifies the color of the surface. + + + + + + + * @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 writeColorPropertyRgbaf(float red, float green, float blue, float alpha) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); + try { + writer.writeRgbaf(red, green, blue, alpha); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the color property as a reference value. The color property specifies the color of the surface. + + + + * @param value The reference. + */ + public final void writeColorPropertyReference(Reference value) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the color property as a reference value. The color property specifies the color of the surface. + + + + * @param value The earliest date of the interval. + */ + public final void writeColorPropertyReference(String value) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); + try { + writer.writeReference(value); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the color property as a reference value. The color property specifies the color of 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 writeColorPropertyReference(String identifier, String propertyName) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); + try { + writer.writeReference(identifier, propertyName); + } finally { + DisposeHelper.dispose(writer); + } + } + } + + /** + * + Writes a value for the color property as a reference value. The color property specifies the color of 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 writeColorPropertyReference(String identifier, String[] propertyNames) { + { + cesiumlanguagewriter.ColorCesiumWriter writer = openColorProperty(); + 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 surface 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 surface 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 surface 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 surface 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 surface 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 surface 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 surface 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 surface 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 surface 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 surface 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 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 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 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 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 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 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 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 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/Schema/Material.jsonschema b/Schema/Material.jsonschema index 86b260f5..ac6932e0 100644 --- a/Schema/Material.jsonschema +++ b/Schema/Material.jsonschema @@ -17,8 +17,16 @@ "description": "Fills the surface with a grid." }, "stripe":{ - "$ref": "StripeMaterial.jsonschema", + "$ref": "StripeMaterial.jsonschema", "description": "Fills the surface with alternating colors." + }, + "polylineOutline":{ + "$ref": "PolylineOutlineMaterial.jsonschema", + "description": "Fills the surface of a line with an outlined color." + }, + "polylineGlow":{ + "$ref": "PolylineGlowMaterial.jsonschema", + "description": "Fills the surface of a line with a glowing color." } } } diff --git a/Schema/Path.jsonschema b/Schema/Path.jsonschema index 4b9c1925..dfb6a661 100644 --- a/Schema/Path.jsonschema +++ b/Schema/Path.jsonschema @@ -8,9 +8,9 @@ "$ref": "Boolean.jsonschema", "description": "Whether or not the path is shown." }, - "color": { - "$ref": "Color.jsonschema", - "description": "The color of the path line." + "material": { + "$ref": "Material.jsonschema", + "description": "The material to use to draw the path." }, "width": { "$ref": "Double.jsonschema", @@ -20,14 +20,6 @@ "$ref": "Double.jsonschema", "description": "The maximum step-size, in seconds, used to sample the path. If the `position` property has data points farther apart than resolution specfies, additional steps will be taken, creating a smoother path." }, - "outlineColor": { - "$ref": "Color.jsonschema", - "description": "The color of the outline of the path." - }, - "outlineWidth": { - "$ref": "Double.jsonschema", - "description": "The width of the outline of the path." - }, "leadTime": { "$ref": "Double.jsonschema", "description": "The time ahead of the animation time, in seconds, to show the path." diff --git a/Schema/Polyline.jsonschema b/Schema/Polyline.jsonschema index da9fe906..7dcabb47 100644 --- a/Schema/Polyline.jsonschema +++ b/Schema/Polyline.jsonschema @@ -12,21 +12,13 @@ "$ref": "Boolean.jsonschema", "description": "Whether or not the polyline is shown." }, - "color": { - "$ref": "Color.jsonschema", - "description": "The color of the polyline." + "material": { + "$ref": "Material.jsonschema", + "description": "The material to use to draw the polyline." }, "width": { "$ref": "Double.jsonschema", "description": "The width of the polyline." - }, - "outlineColor": { - "$ref": "Color.jsonschema", - "description": "The color of the outline of the polyline." - }, - "outlineWidth": { - "$ref": "Double.jsonschema", - "description": "The width of the outline of the polyline." } } } diff --git a/Schema/PolylineGlowMaterial.jsonschema b/Schema/PolylineGlowMaterial.jsonschema new file mode 100644 index 00000000..864a7748 --- /dev/null +++ b/Schema/PolylineGlowMaterial.jsonschema @@ -0,0 +1,16 @@ +{ + "title": "PolylineGlowMaterial", + "description": "Fills the surface of a line with a glowing color.", + "type": ["array", "object"], + "items": { "$ref": "#" }, + "properties": { + "color": { + "$ref": "Color.jsonschema", + "description": "The color of the surface." + }, + "glowPower": { + "$ref": "Double.jsonschema", + "description": "The strength of the glow." + } + } +} diff --git a/Schema/PolylineOutlineMaterial.jsonschema b/Schema/PolylineOutlineMaterial.jsonschema new file mode 100644 index 00000000..e2657f0c --- /dev/null +++ b/Schema/PolylineOutlineMaterial.jsonschema @@ -0,0 +1,20 @@ +{ + "title": "PolylineOutlineMaterial", + "description": "Fills the surface of a line with an outlined color.", + "type": ["array", "object"], + "items": { "$ref": "#" }, + "properties": { + "color": { + "$ref": "Color.jsonschema", + "description": "The color of the surface." + }, + "outlineColor": { + "$ref": "Color.jsonschema", + "description": "The color of the surface outline." + }, + "outlineWidth": { + "$ref": "Double.jsonschema", + "description": "The width of the outline." + } + } +} From 137a848d68c2ce6f7200be968c8d4217ea1122ee Mon Sep 17 00:00:00 2001 From: Matthew Amato Date: Thu, 10 Jul 2014 13:27:29 -0400 Subject: [PATCH 2/3] Split Material.jsonschema into two files PolylineMaterial.jsonschema - Materials applicable to polylines and paths. Material.jsonschema - materials applicable to everything else. This has no affect on the resulting CZML, it just makes it impossible to write out a material that is incompatible with it's intended object. --- .../CesiumLanguageWriter.csproj | 1 + .../Generated/MaterialCesiumWriter.cs | 46 ------ .../Generated/PathCesiumWriter.cs | 6 +- .../Generated/PolylineCesiumWriter.cs | 6 +- .../Generated/PolylineMaterialCesiumWriter.cs | 109 +++++++++++++ .../MaterialCesiumWriter.java | 67 -------- .../PathCesiumWriter.java | 14 +- .../PolylineCesiumWriter.java | 14 +- .../PolylineMaterialCesiumWriter.java | 143 ++++++++++++++++++ Schema/Material.jsonschema | 8 - Schema/Path.jsonschema | 2 +- Schema/Polyline.jsonschema | 2 +- Schema/PolylineMaterial.jsonschema | 20 +++ 13 files changed, 295 insertions(+), 143 deletions(-) create mode 100644 DotNet/CesiumLanguageWriter/Generated/PolylineMaterialCesiumWriter.cs create mode 100644 Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PolylineMaterialCesiumWriter.java create mode 100644 Schema/PolylineMaterial.jsonschema diff --git a/DotNet/CesiumLanguageWriter/CesiumLanguageWriter.csproj b/DotNet/CesiumLanguageWriter/CesiumLanguageWriter.csproj index 349b090e..f764ecbb 100644 --- a/DotNet/CesiumLanguageWriter/CesiumLanguageWriter.csproj +++ b/DotNet/CesiumLanguageWriter/CesiumLanguageWriter.csproj @@ -109,6 +109,7 @@ + diff --git a/DotNet/CesiumLanguageWriter/Generated/MaterialCesiumWriter.cs b/DotNet/CesiumLanguageWriter/Generated/MaterialCesiumWriter.cs index 55cddf00..2b72c47c 100644 --- a/DotNet/CesiumLanguageWriter/Generated/MaterialCesiumWriter.cs +++ b/DotNet/CesiumLanguageWriter/Generated/MaterialCesiumWriter.cs @@ -33,22 +33,10 @@ public class MaterialCesiumWriter : CesiumPropertyWriter /// public const string StripePropertyName = "stripe"; - /// - /// The name of the polylineOutline property. - /// - public const string PolylineOutlinePropertyName = "polylineOutline"; - - /// - /// The name of the polylineGlow property. - /// - public const string PolylineGlowPropertyName = "polylineGlow"; - private readonly Lazy m_solidColor = new Lazy(() => new SolidColorMaterialCesiumWriter(SolidColorPropertyName), false); private readonly Lazy m_image = new Lazy(() => new ImageMaterialCesiumWriter(ImagePropertyName), false); private readonly Lazy m_grid = new Lazy(() => new GridMaterialCesiumWriter(GridPropertyName), false); private readonly Lazy m_stripe = new Lazy(() => new StripeMaterialCesiumWriter(StripePropertyName), false); - private readonly Lazy m_polylineOutline = new Lazy(() => new PolylineOutlineMaterialCesiumWriter(PolylineOutlinePropertyName), false); - private readonly Lazy m_polylineGlow = new Lazy(() => new PolylineGlowMaterialCesiumWriter(PolylineGlowPropertyName), false); /// /// Initializes a new instance. @@ -141,39 +129,5 @@ public StripeMaterialCesiumWriter OpenStripeProperty() return OpenAndReturn(StripeWriter); } - /// - /// Gets the writer for the polylineOutline property. The returned instance must be opened by calling the method before it can be used for writing. The polylineOutline property defines fills the surface of a line with an outlined color. - /// - public PolylineOutlineMaterialCesiumWriter PolylineOutlineWriter - { - get { return m_polylineOutline.Value; } - } - - /// - /// Opens and returns the writer for the polylineOutline property. The polylineOutline property defines fills the surface of a line with an outlined color. - /// - public PolylineOutlineMaterialCesiumWriter OpenPolylineOutlineProperty() - { - OpenIntervalIfNecessary(); - return OpenAndReturn(PolylineOutlineWriter); - } - - /// - /// Gets the writer for the polylineGlow property. The returned instance must be opened by calling the method before it can be used for writing. The polylineGlow property defines fills the surface of a line with a glowing color. - /// - public PolylineGlowMaterialCesiumWriter PolylineGlowWriter - { - get { return m_polylineGlow.Value; } - } - - /// - /// Opens and returns the writer for the polylineGlow property. The polylineGlow property defines fills the surface of a line with a glowing color. - /// - public PolylineGlowMaterialCesiumWriter OpenPolylineGlowProperty() - { - OpenIntervalIfNecessary(); - return OpenAndReturn(PolylineGlowWriter); - } - } } diff --git a/DotNet/CesiumLanguageWriter/Generated/PathCesiumWriter.cs b/DotNet/CesiumLanguageWriter/Generated/PathCesiumWriter.cs index d8062197..d8550349 100644 --- a/DotNet/CesiumLanguageWriter/Generated/PathCesiumWriter.cs +++ b/DotNet/CesiumLanguageWriter/Generated/PathCesiumWriter.cs @@ -43,7 +43,7 @@ public class PathCesiumWriter : CesiumPropertyWriter public const string TrailTimePropertyName = "trailTime"; private readonly Lazy m_show = new Lazy(() => new BooleanCesiumWriter(ShowPropertyName), false); - private readonly Lazy m_material = new Lazy(() => new MaterialCesiumWriter(MaterialPropertyName), false); + private readonly Lazy m_material = new Lazy(() => new PolylineMaterialCesiumWriter(MaterialPropertyName), false); private readonly Lazy m_width = new Lazy(() => new DoubleCesiumWriter(WidthPropertyName), false); private readonly Lazy m_resolution = new Lazy(() => new DoubleCesiumWriter(ResolutionPropertyName), false); private readonly Lazy m_leadTime = new Lazy(() => new DoubleCesiumWriter(LeadTimePropertyName), false); @@ -104,7 +104,7 @@ public void WriteShowProperty(bool value) /// /// 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 use to draw the path. /// - public MaterialCesiumWriter MaterialWriter + public PolylineMaterialCesiumWriter MaterialWriter { get { return m_material.Value; } } @@ -112,7 +112,7 @@ public MaterialCesiumWriter MaterialWriter /// /// Opens and returns the writer for the material property. The material property defines the material to use to draw the path. /// - public MaterialCesiumWriter OpenMaterialProperty() + public PolylineMaterialCesiumWriter OpenMaterialProperty() { OpenIntervalIfNecessary(); return OpenAndReturn(MaterialWriter); diff --git a/DotNet/CesiumLanguageWriter/Generated/PolylineCesiumWriter.cs b/DotNet/CesiumLanguageWriter/Generated/PolylineCesiumWriter.cs index c1fe6673..fc9fb1b5 100644 --- a/DotNet/CesiumLanguageWriter/Generated/PolylineCesiumWriter.cs +++ b/DotNet/CesiumLanguageWriter/Generated/PolylineCesiumWriter.cs @@ -34,7 +34,7 @@ public class PolylineCesiumWriter : CesiumPropertyWriter private readonly Lazy m_positions = new Lazy(() => new PositionListCesiumWriter(PositionsPropertyName), false); private readonly Lazy m_show = new Lazy(() => new BooleanCesiumWriter(ShowPropertyName), false); - private readonly Lazy m_material = new Lazy(() => new MaterialCesiumWriter(MaterialPropertyName), false); + private readonly Lazy m_material = new Lazy(() => new PolylineMaterialCesiumWriter(MaterialPropertyName), false); private readonly Lazy m_width = new Lazy(() => new DoubleCesiumWriter(WidthPropertyName), false); /// @@ -157,7 +157,7 @@ public void WriteShowProperty(bool value) /// /// 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 use to draw the polyline. /// - public MaterialCesiumWriter MaterialWriter + public PolylineMaterialCesiumWriter MaterialWriter { get { return m_material.Value; } } @@ -165,7 +165,7 @@ public MaterialCesiumWriter MaterialWriter /// /// Opens and returns the writer for the material property. The material property defines the material to use to draw the polyline. /// - public MaterialCesiumWriter OpenMaterialProperty() + public PolylineMaterialCesiumWriter OpenMaterialProperty() { OpenIntervalIfNecessary(); return OpenAndReturn(MaterialWriter); diff --git a/DotNet/CesiumLanguageWriter/Generated/PolylineMaterialCesiumWriter.cs b/DotNet/CesiumLanguageWriter/Generated/PolylineMaterialCesiumWriter.cs new file mode 100644 index 00000000..f90fe042 --- /dev/null +++ b/DotNet/CesiumLanguageWriter/Generated/PolylineMaterialCesiumWriter.cs @@ -0,0 +1,109 @@ +// 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 PolylineMaterial to a . A PolylineMaterial defines how a polyline is colored or shaded. + /// + public class PolylineMaterialCesiumWriter : CesiumPropertyWriter + { + /// + /// The name of the solidColor property. + /// + public const string SolidColorPropertyName = "solidColor"; + + /// + /// The name of the polylineOutline property. + /// + public const string PolylineOutlinePropertyName = "polylineOutline"; + + /// + /// The name of the polylineGlow property. + /// + public const string PolylineGlowPropertyName = "polylineGlow"; + + private readonly Lazy m_solidColor = new Lazy(() => new SolidColorMaterialCesiumWriter(SolidColorPropertyName), false); + private readonly Lazy m_polylineOutline = new Lazy(() => new PolylineOutlineMaterialCesiumWriter(PolylineOutlinePropertyName), false); + private readonly Lazy m_polylineGlow = new Lazy(() => new PolylineGlowMaterialCesiumWriter(PolylineGlowPropertyName), false); + + /// + /// Initializes a new instance. + /// + public PolylineMaterialCesiumWriter(string propertyName) + : base(propertyName) + { + } + + /// + /// Initializes a new instance as a copy of an existing instance. + /// + /// The existing instance to copy. + protected PolylineMaterialCesiumWriter(PolylineMaterialCesiumWriter existingInstance) + : base(existingInstance) + { + } + + /// + public override PolylineMaterialCesiumWriter Clone() + { + return new PolylineMaterialCesiumWriter(this); + } + + /// + /// Gets the writer for the solidColor property. The returned instance must be opened by calling the method before it can be used for writing. The solidColor property defines colors the line with a solid color, which may be translucent. + /// + public SolidColorMaterialCesiumWriter SolidColorWriter + { + get { return m_solidColor.Value; } + } + + /// + /// Opens and returns the writer for the solidColor property. The solidColor property defines colors the line with a solid color, which may be translucent. + /// + public SolidColorMaterialCesiumWriter OpenSolidColorProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(SolidColorWriter); + } + + /// + /// Gets the writer for the polylineOutline property. The returned instance must be opened by calling the method before it can be used for writing. The polylineOutline property defines colors the line with a color and outline. + /// + public PolylineOutlineMaterialCesiumWriter PolylineOutlineWriter + { + get { return m_polylineOutline.Value; } + } + + /// + /// Opens and returns the writer for the polylineOutline property. The polylineOutline property defines colors the line with a color and outline. + /// + public PolylineOutlineMaterialCesiumWriter OpenPolylineOutlineProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(PolylineOutlineWriter); + } + + /// + /// Gets the writer for the polylineGlow property. The returned instance must be opened by calling the method before it can be used for writing. The polylineGlow property defines colors the line with a glowing color. + /// + public PolylineGlowMaterialCesiumWriter PolylineGlowWriter + { + get { return m_polylineGlow.Value; } + } + + /// + /// Opens and returns the writer for the polylineGlow property. The polylineGlow property defines colors the line with a glowing color. + /// + public PolylineGlowMaterialCesiumWriter OpenPolylineGlowProperty() + { + OpenIntervalIfNecessary(); + return OpenAndReturn(PolylineGlowWriter); + } + + } +} diff --git a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/MaterialCesiumWriter.java b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/MaterialCesiumWriter.java index 64b5a556..5d871f55 100644 --- a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/MaterialCesiumWriter.java +++ b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/MaterialCesiumWriter.java @@ -7,8 +7,6 @@ import cesiumlanguagewriter.advanced.*; import cesiumlanguagewriter.GridMaterialCesiumWriter; import cesiumlanguagewriter.ImageMaterialCesiumWriter; -import cesiumlanguagewriter.PolylineGlowMaterialCesiumWriter; -import cesiumlanguagewriter.PolylineOutlineMaterialCesiumWriter; import cesiumlanguagewriter.SolidColorMaterialCesiumWriter; import cesiumlanguagewriter.StripeMaterialCesiumWriter; @@ -47,20 +45,6 @@ public class MaterialCesiumWriter extends CesiumPropertyWriterpolylineOutline property. - - - */ - public static final String PolylineOutlinePropertyName = "polylineOutline"; - /** - * - The name of the polylineGlow property. - - - */ - public static final String PolylineGlowPropertyName = "polylineGlow"; private Lazy m_solidColor = new Lazy(new Func1() { public cesiumlanguagewriter.SolidColorMaterialCesiumWriter invoke() { return new SolidColorMaterialCesiumWriter(SolidColorPropertyName); @@ -81,17 +65,6 @@ public cesiumlanguagewriter.StripeMaterialCesiumWriter invoke() { return new StripeMaterialCesiumWriter(StripePropertyName); } }, false); - private Lazy m_polylineOutline = new Lazy( - new Func1() { - public cesiumlanguagewriter.PolylineOutlineMaterialCesiumWriter invoke() { - return new PolylineOutlineMaterialCesiumWriter(PolylineOutlinePropertyName); - } - }, false); - private Lazy m_polylineGlow = new Lazy(new Func1() { - public cesiumlanguagewriter.PolylineGlowMaterialCesiumWriter invoke() { - return new PolylineGlowMaterialCesiumWriter(PolylineGlowPropertyName); - } - }, false); /** * @@ -199,44 +172,4 @@ public final StripeMaterialCesiumWriter openStripeProperty() { openIntervalIfNecessary(); return this. openAndReturn(getStripeWriter()); } - - /** - * Gets the writer for the polylineOutline property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The polylineOutline property defines fills the surface of a line with an outlined color. - - - */ - public final PolylineOutlineMaterialCesiumWriter getPolylineOutlineWriter() { - return m_polylineOutline.getValue(); - } - - /** - * - Opens and returns the writer for the polylineOutline property. The polylineOutline property defines fills the surface of a line with an outlined color. - - - */ - public final PolylineOutlineMaterialCesiumWriter openPolylineOutlineProperty() { - openIntervalIfNecessary(); - return this. openAndReturn(getPolylineOutlineWriter()); - } - - /** - * Gets the writer for the polylineGlow property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The polylineGlow property defines fills the surface of a line with a glowing color. - - - */ - public final PolylineGlowMaterialCesiumWriter getPolylineGlowWriter() { - return m_polylineGlow.getValue(); - } - - /** - * - Opens and returns the writer for the polylineGlow property. The polylineGlow property defines fills the surface of a line with a glowing color. - - - */ - public final PolylineGlowMaterialCesiumWriter openPolylineGlowProperty() { - openIntervalIfNecessary(); - return this. openAndReturn(getPolylineGlowWriter()); - } } \ No newline at end of file diff --git a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PathCesiumWriter.java b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PathCesiumWriter.java index 597007cc..fa823da2 100644 --- a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PathCesiumWriter.java +++ b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PathCesiumWriter.java @@ -8,7 +8,7 @@ import cesiumlanguagewriter.advanced.*; import cesiumlanguagewriter.BooleanCesiumWriter; import cesiumlanguagewriter.DoubleCesiumWriter; -import cesiumlanguagewriter.MaterialCesiumWriter; +import cesiumlanguagewriter.PolylineMaterialCesiumWriter; import java.util.List; /** @@ -65,9 +65,9 @@ public cesiumlanguagewriter.BooleanCesiumWriter invoke() { return new BooleanCesiumWriter(ShowPropertyName); } }, false); - private Lazy m_material = new Lazy(new Func1() { - public cesiumlanguagewriter.MaterialCesiumWriter invoke() { - return new MaterialCesiumWriter(MaterialPropertyName); + private Lazy m_material = new Lazy(new Func1() { + public cesiumlanguagewriter.PolylineMaterialCesiumWriter invoke() { + return new PolylineMaterialCesiumWriter(MaterialPropertyName); } }, false); private Lazy m_width = new Lazy(new Func1() { @@ -162,7 +162,7 @@ public final void writeShowProperty(boolean value) { */ - public final MaterialCesiumWriter getMaterialWriter() { + public final PolylineMaterialCesiumWriter getMaterialWriter() { return m_material.getValue(); } @@ -172,9 +172,9 @@ public final MaterialCesiumWriter getMaterialWriter() { */ - public final MaterialCesiumWriter openMaterialProperty() { + public final PolylineMaterialCesiumWriter openMaterialProperty() { openIntervalIfNecessary(); - return this. openAndReturn(getMaterialWriter()); + return this. openAndReturn(getMaterialWriter()); } /** diff --git a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PolylineCesiumWriter.java b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PolylineCesiumWriter.java index 39aef7a4..a3708be3 100644 --- a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PolylineCesiumWriter.java +++ b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PolylineCesiumWriter.java @@ -8,7 +8,7 @@ import cesiumlanguagewriter.advanced.*; import cesiumlanguagewriter.BooleanCesiumWriter; import cesiumlanguagewriter.DoubleCesiumWriter; -import cesiumlanguagewriter.MaterialCesiumWriter; +import cesiumlanguagewriter.PolylineMaterialCesiumWriter; import cesiumlanguagewriter.PositionListCesiumWriter; import java.util.List; @@ -57,9 +57,9 @@ public cesiumlanguagewriter.BooleanCesiumWriter invoke() { return new BooleanCesiumWriter(ShowPropertyName); } }, false); - private Lazy m_material = new Lazy(new Func1() { - public cesiumlanguagewriter.MaterialCesiumWriter invoke() { - return new MaterialCesiumWriter(MaterialPropertyName); + private Lazy m_material = new Lazy(new Func1() { + public cesiumlanguagewriter.PolylineMaterialCesiumWriter invoke() { + return new PolylineMaterialCesiumWriter(MaterialPropertyName); } }, false); private Lazy m_width = new Lazy(new Func1() { @@ -235,7 +235,7 @@ public final void writeShowProperty(boolean value) { */ - public final MaterialCesiumWriter getMaterialWriter() { + public final PolylineMaterialCesiumWriter getMaterialWriter() { return m_material.getValue(); } @@ -245,9 +245,9 @@ public final MaterialCesiumWriter getMaterialWriter() { */ - public final MaterialCesiumWriter openMaterialProperty() { + public final PolylineMaterialCesiumWriter openMaterialProperty() { openIntervalIfNecessary(); - return this. openAndReturn(getMaterialWriter()); + return this. openAndReturn(getMaterialWriter()); } /** diff --git a/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PolylineMaterialCesiumWriter.java b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PolylineMaterialCesiumWriter.java new file mode 100644 index 00000000..0dde3ebb --- /dev/null +++ b/Java/CesiumLanguageWriter/translatedSrc/cesiumlanguagewriter/PolylineMaterialCesiumWriter.java @@ -0,0 +1,143 @@ +package cesiumlanguagewriter; + + +import agi.foundation.compatibility.*; +import agi.foundation.compatibility.Func1; +import agi.foundation.compatibility.Lazy; +import cesiumlanguagewriter.advanced.*; +import cesiumlanguagewriter.PolylineGlowMaterialCesiumWriter; +import cesiumlanguagewriter.PolylineOutlineMaterialCesiumWriter; +import cesiumlanguagewriter.SolidColorMaterialCesiumWriter; + +/** + * + Writes a PolylineMaterial to a {@link CesiumOutputStream}. A PolylineMaterial defines how a polyline is colored or shaded. + + + */ +public class PolylineMaterialCesiumWriter extends CesiumPropertyWriter { + /** + * + The name of the solidColor property. + + + */ + public static final String SolidColorPropertyName = "solidColor"; + /** + * + The name of the polylineOutline property. + + + */ + public static final String PolylineOutlinePropertyName = "polylineOutline"; + /** + * + The name of the polylineGlow property. + + + */ + public static final String PolylineGlowPropertyName = "polylineGlow"; + private Lazy m_solidColor = new Lazy(new Func1() { + public cesiumlanguagewriter.SolidColorMaterialCesiumWriter invoke() { + return new SolidColorMaterialCesiumWriter(SolidColorPropertyName); + } + }, false); + private Lazy m_polylineOutline = new Lazy( + new Func1() { + public cesiumlanguagewriter.PolylineOutlineMaterialCesiumWriter invoke() { + return new PolylineOutlineMaterialCesiumWriter(PolylineOutlinePropertyName); + } + }, false); + private Lazy m_polylineGlow = new Lazy(new Func1() { + public cesiumlanguagewriter.PolylineGlowMaterialCesiumWriter invoke() { + return new PolylineGlowMaterialCesiumWriter(PolylineGlowPropertyName); + } + }, false); + + /** + * + Initializes a new instance. + + + */ + public PolylineMaterialCesiumWriter(String propertyName) { + super(propertyName); + } + + /** + * + Initializes a new instance as a copy of an existing instance. + + + + * @param existingInstance The existing instance to copy. + */ + protected PolylineMaterialCesiumWriter(PolylineMaterialCesiumWriter existingInstance) { + super(existingInstance); + } + + @Override + public PolylineMaterialCesiumWriter clone() { + return new PolylineMaterialCesiumWriter(this); + } + + /** + * Gets the writer for the solidColor property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The solidColor property defines colors the line with a solid color, which may be translucent. + + + */ + public final SolidColorMaterialCesiumWriter getSolidColorWriter() { + return m_solidColor.getValue(); + } + + /** + * + Opens and returns the writer for the solidColor property. The solidColor property defines colors the line with a solid color, which may be translucent. + + + */ + public final SolidColorMaterialCesiumWriter openSolidColorProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getSolidColorWriter()); + } + + /** + * Gets the writer for the polylineOutline property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The polylineOutline property defines colors the line with a color and outline. + + + */ + public final PolylineOutlineMaterialCesiumWriter getPolylineOutlineWriter() { + return m_polylineOutline.getValue(); + } + + /** + * + Opens and returns the writer for the polylineOutline property. The polylineOutline property defines colors the line with a color and outline. + + + */ + public final PolylineOutlineMaterialCesiumWriter openPolylineOutlineProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getPolylineOutlineWriter()); + } + + /** + * Gets the writer for the polylineGlow property. The returned instance must be opened by calling the {@link CesiumElementWriter#open} method before it can be used for writing. The polylineGlow property defines colors the line with a glowing color. + + + */ + public final PolylineGlowMaterialCesiumWriter getPolylineGlowWriter() { + return m_polylineGlow.getValue(); + } + + /** + * + Opens and returns the writer for the polylineGlow property. The polylineGlow property defines colors the line with a glowing color. + + + */ + public final PolylineGlowMaterialCesiumWriter openPolylineGlowProperty() { + openIntervalIfNecessary(); + return this. openAndReturn(getPolylineGlowWriter()); + } +} \ No newline at end of file diff --git a/Schema/Material.jsonschema b/Schema/Material.jsonschema index ac6932e0..ad33c807 100644 --- a/Schema/Material.jsonschema +++ b/Schema/Material.jsonschema @@ -19,14 +19,6 @@ "stripe":{ "$ref": "StripeMaterial.jsonschema", "description": "Fills the surface with alternating colors." - }, - "polylineOutline":{ - "$ref": "PolylineOutlineMaterial.jsonschema", - "description": "Fills the surface of a line with an outlined color." - }, - "polylineGlow":{ - "$ref": "PolylineGlowMaterial.jsonschema", - "description": "Fills the surface of a line with a glowing color." } } } diff --git a/Schema/Path.jsonschema b/Schema/Path.jsonschema index dfb6a661..d06865a8 100644 --- a/Schema/Path.jsonschema +++ b/Schema/Path.jsonschema @@ -9,7 +9,7 @@ "description": "Whether or not the path is shown." }, "material": { - "$ref": "Material.jsonschema", + "$ref": "PolylineMaterial.jsonschema", "description": "The material to use to draw the path." }, "width": { diff --git a/Schema/Polyline.jsonschema b/Schema/Polyline.jsonschema index 7dcabb47..f11a78c0 100644 --- a/Schema/Polyline.jsonschema +++ b/Schema/Polyline.jsonschema @@ -13,7 +13,7 @@ "description": "Whether or not the polyline is shown." }, "material": { - "$ref": "Material.jsonschema", + "$ref": "PolylineMaterial.jsonschema", "description": "The material to use to draw the polyline." }, "width": { diff --git a/Schema/PolylineMaterial.jsonschema b/Schema/PolylineMaterial.jsonschema new file mode 100644 index 00000000..a9daab98 --- /dev/null +++ b/Schema/PolylineMaterial.jsonschema @@ -0,0 +1,20 @@ +{ + "title": "PolylineMaterial", + "description": "Defines how a polyline is colored or shaded.", + "type": ["array", "object"], + "items": { "$ref": "#" }, + "properties": { + "solidColor": { + "$ref": "SolidColorMaterial.jsonschema", + "description": "Colors the line with a solid color, which may be translucent." + }, + "polylineOutline":{ + "$ref": "PolylineOutlineMaterial.jsonschema", + "description": "Colors the line with a color and outline." + }, + "polylineGlow":{ + "$ref": "PolylineGlowMaterial.jsonschema", + "description": "Colors the line with a glowing color." + } + } +} \ No newline at end of file From cb3799bfc82faa08b8828ad85b225907ec5d72c7 Mon Sep 17 00:00:00 2001 From: Matthew Amato Date: Thu, 10 Jul 2014 14:32:44 -0400 Subject: [PATCH 3/3] Forgot to save sln. --- DotNet/CesiumLanguageWriter.sln | 1 + 1 file changed, 1 insertion(+) diff --git a/DotNet/CesiumLanguageWriter.sln b/DotNet/CesiumLanguageWriter.sln index 540b8877..dc7b26f1 100644 --- a/DotNet/CesiumLanguageWriter.sln +++ b/DotNet/CesiumLanguageWriter.sln @@ -52,6 +52,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Schema", "Schema", "{04E49F ..\Schema\Polygon.jsonschema = ..\Schema\Polygon.jsonschema ..\Schema\Polyline.jsonschema = ..\Schema\Polyline.jsonschema ..\Schema\PolylineGlowMaterial.jsonschema = ..\Schema\PolylineGlowMaterial.jsonschema + ..\Schema\PolylineMaterial.jsonschema = ..\Schema\PolylineMaterial.jsonschema ..\Schema\PolylineOutlineMaterial.jsonschema = ..\Schema\PolylineOutlineMaterial.jsonschema ..\Schema\Position.jsonschema = ..\Schema\Position.jsonschema ..\Schema\PositionList.jsonschema = ..\Schema\PositionList.jsonschema