RectangleOutlineGeometry

new Cesium.RectangleOutlineGeometry(options)

描述位于原点的椭球体上一个制图矩形的轮廓。
Name Type Description
options object 具有以下属性的对象:
Name Type Default Description
rectangle Rectangle 具有北、南、东和西属性(以弧度为单位)的制图矩形。
ellipsoid Ellipsoid Ellipsoid.default optional 矩形所在的椭球体。
granularity number CesiumMath.RADIANS_PER_DEGREE optional 每个纬度和经度之间的距离(以弧度为单位)。决定缓冲区中的位置数量。
height number 0.0 optional 矩形与椭球体表面之间的距离(以米为单位)。
rotation number 0.0 optional 矩形的旋转角度(以弧度为单位)。正旋转为逆时针方向。
extrudedHeight number optional 矩形拉伸面与椭球体表面之间的距离(以米为单位)。
Throws:
  • DeveloperError : options.rectangle.north 必须在区间 [-Pi/2, Pi/2] 内。
  • DeveloperError : options.rectangle.south 必须在区间 [-Pi/2, Pi/2] 内。
  • DeveloperError : options.rectangle.east 必须在区间 [-Pi, Pi] 内。
  • DeveloperError : options.rectangle.west 必须在区间 [-Pi, Pi] 内。
  • DeveloperError : options.rectangle.north 必须大于 rectangle.south
Example:
const rectangle = new Cesium.RectangleOutlineGeometry({
  ellipsoid : Cesium.Ellipsoid.WGS84,
  rectangle : Cesium.Rectangle.fromDegrees(-80.0, 39.0, -74.0, 42.0),
  height : 10000.0
});
const geometry = Cesium.RectangleOutlineGeometry.createGeometry(rectangle);
See:
  • RectangleOutlineGeometry#createGeometry

Members

static Cesium.RectangleOutlineGeometry.packedLength : number

用于将对象打包到数组中的元素数量。

Methods

static Cesium.RectangleOutlineGeometry.createGeometry(rectangleGeometry)Geometry|undefined

计算矩形轮廓的几何表示,包括其顶点、索引和包围球。
Name Type Description
rectangleGeometry RectangleOutlineGeometry 矩形轮廓的描述。
Returns:
计算得到的顶点和索引。
Throws:

static Cesium.RectangleOutlineGeometry.pack(value, array, startingIndex)Array.<number>

将提供的实例存储到提供的数组中.
Name Type Default Description
value RectangleOutlineGeometry 要打包的值.
array Array.<number> 要打包到的数组.
startingIndex number 0 optional 开始打包元素的数组索引.
Returns:
被打包成的数组

static Cesium.RectangleOutlineGeometry.unpack(array, startingIndex, result)RectangleOutlineGeometry

从打包数组中检索实例。
Name Type Default Description
array Array.<number> 压缩数组。
startingIndex number 0 optional 需要解包的元素的起始索引。
result RectangleOutlineGeometry optional 存储结果的对象。
Returns:
修改后的结果参数,如果未提供,则返回一个新实例。
需要帮助?获得答案的最快方法是来自社区和团队 Cesium Forum.