new Cesium.PolylineVolumeOutlineGeometry(options)

说明带有体积的多线(沿着多线挤压的2D形状).
Name Type Description
options object 下列属性的对象 :
Name Type Default Description
polylinePositions Array.<Cartesian3> 定义多线体积中心的一系列位置.
shapePositions Array.<Cartesian2> 确定沿多线延伸形状的一系列位置
ellipsoid Ellipsoid Ellipsoid.default optional The ellipsoid to be used as a reference.
granularity number CesiumMath.RADIANS_PER_DEGREE optional The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
cornerType CornerType CornerType.ROUNDED optional Determines the style of the corners.
Example:
function computeCircle(radius) {
  const positions = [];
  for (let i = 0; i < 360; i++) {
    const radians = Cesium.Math.toRadians(i);
    positions.push(new Cesium.Cartesian2(radius * Math.cos(radians), radius * Math.sin(radians)));
  }
  return positions;
}

const volumeOutline = new Cesium.PolylineVolumeOutlineGeometry({
  polylinePositions : Cesium.Cartesian3.fromDegreesArray([
    -72.0, 40.0,
    -70.0, 35.0
  ]),
  shapePositions : computeCircle(100000.0)
});
See:
  • PolylineVolumeOutlineGeometry#createGeometry

Members

packedLength : number

用于将对象组合成数组的元素数量.

Methods

static Cesium.PolylineVolumeOutlineGeometry.createGeometry(polylineVolumeOutlineGeometry)Geometry|undefined

计算带有卷的多线的轮廓的几何表示,包括它的顶点,指数,和边框.
Name Type Description
polylineVolumeOutlineGeometry PolylineVolumeOutlineGeometry 多线体积纲要说明.
Returns:
计算出的顶点和指数.

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

将所提供的实例存储到所提供的数组中.
Name Type Default Description
value PolylineVolumeOutlineGeometry 包装的价值.
array Array.<number> 装入的阵列.
startingIndex number 0 optional The index into the array at which to start packing the elements.
Returns:
装入的阵列

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

从组合的数组中获取实例 .
Name Type Default Description
array Array.<number> 装填的阵列.
startingIndex number 0 optional The starting index of the element to be unpacked.
result PolylineVolumeOutlineGeometry optional 存储结果的对象.
Returns:
未提供修改的结果参数或新的PolylineVolumeOutlineGeometry实例.
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.