-
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 #164 from AnalyticalGraphicsInc/checkerboardMaterial
Add checkerboard material.
- Loading branch information
Showing
16 changed files
with
16,972 additions
and
1,799 deletions.
There are no files selected for viewing
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
543 changes: 543 additions & 0 deletions
543
DotNet/CesiumLanguageWriter/Generated/CheckerboardMaterialCesiumWriter.cs
Large diffs are not rendered by default.
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
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
32 changes: 32 additions & 0 deletions
32
DotNet/CesiumLanguageWriterTests/TestCheckerboardMaterialCesiumWriter.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,32 @@ | ||
using System.Drawing; | ||
using CesiumLanguageWriter; | ||
using CesiumLanguageWriter.Advanced; | ||
using NUnit.Framework; | ||
|
||
namespace CesiumLanguageWriterTests | ||
{ | ||
[TestFixture] | ||
public class TestCheckerboardMaterialCesiumWriter : TestCesiumPropertyWriter<CheckerboardMaterialCesiumWriter> | ||
{ | ||
[Test] | ||
public void TestWriteCheckerboardMaterial() | ||
{ | ||
using (Packet) | ||
using (var polyline = Packet.OpenPolylineProperty()) | ||
using (var material = polyline.OpenMaterialProperty()) | ||
using (var checkerboardMaterial = material.OpenCheckerboardProperty()) | ||
{ | ||
checkerboardMaterial.WriteEvenColorProperty(Color.Red); | ||
checkerboardMaterial.WriteOddColorProperty(Color.Blue); | ||
checkerboardMaterial.WriteRepeatProperty(3.5, 4.5); | ||
} | ||
|
||
Assert.AreEqual("{\"polyline\":{\"material\":{\"checkerboard\":{\"evenColor\":{\"rgba\":[255,0,0,255]},\"oddColor\":{\"rgba\":[0,0,255,255]},\"repeat\":{\"cartesian2\":[3.5,4.5]}}}}}", StringWriter.ToString()); | ||
} | ||
|
||
protected override CesiumPropertyWriter<CheckerboardMaterialCesiumWriter> CreatePropertyWriter(string propertyName) | ||
{ | ||
return new CheckerboardMaterialCesiumWriter(propertyName); | ||
} | ||
} | ||
} |
Oops, something went wrong.