-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
GPM 1.2 support #12204
GPM 1.2 support #12204
Changes from all commits
eb4ec20
d7f1c91
e09cb04
7e14791
6ee7344
c2a064c
50b0727
cac091f
1cc38fa
4e6d501
9e7bfcf
5110166
323f4f0
6326d40
eaf6112
9dbd45e
6e290c8
6e41b36
616171f
810684b
c6d9784
d341dc5
8c0f926
5723c8b
bb74ec4
962a986
804fa0a
905925a
e887e53
13b2db0
ac78182
e61667c
e94ca56
72414c5
55df6c9
b8b5445
e4efa51
860b05b
8eebc95
9bfe61a
9805652
c910090
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import Check from "../../../../Core/Check.js"; | ||
|
||
/** | ||
* @typedef {object} AnchorPointDirect.ConstructorOptions | ||
* | ||
* Initialization options for the AnchorPointDirect constructor | ||
* | ||
* @property {Cartesian3} position Anchor point geographic coordinates | ||
* @property {Cartesian3} adjustmentParams The adjustment values in meters | ||
*/ | ||
|
||
/** | ||
* Metadata for one stored anchor point using direct storage. | ||
* | ||
* This reflects the `anchronPointDirect` definition of the | ||
* {@link https://nsgreg.nga.mil/csmwg.jsp|NGA_gpm_local} glTF extension. | ||
* | ||
* @constructor | ||
* @param {AnchorPointDirect.ConstructorOptions} options An object describing initialization options | ||
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy. | ||
ggetz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
*/ | ||
function AnchorPointDirect(options) { | ||
//>>includeStart('debug', pragmas.debug); | ||
Check.typeOf.object("options.position", options.position); | ||
Check.typeOf.object("options.adjustmentParams", options.adjustmentParams); | ||
//>>includeEnd('debug'); | ||
|
||
this._position = options.position; | ||
this._adjustmentParams = options.adjustmentParams; | ||
} | ||
|
||
Object.defineProperties(AnchorPointDirect.prototype, { | ||
/** | ||
* Anchor point geographic coordinates in meters as X/Easting, Y/Northing, Z/HAE | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. HAE -> "Height above ellipsoid" Correct? Would you mind using the full string? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These strings are taken from the JSON schema descriptions. I did not modify them (except for minor things like "this is a 3-element array" -> "this is a vector/point" or such). |
||
* | ||
* @memberof AnchorPointDirect.prototype | ||
* @type {Cartesian3} | ||
* @readonly | ||
*/ | ||
position: { | ||
get: function () { | ||
return this._position; | ||
}, | ||
}, | ||
|
||
/** | ||
* The delta-x delta-y delta-z adjustment values in meters per anchor | ||
ggetz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* point. | ||
* | ||
* @memberof AnchorPointDirect.prototype | ||
* @type {Cartesian3} | ||
* @readonly | ||
*/ | ||
adjustmentParams: { | ||
get: function () { | ||
return this._adjustmentParams; | ||
}, | ||
}, | ||
}); | ||
|
||
export default AnchorPointDirect; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
import Check from "../../../../Core/Check.js"; | ||
|
||
/** | ||
* @typedef {object} AnchorPointIndirect.ConstructorOptions | ||
* | ||
* Initialization options for the AnchorPointIndirect constructor | ||
* | ||
* @property {Cartesian3} position Anchor point geographic coordinates | ||
* @property {Cartesian3} adjustmentParams The adjustment values in meters | ||
* @property {Matrix3} covarianceMatrix The 3x3 covariance matrix | ||
*/ | ||
|
||
/** | ||
* Metadata for one stored anchor point. | ||
* | ||
* This reflects the `anchronPointIndirect` definition of the | ||
* {@link https://nsgreg.nga.mil/csmwg.jsp|NGA_gpm_local} glTF extension. | ||
* | ||
* @constructor | ||
* @param {AnchorPointIndirect.ConstructorOptions} options An object describing initialization options | ||
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy. | ||
*/ | ||
function AnchorPointIndirect(options) { | ||
//>>includeStart('debug', pragmas.debug); | ||
Check.typeOf.object("options.position", options.position); | ||
Check.typeOf.object("options.adjustmentParams", options.adjustmentParams); | ||
Check.typeOf.object("options.covarianceMatrix", options.covarianceMatrix); | ||
//>>includeEnd('debug'); | ||
|
||
this._position = options.position; | ||
this._adjustmentParams = options.adjustmentParams; | ||
this._covarianceMatrix = options.covarianceMatrix; | ||
} | ||
|
||
Object.defineProperties(AnchorPointIndirect.prototype, { | ||
/** | ||
* Anchor point geographic coordinates in meters as X/Easting, Y/Northing, Z/HAE | ||
ggetz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* | ||
* @memberof AnchorPointIndirect.prototype | ||
* @type {Cartesian3} | ||
* @readonly | ||
*/ | ||
position: { | ||
get: function () { | ||
return this._position; | ||
}, | ||
}, | ||
|
||
/** | ||
* The delta-x delta-y delta-z adjustment values in meters per anchor | ||
* point. | ||
* | ||
* @memberof AnchorPointIndirect.prototype | ||
* @type {Cartesian3} | ||
* @readonly | ||
*/ | ||
adjustmentParams: { | ||
get: function () { | ||
return this._adjustmentParams; | ||
}, | ||
}, | ||
|
||
/** | ||
* The 3x3 covariance matrix. | ||
* | ||
* @memberof AnchorPointIndirect.prototype | ||
* @type {Matrix3} | ||
* @readonly | ||
*/ | ||
covarianceMatrix: { | ||
get: function () { | ||
return this._covarianceMatrix; | ||
}, | ||
}, | ||
}); | ||
|
||
export default AnchorPointIndirect; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
import Check from "../../../../Core/Check.js"; | ||
|
||
/** | ||
* @typedef {object} CorrelationGroup.ConstructorOptions | ||
* | ||
* Initialization options for the CorrelationGroup constructor | ||
* | ||
* @property {boolean[]} groupFlags Array of 3 booleans indicating if | ||
* parameters delta-x delta-y delta-z used in the correlation group | ||
* @property {Cartesian3} rotationThetas Rotations in milliradians | ||
* about X, Y, Z axes, respectively | ||
* @property {Spdcf[]} params Array of `Spdcf` (Strictly Positive-Definite | ||
* Correlation Function) parameters, for the U, V, W directions, respectively | ||
*/ | ||
|
||
/** | ||
* Metadata identifying parameters using same correlation modeling and | ||
* associated correlation parameters. | ||
* | ||
* This reflects the `correlationGroup` definition of the | ||
* {@link https://nsgreg.nga.mil/csmwg.jsp|NGA_gpm_local} glTF extension. | ||
* | ||
* @constructor | ||
* @param {CorrelationGroup.ConstructorOptions} options An object describing initialization options | ||
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy. | ||
*/ | ||
function CorrelationGroup(options) { | ||
//>>includeStart('debug', pragmas.debug); | ||
Check.typeOf.object("options.groupFlags", options.groupFlags); | ||
Check.typeOf.object("options.rotationThetas", options.rotationThetas); | ||
Check.typeOf.object("options.params", options.params); | ||
//>>includeEnd('debug'); | ||
|
||
this._groupFlags = options.groupFlags; | ||
this._rotationThetas = options.rotationThetas; | ||
this._params = options.params; | ||
} | ||
|
||
Object.defineProperties(CorrelationGroup.prototype, { | ||
/** | ||
* Array of 3 booleans indicating if parameters delta-x delta-y delta-z | ||
* used in the correlation group | ||
* | ||
* @memberof CorrelationGroup.prototype | ||
* @type {boolean[]} | ||
* @readonly | ||
*/ | ||
groupFlags: { | ||
get: function () { | ||
return this._groupFlags; | ||
}, | ||
}, | ||
|
||
/** | ||
* Rotations in milliradians about X, Y, Z axes, respectively | ||
ggetz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* | ||
* @memberof CorrelationGroup.prototype | ||
* @type {Cartesian3} | ||
* @readonly | ||
*/ | ||
rotationThetas: { | ||
get: function () { | ||
return this._rotationThetas; | ||
}, | ||
}, | ||
|
||
/** | ||
* Array of 3 sets of SPDCF parameters, for the U, V, W directions, respectively | ||
* | ||
* @memberof CorrelationGroup.prototype | ||
* @type {Spdcf[]} | ||
* @readonly | ||
*/ | ||
params: { | ||
get: function () { | ||
return this._params; | ||
}, | ||
}, | ||
}); | ||
|
||
export default CorrelationGroup; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be a possibility to merge these together rather than replacing existing structural metadata with that from the GPM extension? This could be for this PR or for the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The option of merging metadata (and their schemas) was considered, but cannot be addressed here. There are many caveats. An obvious one:
EXT_structural_metadata
, with a schema that has theid : "MY_EXAMPLE_SCHEMA"
NGA_gpm_local
. Metadata classes will be created for the PPE textures, and added to the schema.id : "MY_EXAMPLE_SCHEMA"
?id: "MY_EXAMPLE_SCHEMA"
suddenly disappears?)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@javagl Does it make sense to document this limitation in an issue and add discussion there about potential solutions?