描述走廊,它是由符合地球曲率的中心线和宽度定义的形状。它可以放置在表面或高空,并且可以选择挤压成一定体积。 Describes a corridor, which is a shape defined by a centerline and width that conforms to the curvature of the globe. It can be placed on the surface or at altitude and can optionally be extruded into a volume.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
options |
CorridorGraphics.ConstructorOptions | 可选 optional 描述初始化选项的对象 Object describing initialization options |
演示: Demo:
另见: See:
成员 Members
classificationType : Property|undefined
获取或设置 Gets or sets the
ClassificationType 指定此走廊在地面上时是否对地形、3D Tiles或两者进行分类的属性。 Property specifying whether this corridor will classify terrain, 3D Tiles, or both when on the ground.
-
默认值: Default Value:
ClassificationType.BOTH
cornerType : Property|undefined
-
默认值: Default Value:
CornerType.ROUNDED
readonly definitionChanged : Event
获取每当更改或修改属性或子属性时引发的事件。 Gets the event that is raised whenever a property or sub-property is changed or modified.
distanceDisplayCondition : Property|undefined
获取或设置 Gets or sets the
DistanceDisplayCondition 属性指定该走廊将在距摄像机的距离处显示。 Property specifying at what distance from the camera that this corridor will be displayed.
extrudedHeight : Property|undefined
获取或设置指定走廊拉伸高度的数字属性。设置此属性会创建一个从高度开始并在此高度结束的走廊形状的体积。 Gets or sets the numeric Property specifying the altitude of the corridor extrusion. Setting this property creates a corridor shaped volume starting at height and ending at this altitude.
extrudedHeightReference : Property|undefined
获取或设置指定拉伸的属性 Gets or sets the Property specifying the extruded
HeightReference.
-
默认值: Default Value:
HeightReference.NONE
fill : Property|undefined
获取或设置布尔属性,指定走廊是否填充有提供的材质。 Gets or sets the boolean Property specifying whether the corridor is filled with the provided material.
-
默认值: Default Value:
true
granularity : Property|undefined
获取或设置指定每个纬度和经度点之间的采样距离的数值属性。 Gets or sets the numeric Property specifying the sampling distance between each latitude and longitude point.
-
默认值: Default Value:
{CesiumMath.RADIANS_PER_DEGREE}
height : Property|undefined
获取或设置指定走廊高度的数字属性。 Gets or sets the numeric Property specifying the altitude of the corridor.
-
默认值: Default Value:
0.0
heightReference : Property|undefined
获取或设置指定的属性 Gets or sets the Property specifying the
HeightReference.
-
默认值: Default Value:
HeightReference.NONE
material : MaterialProperty|undefined
获取或设置指定用于填充走廊的材质的属性。 Gets or sets the Property specifying the material used to fill the corridor.
-
默认值: Default Value:
Color.WHITE
outline : Property|undefined
获取或设置指定是否勾勒出走廊的属性。 Gets or sets the Property specifying whether the corridor is outlined.
-
默认值: Default Value:
false
outlineColor : Property|undefined
-
默认值: Default Value:
Color.BLACK
outlineWidth : Property|undefined
获取或设置指定轮廓宽度的数字属性。 Gets or sets the numeric Property specifying the width of the outline.
注意:此属性在 Windows 平台上的所有主要浏览器上都将被忽略。有关详细信息,请参阅(@link https://github.com/CesiumGS/cesium/issues/40}。 Note: This property will be ignored on all major browsers on Windows platforms. For details, see (@link https://github.com/CesiumGS/cesium/issues/40}.
-
默认值: Default Value:
1.0
positions : Property|undefined
获取或设置指定数组的属性 Gets or sets a Property specifying the array of
Cartesian3 定义走廊中心线的位置。 positions that define the centerline of the corridor.
shadows : Property|undefined
获取或设置枚举属性,指定走廊是否投射或接收来自光源的阴影。 Get or sets the enum Property specifying whether the corridor casts or receives shadows from light sources.
-
默认值: Default Value:
ShadowMode.DISABLED
show : Property|undefined
获取或设置指定走廊可见性的布尔属性。 Gets or sets the boolean Property specifying the visibility of the corridor.
-
默认值: Default Value:
true
width : Property|undefined
获取或设置指定轮廓宽度的数字属性。 Gets or sets the numeric Property specifying the width of the outline.
zIndex : ConstantProperty|undefined
获取或设置指定走廊顺序的 zIndex 属性。仅当走廊是静态且未指定 height 或 exturdedHeight 时才有效。 Gets or sets the zIndex Property specifying the ordering of the corridor. Only has an effect if the coridor is static and neither height or exturdedHeight are specified.
-
默认值: Default Value:
0
方法 Methods
clone(result) → CorridorGraphics
复制此实例。 Duplicates this instance.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
result |
CorridorGraphics | 可选 optional 用于存储结果的对象。 The object onto which to store the result. |
返回: Returns:
修改后的结果参数或新实例(如果未提供)。 The modified result parameter or a new instance if one was not provided.
将此对象上每个未分配的属性分配给所提供的源对象上相同属性的值。 Assigns each unassigned property on this object to the value of the same property on the provided source object.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
source |
CorridorGraphics | 要合并到此对象中的对象。 The object to be merged into this object. |
类型定义 Type Definitions
CorridorGraphics 构造函数的初始化选项 Initialization options for the CorridorGraphics constructor
属性: Properties:
| 名称 Name | 类型 Type | Attributes | 默认值 Default | 说明 Description |
|---|---|---|---|---|
show |
Property | boolean |
<可选> <optional> |
true | 指定走廊可见性的布尔属性。 A boolean Property specifying the visibility of the corridor. |
positions |
Property | Array.<Cartesian3> |
<可选> <optional> |
指定数组的属性 A Property specifying the array of Cartesian3 定义走廊中心线的位置。 positions that define the centerline of the corridor. |
|
width |
Property | number |
<可选> <optional> |
指定走廊边缘之间距离的数字属性。 A numeric Property specifying the distance between the edges of the corridor. | |
height |
Property | number |
<可选> <optional> |
0 | 一个数字属性,指定走廊相对于椭球面的高度。 A numeric Property specifying the altitude of the corridor relative to the ellipsoid surface. |
heightReference |
Property | HeightReference |
<可选> <optional> |
HeightReference.NONE | 指定高度相对值的属性。 A Property specifying what the height is relative to. |
extrudedHeight |
Property | number |
<可选> <optional> |
一个数字属性,指定道路的拉伸面相对于椭球面的高度。 A numeric Property specifying the altitude of the corridor's extruded face relative to the ellipsoid surface. | |
extrudedHeightReference |
Property | HeightReference |
<可选> <optional> |
HeightReference.NONE | 指定 extrudedHeight 相对于什么的属性。 A Property specifying what the extrudedHeight is relative to. |
cornerType |
Property | CornerType |
<可选> <optional> |
CornerType.ROUNDED | A CornerType 属性指定角的样式。 Property specifying the style of the corners. |
granularity |
Property | number |
<可选> <optional> |
Cesium.Math.RADIANS_PER_DEGREE | 指定每个纬度和经度之间距离的数字属性。 A numeric Property specifying the distance between each latitude and longitude. |
fill |
Property | boolean |
<可选> <optional> |
true | 一个布尔属性,指定走廊是否填充所提供的材料。 A boolean Property specifying whether the corridor is filled with the provided material. |
material |
MaterialProperty | Color |
<可选> <optional> |
Color.WHITE | 指定用于填充走廊的材质的属性。 A Property specifying the material used to fill the corridor. |
outline |
Property | boolean |
<可选> <optional> |
false | 一个布尔属性,指定是否勾勒出走廊的轮廓。 A boolean Property specifying whether the corridor is outlined. |
outlineColor |
Property | Color |
<可选> <optional> |
Color.BLACK | 指定的属性 A Property specifying the Color 的轮廓。 of the outline. |
outlineWidth |
Property | number |
<可选> <optional> |
1.0 | 指定轮廓宽度的数字属性。 A numeric Property specifying the width of the outline. |
shadows |
Property | ShadowMode |
<可选> <optional> |
ShadowMode.DISABLED | 一个枚举属性,指定走廊是否投射或接收来自光源的阴影。 An enum Property specifying whether the corridor casts or receives shadows from light sources. |
distanceDisplayCondition |
Property | DistanceDisplayCondition |
<可选> <optional> |
一个属性,指定该走廊将在距摄像机的距离处显示。 A Property specifying at what distance from the camera that this corridor will be displayed. | |
classificationType |
Property | ClassificationType |
<可选> <optional> |
ClassificationType.BOTH | 一个枚举属性,指定该走廊在地面上时是否对地形、3D Tiles或两者进行分类。 An enum Property specifying whether this corridor will classify terrain, 3D Tiles, or both when on the ground. |
zIndex |
ConstantProperty | number |
<可选> <optional> |
指定走廊 zIndex 的属性,用于排序。仅当 height 和 extrudedHeight 未定义且走廊是静态时才有效。 A Property specifying the zIndex of the corridor, used for ordering. Only has an effect if height and extrudedHeight are undefined, and if the corridor is static. |
