<commit_before>/*global define*/
define([
        '../ThirdParty/when',
        './BoundingSphere',
        './Cartesian3',
        './defaultValue',
        './defined',
        './defineProperties',
        './DeveloperError',
        './IndexDatatype',
        './Intersections2D',
        './Math',
        './OrientedBoundingBox',
        './TaskProcessor',
        './TerrainEncoding',
        './TerrainMesh'
    ], function(
        when,
        BoundingSphere,
        Cartesian3,
        defaultValue,
        defined,
        defineProperties,
        DeveloperError,
        IndexDatatype,
        Intersections2D,
        CesiumMath,
        OrientedBoundingBox,
        TaskProcessor,
        TerrainEncoding,
        TerrainMesh) {
    "use strict";

    /**
     * Terrain data for a single tile where the terrain data is represented as a quantized mesh.  A quantized
     * mesh consists of three vertex attributes, longitude, latitude, and height.  All attributes are expressed
     * as 16-bit values in the range 0 to 32767.  Longitude and latitude are zero at the southwest corner
     * of the tile and 32767 at the northeast corner.  Height is zero at the minimum height in the tile
     * and 32767 at the maximum height in the tile.
     *
     * @alias QuantizedMeshTerrainData
     * @constructor
     *
     * @param {Object} options Object with the following properties:
     * @param {Uint16Array} options.quantizedVertices The buffer containing the quantized mesh.
     * @param {Uint16Array|Uint32Array} options.indices The indices specifying how the quantized vertices are linked
     *                      together into triangles.  Each three indices specifies one triangle.
     * @param {Number} options.minimumHeight The minimum terrain height within the tile, in meters above the ellipsoid.
     * @param {Number} options.maximumHeight The maximum terrain height within the tile, in meters above the ellipsoid.
     * @param {BoundingSphere} options.boundingSphere A sphere bounding all of the vertices in the mesh.
     * @param {OrientedBoundingBox} [options.orientedBoundingBox] An OrientedBoundingBox bounding all of the vertices in the mesh.
     * @param {Cartesian3} options.horizonOcclusionPoint The horizon occlusion point of the mesh.  If this point
     *                      is below the horizon, the entire tile is assumed to be below the horizon as well.
     *                      The point is expressed in ellipsoid-scaled coordinates.
     * @param {Number[]} options.westIndices The indices of the vertices on the western edge of the tile.
     * @param {Number[]} options.southIndices The indices of the vertices on the southern edge of the tile.
     * @param {Number[]} options.eastIndices The indices of the vertices on the eastern edge of the tile.
     * @param {Number[]} options.northIndices The indices of the vertices on the northern edge of the tile.
     * @param {Number} options.westSkirtHeight The height of the skirt to add on the western edge of the tile.
     * @param {Number} options.southSkirtHeight The height of the skirt to add on the southern edge of the tile.
     * @param {Number} options.eastSkirtHeight The height of the skirt to add on the eastern edge of the tile.
     * @param {Number} options.northSkirtHeight The height of the skirt to add on the northern edge of the tile.
     * @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>Northwest</td></tr>
     *                  <tr><td>3</td><td>8</td><td>Northeast</td></tr>
     *                 </table>
     * @param {Boolean} [options.createdByUpsampling=false] True if this instance was created by upsampling another instance;
     *                  otherwise, false.
     * @param {Uint8Array} [options.encodedNormals] The buffer containing per vertex normals, encoded using 'oct' encoding
     * @param {Uint8Array} [options.waterMask] The buffer containing the watermask.
     *
     * @see TerrainData
     * @see HeightmapTerrainData
     *
     * @example
     * var data = new Cesium.QuantizedMeshTerrainData({
     *     minimumHeight : -100,
     *     maximumHeight : 2101,
     *     quantizedVertices : new Uint16Array([// order is SW NW SE NE
     *                                          // longitude
     *                                          0, 0, 32767, 32767,
     *                                          // latitude
     *                                          0, 32767, 0, 32767,
     *                                          // heights
     *                                          16384, 0, 32767, 16384]),
     *     indices : new Uint16Array([0, 3, 1,
     *                                0, 2, 3]),
     *     boundingSphere : new Cesium.BoundingSphere(new Cesium.Cartesian3(1.0, 2.0, 3.0), 10000),
     *     orientedBoundingBox : new Cesium.OrientedBoundingBox(new Cesium.Cartesian3(1.0, 2.0, 3.0), Cesium.Matrix3.fromRotationX(Cesium.Math.PI, new Cesium.Matrix3())),
     *     horizonOcclusionPoint : new Cesium.Cartesian3(3.0, 2.0, 1.0),
     *     westIndices : [0, 1],
     *     southIndices : [0, 1],
     *     eastIndices : [2, 3],
     *     northIndices : [1, 3],
     *     westSkirtHeight : 1.0,
     *     southSkirtHeight : 1.0,
     *     eastSkirtHeight : 1.0,
     *     northSkirtHeight : 1.0
     * });
     */
    function QuantizedMeshTerrainData(options) {
        //>>includeStart('debug', pragmas.debug)
        if (!defined(options) || !defined(options.quantizedVertices)) {
            throw new DeveloperError('options.quantizedVertices is required.');
        }
        if (!defined(options.indices)) {
            throw new DeveloperError('options.indices is required.');
        }
        if (!defined(options.minimumHeight)) {
            throw new DeveloperError('options.minimumHeight is required.');
        }
        if (!defined(options.maximumHeight)) {
            throw new DeveloperError('options.maximumHeight is required.');<commit_msg>Update QuantizedMeshTerrainData.js<commit_after>/*global define*/
define([
        '../ThirdParty/when',
        './BoundingSphere',
        './Cartesian3',
        './defaultValue',
        './defined',
        './defineProperties',
        './DeveloperError',
        './IndexDatatype',
        './Intersections2D',
        './Math',
        './OrientedBoundingBox',
        './TaskProcessor',
        './TerrainEncoding',
        './TerrainMesh'
    ], function(
        when,
        BoundingSphere,
        Cartesian3,
        defaultValue,
        defined,
        defineProperties,
        DeveloperError,
        IndexDatatype,
        Intersections2D,
        CesiumMath,
        OrientedBoundingBox,
        TaskProcessor,
        TerrainEncoding,
        TerrainMesh) {
    "use strict";

    /**
     * Terrain data for a single tile where the terrain data is represented as a quantized mesh.  A quantized
     * mesh consists of three vertex attributes, longitude, latitude, and height.  All attributes are expressed
     * as 16-bit values in the range 0 to 32767.  Longitude and latitude are zero at the southwest corner
     * of the tile and 32767 at the northeast corner.  Height is zero at the minimum height in the tile
     * and 32767 at the maximum height in the tile.
     *
     * @alias QuantizedMeshTerrainData
     * @constructor
     *
     * @param {Object} options Object with the following properties:
     * @param {Uint16Array} options.quantizedVertices The buffer containing the quantized mesh.
     * @param {Uint16Array|Uint32Array} options.indices The indices specifying how the quantized vertices are linked
     *                      together into triangles.  Each three indices specifies one triangle.
     * @param {Number} options.minimumHeight The minimum terrain height within the tile, in meters above the ellipsoid.
     * @param {Number} options.maximumHeight The maximum terrain height within the tile, in meters above the ellipsoid.
     * @param {BoundingSphere} options.boundingSphere A sphere bounding all of the vertices in the mesh.
     * @param {OrientedBoundingBox} [options.orientedBoundingBox] An OrientedBoundingBox bounding all of the vertices in the mesh.
     * @param {Cartesian3} options.horizonOcclusionPoint The horizon occlusion point of the mesh.  If this point
     *                      is below the horizon, the entire tile is assumed to be below the horizon as well.
     *                      The point is expressed in ellipsoid-scaled coordinates.
     * @param {Number[]} options.westIndices The indices of the vertices on the western edge of the tile.
     * @param {Number[]} options.southIndices The indices of the vertices on the southern edge of the tile.
     * @param {Number[]} options.eastIndices The indices of the vertices on the eastern edge of the tile.
     * @param {Number[]} options.northIndices The indices of the vertices on the northern edge of the tile.
     * @param {Number} options.westSkirtHeight The height of the skirt to add on the western edge of the tile.
     * @param {Number} options.southSkirtHeight The height of the skirt to add on the southern edge of the tile.
     * @param {Number} options.eastSkirtHeight The height of the skirt to add on the eastern edge of the tile.
     * @param {Number} options.northSkirtHeight The height of the skirt to add on the northern edge of the tile.
     * @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>Northwest</td></tr>
     *                  <tr><td>3</td><td>8</td><td>Northeast</td></tr>
     *                 </table>
     * @param {Boolean} [options.createdByUpsampling=false] True if this instance was created by upsampling another instance;
     *                  otherwise, false.
     * @param {Uint8Array} [options.encodedNormals] The buffer containing per vertex normals, encoded using 'oct' encoding
     * @param {Uint8Array} [options.waterMask] The buffer containing the watermask.
     *
     *
     * @example
     * var data = new Cesium.QuantizedMeshTerrainData({
     *     minimumHeight : -100,
     *     maximumHeight : 2101,
     *     quantizedVertices : new Uint16Array([// order is SW NW SE NE
     *                                          // longitude
     *                                          0, 0, 32767, 32767,
     *                                          // latitude
     *                                          0, 32767, 0, 32767,
     *                                          // heights
     *                                          16384, 0, 32767, 16384]),
     *     indices : new Uint16Array([0, 3, 1,
     *                                0, 2, 3]),
     *     boundingSphere : new Cesium.BoundingSphere(new Cesium.Cartesian3(1.0, 2.0, 3.0), 10000),
     *     orientedBoundingBox : new Cesium.OrientedBoundingBox(new Cesium.Cartesian3(1.0, 2.0, 3.0), Cesium.Matrix3.fromRotationX(Cesium.Math.PI, new Cesium.Matrix3())),
     *     horizonOcclusionPoint : new Cesium.Cartesian3(3.0, 2.0, 1.0),
     *     westIndices : [0, 1],
     *     southIndices : [0, 1],
     *     eastIndices : [2, 3],
     *     northIndices : [1, 3],
     *     westSkirtHeight : 1.0,
     *     southSkirtHeight : 1.0,
     *     eastSkirtHeight : 1.0,
     *     northSkirtHeight : 1.0
     * });
     * @see TerrainData
     * @see HeightmapTerrainData
     */
    function QuantizedMeshTerrainData(options) {
        //>>includeStart('debug', pragmas.debug)
        if (!defined(options) || !defined(options.quantizedVertices)) {
            throw new DeveloperError('options.quantizedVertices is required.');
        }
        if (!defined(options.indices)) {
            throw new DeveloperError('options.indices is required.');
        }
        if (!defined(options.minimumHeight)) {
            throw new DeveloperError('options.minimumHeight is required.');
        }
        if (!defined(options.maximumHeight)) {
            throw new DeveloperError('options.maximumHeight is required.');
{'fraction_non_alphanumeric': 0.09598499061913696, 'fraction_numerical': 0.021313320825515947, 'mean_word_length': 2.0825815405968076, 'pattern_counts': {'":': 0, '<': 87, '<?xml version=': 0, '>': 91, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 38, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5310603', 'n_tokens_mistral': 3786, 'n_tokens_neox': 3550, 'n_words': 1192}