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:
修改后的 result 参数,如果未提供,则为新的 RectangleOutlineGeometry 实例。
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.