Skip to content

Commit

Permalink
Add support for geometry outline widths
Browse files Browse the repository at this point in the history
Am often requested feature on the mailing list.
  • Loading branch information
mramato committed Nov 4, 2014
1 parent cb01942 commit ff5c8ec
Show file tree
Hide file tree
Showing 12 changed files with 1,212 additions and 172 deletions.
100 changes: 100 additions & 0 deletions DotNet/CesiumLanguageWriter/Generated/EllipseCesiumWriter.cs
Expand Up @@ -73,6 +73,11 @@ public class EllipseCesiumWriter : CesiumPropertyWriter<EllipseCesiumWriter>
/// </summary>
public const string OutlineColorPropertyName = "outlineColor";

/// <summary>
/// The name of the <code>outlineWidth</code> property.
/// </summary>
public const string OutlineWidthPropertyName = "outlineWidth";

/// <summary>
/// The name of the <code>numberOfVerticalLines</code> property.
/// </summary>
Expand All @@ -90,6 +95,7 @@ public class EllipseCesiumWriter : CesiumPropertyWriter<EllipseCesiumWriter>
private readonly Lazy<BooleanCesiumWriter> m_fill = new Lazy<BooleanCesiumWriter>(() => new BooleanCesiumWriter(FillPropertyName), false);
private readonly Lazy<BooleanCesiumWriter> m_outline = new Lazy<BooleanCesiumWriter>(() => new BooleanCesiumWriter(OutlinePropertyName), false);
private readonly Lazy<ColorCesiumWriter> m_outlineColor = new Lazy<ColorCesiumWriter>(() => new ColorCesiumWriter(OutlineColorPropertyName), false);
private readonly Lazy<DoubleCesiumWriter> m_outlineWidth = new Lazy<DoubleCesiumWriter>(() => new DoubleCesiumWriter(OutlineWidthPropertyName), false);
private readonly Lazy<DoubleCesiumWriter> m_numberOfVerticalLines = new Lazy<DoubleCesiumWriter>(() => new DoubleCesiumWriter(NumberOfVerticalLinesPropertyName), false);

/// <summary>
Expand Down Expand Up @@ -1001,6 +1007,100 @@ public void WriteOutlineColorPropertyReference(string identifier, string[] prope
}
}

/// <summary>
/// Gets the writer for the <code>outlineWidth</code> property. The returned instance must be opened by calling the <see cref="CesiumElementWriter.Open"/> method before it can be used for writing. The <code>outlineWidth</code> property defines the width of the ellipse outline.
/// </summary>
public DoubleCesiumWriter OutlineWidthWriter
{
get { return m_outlineWidth.Value; }
}

/// <summary>
/// Opens and returns the writer for the <code>outlineWidth</code> property. The <code>outlineWidth</code> property defines the width of the ellipse outline.
/// </summary>
public DoubleCesiumWriter OpenOutlineWidthProperty()
{
OpenIntervalIfNecessary();
return OpenAndReturn(OutlineWidthWriter);
}

/// <summary>
/// Writes a value for the <code>outlineWidth</code> property as a <code>number</code> value. The <code>outlineWidth</code> property specifies the width of the ellipse outline.
/// </summary>
/// <param name="value">The value.</param>
public void WriteOutlineWidthProperty(double value)
{
using (var writer = OpenOutlineWidthProperty())
{
writer.WriteNumber(value);
}
}

/// <summary>
/// Writes a value for the <code>outlineWidth</code> property as a <code>number</code> value. The <code>outlineWidth</code> property specifies the width of the ellipse outline.
/// </summary>
/// <param name="dates">The dates at which the value is specified.</param>
/// <param name="values">The value corresponding to each date.</param>
/// <param name="startIndex">The index of the first element to use in the `values` collection.</param>
/// <param name="length">The number of elements to use from the `values` collection.</param>
public void WriteOutlineWidthProperty(IList<JulianDate> dates, IList<double> values, int startIndex, int length)
{
using (var writer = OpenOutlineWidthProperty())
{
writer.WriteNumber(dates, values, startIndex, length);
}
}

/// <summary>
/// Writes a value for the <code>outlineWidth</code> property as a <code>reference</code> value. The <code>outlineWidth</code> property specifies the width of the ellipse outline.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteOutlineWidthPropertyReference(Reference value)
{
using (var writer = OpenOutlineWidthProperty())
{
writer.WriteReference(value);
}
}

/// <summary>
/// Writes a value for the <code>outlineWidth</code> property as a <code>reference</code> value. The <code>outlineWidth</code> property specifies the width of the ellipse outline.
/// </summary>
/// <param name="value">The earliest date of the interval.</param>
public void WriteOutlineWidthPropertyReference(string value)
{
using (var writer = OpenOutlineWidthProperty())
{
writer.WriteReference(value);
}
}

/// <summary>
/// Writes a value for the <code>outlineWidth</code> property as a <code>reference</code> value. The <code>outlineWidth</code> property specifies the width of the ellipse outline.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyName">The property on the referenced object.</param>
public void WriteOutlineWidthPropertyReference(string identifier, string propertyName)
{
using (var writer = OpenOutlineWidthProperty())
{
writer.WriteReference(identifier, propertyName);
}
}

/// <summary>
/// Writes a value for the <code>outlineWidth</code> property as a <code>reference</code> value. The <code>outlineWidth</code> property specifies the width of the ellipse outline.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyNames">The hierarchy of properties to be indexed on the referenced object.</param>
public void WriteOutlineWidthPropertyReference(string identifier, string[] propertyNames)
{
using (var writer = OpenOutlineWidthProperty())
{
writer.WriteReference(identifier, propertyNames);
}
}

/// <summary>
/// Gets the writer for the <code>numberOfVerticalLines</code> property. The returned instance must be opened by calling the <see cref="CesiumElementWriter.Open"/> method before it can be used for writing. The <code>numberOfVerticalLines</code> property defines the number of vertical lines to use when outlining an extruded ellipse.
/// </summary>
Expand Down
100 changes: 100 additions & 0 deletions DotNet/CesiumLanguageWriter/Generated/EllipsoidCesiumWriter.cs
Expand Up @@ -43,6 +43,11 @@ public class EllipsoidCesiumWriter : CesiumPropertyWriter<EllipsoidCesiumWriter>
/// </summary>
public const string OutlineColorPropertyName = "outlineColor";

/// <summary>
/// The name of the <code>outlineWidth</code> property.
/// </summary>
public const string OutlineWidthPropertyName = "outlineWidth";

/// <summary>
/// The name of the <code>stackPartitions</code> property.
/// </summary>
Expand All @@ -64,6 +69,7 @@ public class EllipsoidCesiumWriter : CesiumPropertyWriter<EllipsoidCesiumWriter>
private readonly Lazy<MaterialCesiumWriter> m_material = new Lazy<MaterialCesiumWriter>(() => new MaterialCesiumWriter(MaterialPropertyName), false);
private readonly Lazy<BooleanCesiumWriter> m_outline = new Lazy<BooleanCesiumWriter>(() => new BooleanCesiumWriter(OutlinePropertyName), false);
private readonly Lazy<ColorCesiumWriter> m_outlineColor = new Lazy<ColorCesiumWriter>(() => new ColorCesiumWriter(OutlineColorPropertyName), false);
private readonly Lazy<DoubleCesiumWriter> m_outlineWidth = new Lazy<DoubleCesiumWriter>(() => new DoubleCesiumWriter(OutlineWidthPropertyName), false);
private readonly Lazy<DoubleCesiumWriter> m_stackPartitions = new Lazy<DoubleCesiumWriter>(() => new DoubleCesiumWriter(StackPartitionsPropertyName), false);
private readonly Lazy<DoubleCesiumWriter> m_slicePartitions = new Lazy<DoubleCesiumWriter>(() => new DoubleCesiumWriter(SlicePartitionsPropertyName), false);
private readonly Lazy<DoubleCesiumWriter> m_subdivisions = new Lazy<DoubleCesiumWriter>(() => new DoubleCesiumWriter(SubdivisionsPropertyName), false);
Expand Down Expand Up @@ -426,6 +432,100 @@ public void WriteOutlineColorPropertyReference(string identifier, string[] prope
}
}

/// <summary>
/// Gets the writer for the <code>outlineWidth</code> property. The returned instance must be opened by calling the <see cref="CesiumElementWriter.Open"/> method before it can be used for writing. The <code>outlineWidth</code> property defines the width of the ellipsoid outline.
/// </summary>
public DoubleCesiumWriter OutlineWidthWriter
{
get { return m_outlineWidth.Value; }
}

/// <summary>
/// Opens and returns the writer for the <code>outlineWidth</code> property. The <code>outlineWidth</code> property defines the width of the ellipsoid outline.
/// </summary>
public DoubleCesiumWriter OpenOutlineWidthProperty()
{
OpenIntervalIfNecessary();
return OpenAndReturn(OutlineWidthWriter);
}

/// <summary>
/// Writes a value for the <code>outlineWidth</code> property as a <code>number</code> value. The <code>outlineWidth</code> property specifies the width of the ellipsoid outline.
/// </summary>
/// <param name="value">The value.</param>
public void WriteOutlineWidthProperty(double value)
{
using (var writer = OpenOutlineWidthProperty())
{
writer.WriteNumber(value);
}
}

/// <summary>
/// Writes a value for the <code>outlineWidth</code> property as a <code>number</code> value. The <code>outlineWidth</code> property specifies the width of the ellipsoid outline.
/// </summary>
/// <param name="dates">The dates at which the value is specified.</param>
/// <param name="values">The value corresponding to each date.</param>
/// <param name="startIndex">The index of the first element to use in the `values` collection.</param>
/// <param name="length">The number of elements to use from the `values` collection.</param>
public void WriteOutlineWidthProperty(IList<JulianDate> dates, IList<double> values, int startIndex, int length)
{
using (var writer = OpenOutlineWidthProperty())
{
writer.WriteNumber(dates, values, startIndex, length);
}
}

/// <summary>
/// Writes a value for the <code>outlineWidth</code> property as a <code>reference</code> value. The <code>outlineWidth</code> property specifies the width of the ellipsoid outline.
/// </summary>
/// <param name="value">The reference.</param>
public void WriteOutlineWidthPropertyReference(Reference value)
{
using (var writer = OpenOutlineWidthProperty())
{
writer.WriteReference(value);
}
}

/// <summary>
/// Writes a value for the <code>outlineWidth</code> property as a <code>reference</code> value. The <code>outlineWidth</code> property specifies the width of the ellipsoid outline.
/// </summary>
/// <param name="value">The earliest date of the interval.</param>
public void WriteOutlineWidthPropertyReference(string value)
{
using (var writer = OpenOutlineWidthProperty())
{
writer.WriteReference(value);
}
}

/// <summary>
/// Writes a value for the <code>outlineWidth</code> property as a <code>reference</code> value. The <code>outlineWidth</code> property specifies the width of the ellipsoid outline.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyName">The property on the referenced object.</param>
public void WriteOutlineWidthPropertyReference(string identifier, string propertyName)
{
using (var writer = OpenOutlineWidthProperty())
{
writer.WriteReference(identifier, propertyName);
}
}

/// <summary>
/// Writes a value for the <code>outlineWidth</code> property as a <code>reference</code> value. The <code>outlineWidth</code> property specifies the width of the ellipsoid outline.
/// </summary>
/// <param name="identifier">The identifier of the object which contains the referenced property.</param>
/// <param name="propertyNames">The hierarchy of properties to be indexed on the referenced object.</param>
public void WriteOutlineWidthPropertyReference(string identifier, string[] propertyNames)
{
using (var writer = OpenOutlineWidthProperty())
{
writer.WriteReference(identifier, propertyNames);
}
}

/// <summary>
/// Gets the writer for the <code>stackPartitions</code> property. The returned instance must be opened by calling the <see cref="CesiumElementWriter.Open"/> method before it can be used for writing. The <code>stackPartitions</code> property defines the number of times to partition the ellipsoid into stacks.
/// </summary>
Expand Down

0 comments on commit ff5c8ec

Please sign in to comment.