All files / engine/Source/Scene/Model/Extensions/Gpm AnchorPointDirect.js

100% Statements 7/7
100% Branches 0/0
100% Functions 3/3
100% Lines 7/7

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62                                              1x 1x     1x 1x     1x                   1x                           1x            
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.
 */
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
   *
   * @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
   * point.
   *
   * @memberof AnchorPointDirect.prototype
   * @type {Cartesian3}
   * @readonly
   */
  adjustmentParams: {
    get: function () {
      return this._adjustmentParams;
    },
  },
});
 
export default AnchorPointDirect;