CorridorGeometry

new Cesium.CorridorGeometry(options)

廊道的描述。廊道几何可以被PrimitiveGroundPrimitive渲染。
Name Type Description
options Object 对象,具有以下属性:
Name Type Default Description
positions Array.<Cartesian3> 定义廊道中心的一系列位置。
width Number 廊道边界之间的距离,以米为单位。
ellipsoid Ellipsoid Ellipsoid.WGS84 optional 用作参考的椭球体。
granularity Number CesiumMath.RADIANS_PER_DEGREE optional 每个经度和纬度之间的距离,以弧度表示。确定在缓冲区中的位置数。
height Number 0 optional 椭球面和廊道之间的距离,以米为单位。
extrudedHeight Number optional 椭球面与挤压面之间的距离,以米为单位。
vertexFormat VertexFormat VertexFormat.DEFAULT optional 要计算的顶点属性。
cornerType CornerType CornerType.ROUNDED optional 确定角的样式。
Example:
var 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

staticCesium.CorridorGeometry.computeRectangle(options, result)Rectangle

根据提供的选项计算包围矩形。
Name Type Description
options Object 对象,具有以下属性:
Name Type Default Description
positions Array.<Cartesian3> 定义廊道中心的一系列位置。
width Number 廊道边界之间的距离,以米为单位。
ellipsoid Ellipsoid Ellipsoid.WGS84 optional 用作参考的椭球体。
cornerType CornerType CornerType.ROUNDED optional 确定角的样式。
result Rectangle optional 存储结果的对象。
Returns:
结果矩形。

staticCesium.CorridorGeometry.createGeometry(corridorGeometry)Geometry|undefined

计算廊道的几何表示,包括其顶点、索引和边界球。
Name Type Description
corridorGeometry CorridorGeometry 廊道的描述。
Returns:
计算的顶点和索引。

staticCesium.CorridorGeometry.pack(value, array, startingIndex)Array.<Number>

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

staticCesium.CorridorGeometry.unpack(array, startingIndex, result)CorridorGeometry

从已包装的数组中检索实例。
Name Type Default Description
array Array.<Number> 包装的数组。
startingIndex Number 0 optional 要解包的元素的起始索引。
result CorridorGeometry optional 存储结果的对象。
Returns:
修改后的结果参数或新的CorridorGeometry实例(如果没有提供)。