{"action":"created","issue":{"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/2998","repository_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium","labels_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/2998/labels{/name}","comments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/2998/comments","events_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/2998/events","html_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/2998","id":104624472,"number":2998,"title":"Support for entities as reference frames","user":{"login":"speigg","id":507127,"avatar_url":"https://avatars.githubusercontent.com/u/507127?v=3","gravatar_id":"","url":"https://api.github.com/users/speigg","html_url":"https://github.com/speigg","followers_url":"https://api.github.com/users/speigg/followers","following_url":"https://api.github.com/users/speigg/following{/other_user}","gists_url":"https://api.github.com/users/speigg/gists{/gist_id}","starred_url":"https://api.github.com/users/speigg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/speigg/subscriptions","organizations_url":"https://api.github.com/users/speigg/orgs","repos_url":"https://api.github.com/users/speigg/repos","events_url":"https://api.github.com/users/speigg/events{/privacy}","received_events_url":"https://api.github.com/users/speigg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":23,"created_at":"2015-09-03T05:32:12Z","updated_at":"2017-01-04T15:11:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/2998","html_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/2998","diff_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/2998.diff","patch_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/2998.patch"},"body":"This PR is based on the `referenceFrames` branch, and adds support for constructing trees of entities by allowing entities to be used as reference frames themselves (see #1045). The root reference frame for any tree is either `FIXED`, `INERTIAL`, or an entity with an undefined position (an arbitrary frame). \n\nFor example: \n\n``` js\nvar e1 = new Entity();\ne1.position = new ConstantPositionProperty(new Cartesian3(100000, 200000, 300000)); // implicit FIXED frame\nvar orientation = new Quaternion(0, 0, 1, 1);\ne1.orientation = new ConstantProperty(Quaternion.normalize(orientation, orientation));\n\nvar e2 = new Entity();\ne2.position = new ConstantPositionProperty(new Cartesian3(200, 400, 600), e1); // note: e1 here\norientation = new Quaternion(1, 0, 0, 1);\ne2.orientation = new ConstantProperty(Quaternion.normalize(orientation, orientation));\n\nvar value = new Cartesian3(1, 2, 3);\nvar result = PositionProperty.convertToReferenceFrame(time, value, e2, ReferenceFrame.FIXED);\n\nexpect(result).toEqual(new Cartesian3(99603, 200201, 300602));\n\n// Can also pass an arbitrary Entity as the referenceFrame parameter in getValueInReferenceFrame().\n// The reference frame can be any Entity... if both entities are not connected, the result is undefined. \ne1.position.getValueInReferenceFrame(time, e2) \n```\n\n`PositionProperty.convertToReferenceFrame` has been rewritten to support converting positions between any two reference frames, including any two entities. Likewise, `OrientationProperty.convertToReferenceFrame` has been added to convert orientations between any two reference frames. \n\n`ReferenceEntity` class is added to support the '#id' notation for entities as reference frames in CzmlDataSource when the specified Entity does not yet exist in the EntityCollection (https://github.com/AnalyticalGraphicsInc/cesium/wiki/CZML-Content#position). \n\nSpecs have been added for `PositionProperty` and `OrientationProperty`. \nJSHint passes. \n\nSummary of Changes:\n- Modified CzmlDataSource to process ‘#id’\n- Added OrientationProperty (convertToReferenceFrame)\n- Modified PositionProperty (convertToReferenceFrame)\n- Added ReferenceEntity\n- Added OrientationPropertySpec\n- Fixed PositionPropertySpec tests in the `referenceFrames` branch\n- Added OrientationPropertySpec\n\nFeatures not included:\n- `getValueInReferenceFrame` does not yet exist for the `orientation` property on the `Entity` class (the more cumbersome `OrientationProperty.convertToReferenceFrame` has to be used to convert orientations between reference frames instead). I think this would require adding many new *OrientationProperty classes, the equivalent of all the *PositionProperty classes, unless we remove the existing *PositionProperty classes and just add `getValueInReferenceFrame` to the generic *Property classes.\n- The ability to specify a reference frame for an orientation other than the reference frame specified by the position property. \n"},"comment":{"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/comments/270393642","html_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/2998#issuecomment-270393642","issue_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/2998","id":270393642,"user":{"login":"shunter","id":32828,"avatar_url":"https://avatars.githubusercontent.com/u/32828?v=3","gravatar_id":"","url":"https://api.github.com/users/shunter","html_url":"https://github.com/shunter","followers_url":"https://api.github.com/users/shunter/followers","following_url":"https://api.github.com/users/shunter/following{/other_user}","gists_url":"https://api.github.com/users/shunter/gists{/gist_id}","starred_url":"https://api.github.com/users/shunter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shunter/subscriptions","organizations_url":"https://api.github.com/users/shunter/orgs","repos_url":"https://api.github.com/users/shunter/repos","events_url":"https://api.github.com/users/shunter/events{/privacy}","received_events_url":"https://api.github.com/users/shunter/received_events","type":"User","site_admin":false},"created_at":"2017-01-04T15:11:33Z","updated_at":"2017-01-04T15:11:33Z","body":"@pjcozzi This would still be a good addition, but as I mentioned earlier, it needs a rethink from a performance perspective.  I don't know when I'll have time to look at this myself."}}
{"actor":{"display_login":"shunter"}}