-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #110 from AnalyticalGraphicsInc/addPolylineArrow
Add PolylineArrowMaterial.
- Loading branch information
Showing
30 changed files
with
1,369 additions
and
112 deletions.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
DotNet/CesiumLanguageWriter/Attributes/CSToJavaExcludeAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
DotNet/CesiumLanguageWriter/Attributes/CSToJavaExcludeBaseAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
DotNet/CesiumLanguageWriter/Attributes/CSToJavaImmutableValueType.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
using System; | ||
using System.Diagnostics; | ||
|
||
/// <summary> | ||
/// Mark a value type as being immutable, and therefore not necessary to clone when making copies. | ||
/// </summary> | ||
[Conditional("CSTOJAVA")] | ||
[AttributeUsage(AttributeTargets.Struct)] | ||
[CSToJavaExclude] | ||
[CoverageExcludeAttribute] | ||
internal sealed class CSToJavaImmutableValueType : Attribute | ||
{ | ||
} |
3 changes: 2 additions & 1 deletion
3
DotNet/CesiumLanguageWriter/Attributes/CSToJavaRenameAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
DotNet/CesiumLanguageWriter/Attributes/CSToJavaUseNullForDefaultGenericTypeValueAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
DotNet/CesiumLanguageWriter/Attributes/CoverageExcludeAttribute.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
171 changes: 171 additions & 0 deletions
171
DotNet/CesiumLanguageWriter/Generated/PolylineArrowMaterialCesiumWriter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
// 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 | ||
{ | ||
/// <summary> | ||
/// Writes a <code>PolylineArrowMaterial</code> to a <see cref="CesiumOutputStream" />. A <code>PolylineArrowMaterial</code> is a material that fills the surface of a line with an arrow. | ||
/// </summary> | ||
public class PolylineArrowMaterialCesiumWriter : CesiumPropertyWriter<PolylineArrowMaterialCesiumWriter> | ||
{ | ||
/// <summary> | ||
/// The name of the <code>color</code> property. | ||
/// </summary> | ||
public const string ColorPropertyName = "color"; | ||
|
||
private readonly Lazy<ColorCesiumWriter> m_color = new Lazy<ColorCesiumWriter>(() => new ColorCesiumWriter(ColorPropertyName), false); | ||
|
||
/// <summary> | ||
/// Initializes a new instance. | ||
/// </summary> | ||
public PolylineArrowMaterialCesiumWriter(string propertyName) | ||
: base(propertyName) | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance as a copy of an existing instance. | ||
/// </summary> | ||
/// <param name="existingInstance">The existing instance to copy.</param> | ||
protected PolylineArrowMaterialCesiumWriter(PolylineArrowMaterialCesiumWriter existingInstance) | ||
: base(existingInstance) | ||
{ | ||
} | ||
|
||
/// <inheritdoc /> | ||
public override PolylineArrowMaterialCesiumWriter Clone() | ||
{ | ||
return new PolylineArrowMaterialCesiumWriter(this); | ||
} | ||
|
||
/// <summary> | ||
/// Gets the writer for the <code>color</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>color</code> property defines the color of the surface. | ||
/// </summary> | ||
public ColorCesiumWriter ColorWriter | ||
{ | ||
get { return m_color.Value; } | ||
} | ||
|
||
/// <summary> | ||
/// Opens and returns the writer for the <code>color</code> property. The <code>color</code> property defines the color of the surface. | ||
/// </summary> | ||
public ColorCesiumWriter OpenColorProperty() | ||
{ | ||
OpenIntervalIfNecessary(); | ||
return OpenAndReturn(ColorWriter); | ||
} | ||
|
||
/// <summary> | ||
/// Writes a value for the <code>color</code> property as a <code>rgba</code> value. The <code>color</code> property specifies the color of the surface. | ||
/// </summary> | ||
/// <param name="color">The color.</param> | ||
public void WriteColorProperty(Color color) | ||
{ | ||
using (var writer = OpenColorProperty()) | ||
{ | ||
writer.WriteRgba(color); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// Writes a value for the <code>color</code> property as a <code>rgba</code> value. The <code>color</code> property specifies the color of the surface. | ||
/// </summary> | ||
/// <param name="red">The red component in the range 0 to 255.</param> | ||
/// <param name="green">The green component in the range 0 to 255.</param> | ||
/// <param name="blue">The blue component in the range 0 to 255.</param> | ||
/// <param name="alpha">The alpha component in the range 0 to 255.</param> | ||
public void WriteColorProperty(int red, int green, int blue, int alpha) | ||
{ | ||
using (var writer = OpenColorProperty()) | ||
{ | ||
writer.WriteRgba(red, green, blue, alpha); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// Writes a value for the <code>color</code> property as a <code>rgba</code> value. The <code>color</code> property specifies the color of the surface. | ||
/// </summary> | ||
/// <param name="dates">The dates at which the value is specified.</param> | ||
/// <param name="colors">The color corresponding to each date.</param> | ||
/// <param name="startIndex">The index of the first element to use in the `colors` collection.</param> | ||
/// <param name="length">The number of elements to use from the `colors` collection.</param> | ||
public void WriteColorProperty(IList<JulianDate> dates, IList<Color> colors, int startIndex, int length) | ||
{ | ||
using (var writer = OpenColorProperty()) | ||
{ | ||
writer.WriteRgba(dates, colors, startIndex, length); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// Writes a value for the <code>color</code> property as a <code>rgbaf</code> value. The <code>color</code> property specifies the color of the surface. | ||
/// </summary> | ||
/// <param name="red">The red component in the range 0 to 1.0.</param> | ||
/// <param name="green">The green component in the range 0 to 1.0.</param> | ||
/// <param name="blue">The blue component in the range 0 to 1.0.</param> | ||
/// <param name="alpha">The alpha component in the range 0 to 1.0.</param> | ||
public void WriteColorPropertyRgbaf(float red, float green, float blue, float alpha) | ||
{ | ||
using (var writer = OpenColorProperty()) | ||
{ | ||
writer.WriteRgbaf(red, green, blue, alpha); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// Writes a value for the <code>color</code> property as a <code>reference</code> value. The <code>color</code> property specifies the color of the surface. | ||
/// </summary> | ||
/// <param name="value">The reference.</param> | ||
public void WriteColorPropertyReference(Reference value) | ||
{ | ||
using (var writer = OpenColorProperty()) | ||
{ | ||
writer.WriteReference(value); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// Writes a value for the <code>color</code> property as a <code>reference</code> value. The <code>color</code> property specifies the color of the surface. | ||
/// </summary> | ||
/// <param name="value">The earliest date of the interval.</param> | ||
public void WriteColorPropertyReference(string value) | ||
{ | ||
using (var writer = OpenColorProperty()) | ||
{ | ||
writer.WriteReference(value); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// Writes a value for the <code>color</code> property as a <code>reference</code> value. The <code>color</code> property specifies the color of the surface. | ||
/// </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 WriteColorPropertyReference(string identifier, string propertyName) | ||
{ | ||
using (var writer = OpenColorProperty()) | ||
{ | ||
writer.WriteReference(identifier, propertyName); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// Writes a value for the <code>color</code> property as a <code>reference</code> value. The <code>color</code> property specifies the color of the surface. | ||
/// </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 WriteColorPropertyReference(string identifier, string[] propertyNames) | ||
{ | ||
using (var writer = OpenColorProperty()) | ||
{ | ||
writer.WriteReference(identifier, propertyNames); | ||
} | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
DotNet/CesiumLanguageWriterTests/TestBillboardCesiumWriter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using CesiumLanguageWriter; | ||
using CesiumLanguageWriter.Advanced; | ||
using NUnit.Framework; | ||
|
||
namespace CesiumLanguageWriterTests | ||
{ | ||
[TestFixture] | ||
public class TestBillboardCesiumWriter : TestCesiumPropertyWriter<BillboardCesiumWriter> | ||
{ | ||
protected override CesiumPropertyWriter<BillboardCesiumWriter> CreatePropertyWriter(string propertyName) | ||
{ | ||
return new BillboardCesiumWriter(propertyName); | ||
} | ||
} | ||
} |
Oops, something went wrong.