new Cesium.CorridorGeometry(options)

A description of a corridor. Corridor geometry can be rendered with both Primitive and GroundPrimitive.
Name Type Description
options object 下列属性的对象 :
Name Type Default Description
positions Array.<Cartesian3> 一系列确定走廊中心的位置.
width number 走廊边缘之间的距离以米计.
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.
height number 0 optional The distance in meters between the ellipsoid surface and the positions.
extrudedHeight number optional 椭圆形表面与外凸面之间以米计的距离.
vertexFormat VertexFormat VertexFormat.DEFAULT optional The vertex attributes to be computed.
cornerType CornerType CornerType.ROUNDED optional Determines the style of the corners.
Example:
const corridor = new Cesium.CorridorGeometry({
  vertexFormat : Cesium.VertexFormat.POSITION_ONLY,
  positions : Cesium.Cartesian3.fromDegreesArray([-72.0, 40.0, -70.0, 35.0]),
  width : 100000
});
Demo:
See:

Members

packedLength : number

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

Methods

static Cesium.CorridorGeometry.computeRectangle(options, result)Rectangle

根据提供的选项计算边框矩形
Name Type Description
options object 下列属性的对象 :
Name Type Default Description
positions Array.<Cartesian3> 一系列确定走廊中心的位置.
width number 走廊边缘之间的距离以米计.
ellipsoid Ellipsoid Ellipsoid.default optional The ellipsoid to be used as a reference.
cornerType CornerType CornerType.ROUNDED optional Determines the style of the corners.
result Rectangle optional 存储结果的对象 .
Returns:
结果矩形.

static Cesium.CorridorGeometry.createGeometry(corridorGeometry)Geometry|undefined

计算一个走廊的几何代表,包括其顶点、指数和边框.
Name Type Description
corridorGeometry CorridorGeometry 走廊简介.
Returns:
计算出的顶点和指数.

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

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

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

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