Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CZML and Entity articulations API #7907

Merged
merged 6 commits into from
Jun 11, 2019
Merged

CZML and Entity articulations API #7907

merged 6 commits into from
Jun 11, 2019

Conversation

emackey
Copy link
Contributor

@emackey emackey commented Jun 5, 2019

Support for articulations was added at the graphics primitive level in the 1.58 release (in #7835).

This PR adds support at the entity and CZML layers. The implementation is very similar to how the existing nodeTransformations work at those layers.

@cesium-concierge
Copy link

Thanks for the pull request @emackey!

  • ✔️ Signed CLA found.
  • CHANGES.md was not updated.
    • If this change updates the public API in any way, please add a bullet point to CHANGES.md.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.
  • Works (or fails gracefully) in IE11.

@emackey
Copy link
Contributor Author

emackey commented Jun 5, 2019

Some sample articulations CZML is used in the new Sandcastle Demo.

    "model": {
        "gltf" : "https://assets.agi.com/models/launchvehicle.glb",
        "scale" : 2.0,
        "minimumPixelSize" : 128,
        "runAnimations" : false,
        "articulations" : {
            "Fairing Open" : {
                "epoch" : "2019-06-01T16:00:00Z",
                "number" : [
                    0, 0,
                    600, 120
                ]
            },
            "Fairing Separate" : {
                "epoch" : "2019-06-01T16:00:00Z",
                "number" : [
                    0, 0,
                    400, -50
                ]
            },
            "Fairing Drop" : {
                "epoch" : "2019-06-01T16:00:00Z",
                "interpolationAlgorithm" : "LAGRANGE",
                "interpolationDegree" : 2,
                "number" : [
                    0, 0,
                    80, 0,
                    100, 0,
                    120, -1,
                    600, -120
                ]
            }
        }
    }

@emackey emackey requested a review from shunter June 5, 2019 16:14
@emackey
Copy link
Contributor Author

emackey commented Jun 5, 2019

Apparently Travis never got the message to GitHub about completion of the most recent build.

@shunter
Copy link
Contributor

shunter commented Jun 5, 2019

Could use some tests in CzmlDataSourceSpec (patterned off the tests for nodeTransformations) Otherwise this all looks good. I'll double check that this syntax works out for czml-writer.

@shunter
Copy link
Contributor

shunter commented Jun 5, 2019

I was able to get the writer working with a value directly under a property bag rather than the nodeTransformations which had an extra level.

Syntax in C# looks like:

using (var articulationsWriter = modelWriter.OpenArticulationsProperty())
using (var articulationWriter = articulationsWriter.OpenArticulationProperty("articulation1 stage1"))
{
	articulationWriter.WriteNumber(3.5);
}

So this all should work out.

@emackey
Copy link
Contributor Author

emackey commented Jun 11, 2019

@shunter I added some tests to CzmlDataSourceSpec. I didn't attempt to regenerate the CZML ValidationDocument, can you do that?

@shunter
Copy link
Contributor

shunter commented Jun 11, 2019

Yeah I can update the validation document separately. My local czml-writer changes are dependent on the changes made for #7899 so once that's merged I can add articulations on top of that.

@shunter shunter merged commit 4d86826 into master Jun 11, 2019
@shunter shunter deleted the entity-articulations branch June 11, 2019 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants