1 line
32 KiB
Plaintext
1 line
32 KiB
Plaintext
|
{"version":3,"file":"EllipsoidOutlineGeometry-b79bb09f.js","sources":["../../../../Source/Core/EllipsoidOutlineGeometry.js"],"sourcesContent":["import arrayFill from \"./arrayFill.js\";\nimport BoundingSphere from \"./BoundingSphere.js\";\nimport Cartesian3 from \"./Cartesian3.js\";\nimport ComponentDatatype from \"./ComponentDatatype.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\nimport Ellipsoid from \"./Ellipsoid.js\";\nimport Geometry from \"./Geometry.js\";\nimport GeometryAttribute from \"./GeometryAttribute.js\";\nimport GeometryAttributes from \"./GeometryAttributes.js\";\nimport GeometryOffsetAttribute from \"./GeometryOffsetAttribute.js\";\nimport IndexDatatype from \"./IndexDatatype.js\";\nimport CesiumMath from \"./Math.js\";\nimport PrimitiveType from \"./PrimitiveType.js\";\n\nconst defaultRadii = new Cartesian3(1.0, 1.0, 1.0);\nconst cos = Math.cos;\nconst sin = Math.sin;\n\n/**\n * A description of the outline of an ellipsoid centered at the origin.\n *\n * @alias EllipsoidOutlineGeometry\n * @constructor\n *\n * @param {Object} [options] Object with the following properties:\n * @param {Cartesian3} [options.radii=Cartesian3(1.0, 1.0, 1.0)] The radii of the ellipsoid in the x, y, and z directions.\n * @param {Cartesian3} [options.innerRadii=options.radii] The inner radii of the ellipsoid in the x, y, and z directions.\n * @param {Number} [options.minimumClock=0.0] The minimum angle lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.\n * @param {Number} [options.maximumClock=2*PI] The maximum angle lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.\n * @param {Number} [options.minimumCone=0.0] The minimum angle measured from the positive z-axis and toward the negative z-axis.\n * @param {Number} [options.maximumCone=PI] The maximum angle measured from the positive z-axis and toward the negative z-axis.\n * @param {Number} [options.stackPartitions=10] The count of stacks for the ellipsoid (1 greater than the number of parallel lines).\n * @param {Number} [options.slicePartitions=8] The count of slices for the ellipsoid (Equal to the number of radial lines).\n * @param {Number} [options.subdivisions=128] The number of points per line, determining the granularity of the curvature.\n *\n * @exception {DeveloperError} options.stackPartitions must be greater than or equal to one.\n * @exception {DeveloperError} options.slicePartitions must be greater than or equal to zero.\n * @exception {DeveloperError} options.subdivisions must be greater than or equal to zero.\n *\n * @example\n * const ellipsoid = new Cesium.EllipsoidOutlineGeometry({\n * radii : new Cesium.Cartesian3(1000000.0, 500000.0, 500000.0),\n * stackPartitions: 6,\n * slicePartitions: 5\n * });\n * const geometry = Cesium.EllipsoidOutlineGeometry.createGeometry(ellipsoid);\n */\nfunction EllipsoidOutlineGeometry(options) {\n options = defaultValue(options, defaultValue.EMPTY_OBJECT);\n\n const radii = defaultValue(options.radii, defaultRadii);\n const innerRadii = defaultValue(options.innerRadii, radii);\n const minimumClock = defaultValue(options.minimumClock, 0.0);\n const maximumClock = defaultValue(options.maximumClock, CesiumMath.TWO_PI);\n const minimumCone = defaultValue(options.minimumCone, 0.0);\n const maximumCone = defaultValue(options.maximumCone, CesiumMath.PI);\n const stackPartitions = Math.round(defaultValue(options.stackPartitions, 10));\n const slicePartitions = Math.round(defaultValue(options.slicePartitions, 8));\n const subdivisions = Math.round(defaultValue(options.subdivisions, 128));\n\n //>>includeStart('debug', pragmas.debug);\n if (stackPartitions < 1) {\n throw new DeveloperError(\"options.stackPartitions cannot be less than 1\");\n }\n if (slicePartitions < 0) {\n throw new DeveloperError(\"options.slicePartitions cannot be less than 0\");\n }\n if (subdivisions < 0) {\n throw new DeveloperError(\n \"options.subdi
|