描述一个圆柱体、截头圆锥或圆锥,该圆柱体由长度、顶部半径和底部半径定义。
中心位置和方向由包含的
Entity 确定。
| Name | Type | Description |
|---|---|---|
options |
CylinderGraphics.ConstructorOptions | optional 描述初始化选项的对象 |
Members
bottomRadius : Property|undefined
获取或设置数值属性,指定圆柱体底部的半径。
readonly definitionChanged : Event
获取每当属性或子属性发生更改或修改时触发的事件。
distanceDisplayCondition : Property|undefined
获取或设置属性,指定从相机到圆柱体的显示距离。
fill : Property|undefined
获取或设置布尔属性,指定圆柱体是否用提供的材质填充。
-
Default Value:
true
heightReference : Property|undefined
获取或设置属性,指定
HeightReference。
-
Default Value:
HeightReference.NONE
length : Property|undefined
获取或设置数值属性,指定圆柱体的长度。
material : MaterialProperty|undefined
获取或设置属性,指定用于填充圆柱体的材质。
-
Default Value:
Color.WHITE
numberOfVerticalLines : Property|undefined
获取或设置属性,指定沿轮廓绘制的垂直线条数量。
-
Default Value:
16
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
shadows : Property|undefined
获取或设置枚举属性,指定圆柱体是否从光源投射或接收阴影。
-
Default Value:
ShadowMode.DISABLED
show : Property|undefined
获取或设置布尔属性,指定圆柱体的可见性。
-
Default Value:
true
slices : Property|undefined
获取或设置属性,指定圆柱体周围的边缘数量。
-
Default Value:
128
topRadius : Property|undefined
获取或设置数值属性,指定圆柱体顶部的半径。
Methods
clone(result) → CylinderGraphics
复制此实例。
| Name | Type | Description |
|---|---|---|
result |
CylinderGraphics | optional 存储结果的对象。 |
Returns:
修改后的结果参数或如果未提供则返回一个新实例。
将此对象上每个未分配的属性赋值为提供的源对象上相同属性的值。
| Name | Type | Description |
|---|---|---|
source |
CylinderGraphics | 要合并到此对象中的对象。 |
Type Definitions
CylinderGraphics 构造函数的初始化选项
Properties:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
show |
Property | boolean |
<optional> |
true | 一个布尔属性,指定圆柱体的可见性。 |
length |
Property | number |
<optional> |
一个数值属性,指定圆柱体的长度。 | |
topRadius |
Property | number |
<optional> |
一个数值属性,指定圆柱体顶部的半径。 | |
bottomRadius |
Property | number |
<optional> |
一个数值属性,指定圆柱体底部的半径。 | |
heightReference |
Property | HeightReference |
<optional> |
HeightReference.NONE | 一个属性,指定实体位置的高度相对于什么。 |
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 | 一个数值属性,指定轮廓的宽度。 |
numberOfVerticalLines |
Property | number |
<optional> |
16 | 一个数值属性,指定沿轮廓绘制的垂直线条数量。 |
slices |
Property | number |
<optional> |
128 | 指定圆柱体周围的边缘数量。 |
shadows |
Property | ShadowMode |
<optional> |
ShadowMode.DISABLED | 一个枚举属性,指定圆柱体是否从光源投射或接收阴影。 |
distanceDisplayCondition |
Property | DistanceDisplayCondition |
<optional> |
一个属性,指定从相机到圆柱体的显示距离。 |
