Source/Core/GoogleEarthEnterpriseTerrainData.js
/**
 * Terrain data for a single tile from a Google Earth Enterprise server.
 *
 * @alias GoogleEarthEnterpriseTerrainData
 * @constructor
 *
 * @param {Object} options Object with the following properties:
 * @param {ArrayBuffer} options.buffer The buffer containing terrain data.
 * @param {Number} options.negativeAltitudeExponentBias Multiplier for negative terrain heights that are encoded as very small positive values.
 * @param {Number} options.negativeElevationThreshold Threshold for negative values
 * @param {Number} [options.childTileMask=15] A bit mask indicating which of this tile's four children exist.
 *                 If a child's bit is set, geometry will be requested for that tile as well when it
 *                 is needed.  If the bit is cleared, the child tile is not requested and geometry is
 *                 instead upsampled from the parent.  The bit values are as follows:
 *                 <table>
 *                  <tr><th>Bit Position</th><th>Bit Value</th><th>Child Tile</th></tr>
 *                  <tr><td>0</td><td>1</td><td>Southwest</td></tr>
 *                  <tr><td>1</td><td>2</td><td>Southeast</td></tr>
 *                  <tr><td>2</td><td>4</td><td>Northeast</td></tr>
 *                  <tr><td>3</td><td>8</td><td>Northwest</td></tr>
 *                 </table>
 * @param {Boolean} [options.createdByUpsampling=false] True if this instance was created by upsampling another instance;
 *                  otherwise, false.
 * @param {Credit[]} [options.credits] Array of credits for this tile.
 *
 *
 * @example
 * var buffer = ...
 * var childTileMask = ...
 * var terrainData = new Cesium.GoogleEarthEnterpriseTerrainData({
 *   buffer : heightBuffer,
 *   childTileMask : childTileMask
 * });
 *
 * @see TerrainData
 * @see HeightmapTerrainData
 * @see QuantizedMeshTerrainData
 */
Terrain data for a single tile from a Google Earth Enterprise server.

@param {Object} options Object with the following properties:
@param {ArrayBuffer} options.buffer The buffer containing terrain data.
@param {Number} options.negativeAltitudeExponentBias Multiplier for negative terrain heights that are encoded as very small positive values.
@param {Number} options.negativeElevationThreshold Threshold for negative values
@param {Number} [options.childTileMask=15] A bit mask indicating which of this tile's four children exist.
If a child's bit is set, geometry will be requested for that tile as well when it
is needed.  If the bit is cleared, the child tile is not requested and geometry is
instead upsampled from the parent.  The bit values are as follows:

Bit PositionBit ValueChild Tile
01Southwest
12Southeast
24Northeast
38Northwest

@param {Boolean} [options.createdByUpsampling=false] True if this instance was created by upsampling another instance;
otherwise, false.
@param {Credit[]} [options.credits] Array of credits for this tile.

@example
var buffer =
var childTileMask =
var terrainData = new Cesium.GoogleEarthEnterpriseTerrainData({
buffer : heightBuffer,
childTileMask : childTileMask
}).


Terrain data for a single tile from a Google Earth Enterprise server . @param { Object } options Object with the following properties : @param { ArrayBuffer } options . buffer The buffer containing terrain data . @param { Number } options . negativeAltitudeExponentBias Multiplier for negative terrain heights that are encoded as very small positive values . @param { Number } options . negativeElevationThreshold Threshold for negative values @param { Number } [ options . childTileMask = 15 ] A bit mask indicating which of this tile ' s four children exist . If a child ' s bit is set geometry will be requested for that tile as well when it is needed . If the bit is cleared the child tile is not requested and geometry is instead upsampled from the parent . The bit values are as follows : Bit PositionBit ValueChild Tile 01Southwest 12Southeast 24Northeast 38Northwest @param { Boolean } [ options . createdByUpsampling = false ] True if this instance was created by upsampling another instance ; otherwise false . @param { Credit [] } [ options . credits ] Array of credits for this tile . @example var buffer = var childTileMask = var terrainData = new Cesium . GoogleEarthEnterpriseTerrainData ( { buffer : heightBuffer childTileMask : childTileMask } ) .
function GoogleEarthEnterpriseTerrainData(options) {
  options = defaultValue(options, defaultValue.EMPTY_OBJECT);
  Check.typeOf.object("options.buffer", options.buffer);
  Check.typeOf.number(
    "options.negativeAltitudeExponentBias",
    options.negativeAltitudeExponentBias
  );
  Check.typeOf.number(
    "options.negativeElevationThreshold",
    options.negativeElevationThreshold
  );
  this._buffer = options.buffer;
  this._credits = options.credits;
  this._negativeAltitudeExponentBias = options.negativeAltitudeExponentBias;
  this._negativeElevationThreshold = options.negativeElevationThreshold;
  var googleChildTileMask = defaultValue(options.childTileMask, 15);
  var childTileMask = googleChildTileMask & 3; 
  childTileMask |= googleChildTileMask & 4 ? 8 : 0; 
  childTileMask |= googleChildTileMask & 8 ? 4 : 0; 
  this._childTileMask = childTileMask;
  this._createdByUpsampling = defaultValue(options.createdByUpsampling, false);
  this._skirtHeight = undefined;
  this._bufferType = this._buffer.constructor;
  this._mesh = undefined;
  this._minimumHeight = undefined;
  this._maximumHeight = undefined;
}
function GoogleEarthEnterpriseTerrainData ( options ) { options = defaultValue ( options , defaultValue . EMPTY_OBJECT ) ; Check . typeOf . object ( "options.buffer" , options . buffer ) ; Check . typeOf . number ( "options.negativeAltitudeExponentBias" , options . negativeAltitudeExponentBias ) ; Check . typeOf . number ( "options.negativeElevationThreshold" , options . negativeElevationThreshold ) ; this . _buffer = options . buffer ; this . _credits = options . credits ; this . _negativeAltitudeExponentBias = options . negativeAltitudeExponentBias ; this . _negativeElevationThreshold = options . negativeElevationThreshold ; var googleChildTileMask = defaultValue ( options . childTileMask , 15 ) ; var childTileMask = googleChildTileMask & 3 ; childTileMask |= googleChildTileMask & 4 ? 8 : 0 ; childTileMask |= googleChildTileMask & 8 ? 4 : 0 ; this . _childTileMask = childTileMask ; this . _createdByUpsampling = defaultValue ( options . createdByUpsampling , false ) ; this . _skirtHeight = undefined ; this . _bufferType = this . _buffer . constructor ; this . _mesh = undefined ; this . _minimumHeight = undefined ; this . _maximumHeight = undefined ; }
Terrain data for a single tile from a Google Earth Enterprise server.
Terrain data for a single tile from a Google Earth Enterprise server .
//>>includeStart('debug', pragmas.debug); //>>includeEnd('debug'); // Convert from google layout to layout of other providers // 3 2 -> 2 3 // 0 1 -> 0 1 // Bottom row is identical // NE // NW