描述一个走廊,它是由中心线和宽度定义的形状,
符合地球曲率。它可以放置在表面上或指定高度,
也可以选择挤压成体积。
| Name | Type | Description |
|---|---|---|
options |
CorridorGraphics.ConstructorOptions | optional 描述初始化选项的对象 |
Demo:
See:
Members
classificationType : Property|undefined
获取或设置指定当走廊在地面上时,是否对地形、3D Tiles 或两者进行分类的
ClassificationType 属性。
-
Default Value:
ClassificationType.BOTH
cornerType : Property|undefined
获取或设置指定角落样式的
CornerType 属性。
-
Default Value:
CornerType.ROUNDED
readonly definitionChanged : Event
获取每当属性或子属性被更改或修改时引发的事件。
distanceDisplayCondition : Property|undefined
获取或设置指定从相机多远的距离显示此走廊的
DistanceDisplayCondition 属性。
extrudedHeight : Property|undefined
获取或设置指定走廊挤压高度的数值属性。
设置此属性会创建一个从高度开始到此高度结束的走廊形状体积。
extrudedHeightReference : Property|undefined
获取或设置指定挤压
HeightReference 的属性。
-
Default Value:
HeightReference.NONE
fill : Property|undefined
获取或设置指定走廊是否使用提供的材质进行填充的布尔属性。
-
Default Value:
true
granularity : Property|undefined
获取或设置指定每个经纬度点之间采样距离的数值属性。
-
Default Value:
{CesiumMath.RADIANS_PER_DEGREE}
height : Property|undefined
获取或设置指定走廊高度的数值属性。
-
Default Value:
0.0
heightReference : Property|undefined
获取或设置指定
HeightReference 的属性。
-
Default Value:
HeightReference.NONE
material : MaterialProperty|undefined
获取或设置指定用于填充走廊的材质的属性。
-
Default Value:
Color.WHITE
outline : Property|undefined
获取或设置指定走廊是否有轮廓线的属性。
-
Default Value:
false
outlineColor : Property|undefined
获取或设置指定轮廓线
Color 的属性。
-
Default Value:
Color.BLACK
outlineWidth : Property|undefined
获取或设置指定轮廓线宽度的数值属性。
注意:在 Windows 平台的所有主流浏览器上,此属性将被忽略。详情请参见 (@link https://github.com/CesiumGS/cesium/issues/40}。
-
Default Value:
1.0
positions : Property|undefined
获取或设置指定定义走廊中心线的
Cartesian3 位置数组的属性。
shadows : Property|undefined
获取或设置指定走廊是否从光源投射或接收阴影的枚举属性。
-
Default Value:
ShadowMode.DISABLED
show : Property|undefined
获取或设置指定走廊可见性的布尔属性。
-
Default Value:
true
width : Property|undefined
获取或设置指定走廊宽度的数值属性。
zIndex : ConstantProperty|undefined
获取或设置指定走廊排序的 zIndex 属性。仅在走廊是静态且未指定 height 或 extrudedHeight 时才有效果。
-
Default Value:
0
Methods
clone(result) → CorridorGraphics
复制此实例。
| Name | Type | Description |
|---|---|---|
result |
CorridorGraphics | optional 存储结果的对象。 |
Returns:
修改后的结果参数,如果未提供则返回新实例。
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 构造函数的初始化选项
Properties:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
show |
Property | boolean |
<optional> |
true | 一个布尔属性,指定走廊的可见性。 |
positions |
Property | Array.<Cartesian3> |
<optional> |
一个属性,指定定义走廊中心线的 Cartesian3 位置数组。 |
|
width |
Property | number |
<optional> |
一个数值属性,指定走廊边缘之间的距离。 | |
height |
Property | number |
<optional> |
0 | 一个数值属性,指定走廊相对于椭球体表面的高度。 |
heightReference |
Property | HeightReference |
<optional> |
HeightReference.NONE | 一个属性,指定高度的相对参考。 |
extrudedHeight |
Property | number |
<optional> |
一个数值属性,指定走廊挤压面相对于椭球体表面的高度。 | |
extrudedHeightReference |
Property | HeightReference |
<optional> |
HeightReference.NONE | 一个属性,指定 extrudedHeight 的相对参考。 |
cornerType |
Property | CornerType |
<optional> |
CornerType.ROUNDED | 一个 CornerType 属性,指定角落的样式。 |
granularity |
Property | number |
<optional> |
Cesium.Math.RADIANS_PER_DEGREE | 一个数值属性,指定每个经纬度之间的距离。 |
fill |
Property | boolean |
<optional> |
true | 一个布尔属性,指定走廊是否使用提供的材质进行填充。 |
material |
MaterialProperty | Color |
<optional> |
Color.WHITE | 一个属性,指定用于填充走廊的材质。 |
outline |
Property | boolean |
<optional> |
false | 一个布尔属性,指定走廊是否有轮廓线。 |
outlineColor |
Property | Color |
<optional> |
Color.BLACK | 一个属性,指定轮廓线的 Color。 |
outlineWidth |
Property | number |
<optional> |
1.0 | 一个数值属性,指定轮廓线的宽度。 |
shadows |
Property | ShadowMode |
<optional> |
ShadowMode.DISABLED | 一个枚举属性,指定走廊是否从光源投射或接收阴影。 |
distanceDisplayCondition |
Property | DistanceDisplayCondition |
<optional> |
一个属性,指定从相机多远的距离显示此走廊。 | |
classificationType |
Property | ClassificationType |
<optional> |
ClassificationType.BOTH | 一个枚举属性,指定当走廊在地面上时,是对地形、3D Tiles 还是两者进行分类。 |
zIndex |
ConstantProperty | number |
<optional> |
一个属性,指定走廊的 zIndex,用于排序。仅在 height 和 extrudedHeight 未定义且走廊是静态时才有效果。 |
