描述圆柱体、截锥体或由长度、顶部半径和底部半径定义的圆锥体。中心位置和方向由包含的元素决定 Describes a cylinder, truncated cone, or cone defined by a length, top radius, and bottom radius. The center position and orientation are determined by the containing
Entity.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
options |
CylinderGraphics.ConstructorOptions | 可选 optional 描述初始化选项的对象 Object describing initialization options |
成员 Members
bottomRadius : Property|undefined
获取或设置指定圆柱体底部半径的数值属性。 Gets or sets the numeric Property specifying the radius of the bottom of the cylinder.
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 cylinder will be displayed.
fill : Property|undefined
获取或设置布尔属性,指定圆柱体是否填充有提供的材料。 Gets or sets the boolean Property specifying whether the cylinder is filled with the provided material.
-
默认值: Default Value:
true
heightReference : Property|undefined
获取或设置指定的属性 Gets or sets the Property specifying the
HeightReference.
-
默认值: Default Value:
HeightReference.NONE
length : Property|undefined
获取或设置指定圆柱体长度的数字属性。 Gets or sets the numeric Property specifying the length of the cylinder.
material : MaterialProperty|undefined
获取或设置指定用于填充圆柱体的材料的属性。 Gets or sets the Property specifying the material used to fill the cylinder.
-
默认值: Default Value:
Color.WHITE
numberOfVerticalLines : Property|undefined
获取或设置指定沿轮廓周边绘制的垂直线数的属性。 Gets or sets the Property specifying the number of vertical lines to draw along the perimeter for the outline.
-
默认值: Default Value:
16
outline : Property|undefined
获取或设置指定圆柱体是否有轮廓的布尔属性。 Gets or sets the boolean Property specifying whether the cylinder 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
shadows : Property|undefined
获取或设置枚举属性,指定圆柱体是否投射或接收来自光源的阴影。 Get or sets the enum Property specifying whether the cylinder 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 cylinder.
-
默认值: Default Value:
true
slices : Property|undefined
获取或设置指定圆柱体周边周围边数的属性。 Gets or sets the Property specifying the number of edges around the perimeter of the cylinder.
-
默认值: Default Value:
128
topRadius : Property|undefined
获取或设置指定圆柱体顶部半径的数值属性。 Gets or sets the numeric Property specifying the radius of the top of the cylinder.
方法 Methods
clone(result) → CylinderGraphics
复制此实例。 Duplicates this instance.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
result |
CylinderGraphics | 可选 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 |
CylinderGraphics | 要合并到此对象中的对象。 The object to be merged into this object. |
类型定义 Type Definitions
CylinderGraphics 构造函数的初始化选项 Initialization options for the CylinderGraphics constructor
属性: Properties:
| 名称 Name | 类型 Type | Attributes | 默认值 Default | 说明 Description |
|---|---|---|---|---|
show |
Property | boolean |
<可选> <optional> |
true | 指定圆柱体可见性的布尔属性。 A boolean Property specifying the visibility of the cylinder. |
length |
Property | number |
<可选> <optional> |
指定圆柱体长度的数字属性。 A numeric Property specifying the length of the cylinder. | |
topRadius |
Property | number |
<可选> <optional> |
指定圆柱体顶部半径的数字属性。 A numeric Property specifying the radius of the top of the cylinder. | |
bottomRadius |
Property | number |
<可选> <optional> |
指定圆柱体底部半径的数字属性。 A numeric Property specifying the radius of the bottom of the cylinder. | |
heightReference |
Property | HeightReference |
<可选> <optional> |
HeightReference.NONE | 指定相对于实体位置的高度的属性。 A Property specifying what the height from the entity position is relative to. |
fill |
Property | boolean |
<可选> <optional> |
true | 一个布尔属性,指定圆柱体是否填充有提供的材料。 A boolean Property specifying whether the cylinder is filled with the provided material. |
material |
MaterialProperty | Color |
<可选> <optional> |
Color.WHITE | 指定用于填充圆柱体的材料的属性。 A Property specifying the material used to fill the cylinder. |
outline |
Property | boolean |
<可选> <optional> |
false | 一个布尔属性,指定圆柱体是否有轮廓。 A boolean Property specifying whether the cylinder 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. |
numberOfVerticalLines |
Property | number |
<可选> <optional> |
16 | 一个数字属性,指定沿轮廓周边绘制的垂直线的数量。 A numeric Property specifying the number of vertical lines to draw along the perimeter for the outline. |
slices |
Property | number |
<可选> <optional> |
128 | 圆柱体周边的边数。 The number of edges around the perimeter of the cylinder. |
shadows |
Property | ShadowMode |
<可选> <optional> |
ShadowMode.DISABLED | 一个枚举属性,指定圆柱体是否投射或接收来自光源的阴影。 An enum Property specifying whether the cylinder casts or receives shadows from light sources. |
distanceDisplayCondition |
Property | DistanceDisplayCondition |
<可选> <optional> |
一个属性,指定该圆柱体将在距相机的距离处显示。 A Property specifying at what distance from the camera that this cylinder will be displayed. |
