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