Class: CylinderGraphics

CylinderGraphics

new CylinderGraphics(options)

创建圆柱、圆锥或圆台类 中心位置与姿态方向在 Entity 定义。

Name Type Description
options Object 可选

Object 包含以下属性的对象:

Name Type Default Description
show Property true 可选

boolean属性,用于指定Cylinder的可见性。

length Property 可选

number属性,指定Cylinder的长度。

topRadius Property 可选

number属性,指定Cylinder的顶部的半径长度。

bottomRadius Property 可选

number属性,指定Cylinder的底部的半径长度。

heightReference Property HeightReference.NONE 可选

HeightReference属性,指定height的参考点。

material MaterialProperty Color.WHITE 可选

材质属性,指定用于填充Cylinder的材质。

outline Property false 可选

boolean属性,用于指定是否显示Cylinder的轮廓。

outlineColor Property Color.BLACK 可选

Color属性,指定Cylinder的轮廓线颜色。

outlineWidth Property 1.0 可选

number属性,指定Cylinder轮廓线宽度。

numberOfVerticalLines Property 16 可选

number属性,指定沿着Cylinder的周长绘制垂直线的数量。

slices Property 128 可选

number属性,指定Cylinder周边的边数。

shadows Property ShadowMode.DISABLED 可选

枚举属性,用于指定Cylinder从每个光源投射阴影还是接收阴影。

distanceDisplayCondition Property 可选

属性,指定Cylinder在距离相机多远的位置显示。

Members

bottomRadiusProperty

获取或设置number属性,指定Cylinder底部的半径长度。

readonly definitionChangedEvent

获取属性或子属性更改或修改时引发的事件。

distanceDisplayConditionProperty

获取或设置DistanceDisplayCondition属性,指定该Cylinder在距离相机多远的位置显示。

fillProperty

获取或设置boolean属性,指定是否用提供的材质填充Cylinder。

Default Value:
true

heightReferenceProperty

获取或设置 HeightReference属性。

Default Value:
HeightReference.NONE

lengthProperty

获取或设置number属性,指定Cylinder的长度。

获取或设置MaterialProperty属性,指定用于填充Cylinder的材质。

Default Value:
Color.WHITE

numberOfVerticalLinesProperty

获取或设置number属性,指定沿着Cylinder的周长绘制垂直线的数量。

Default Value:
16

outlineProperty

获取或设置boolean属性,用于指定是否显示Cylinder轮廓。

Default Value:
false

outlineColorProperty

获取或设置Color属性,指定轮廓的颜色。

Default Value:
Color.BLACK

outlineWidthProperty

获取或设置number属性,指定轮廓宽度。

Default Value:
1.0

shadowsProperty

获取或设置枚举属性,用于指定Cylinder从每个光源投射阴影还是接收阴影。

Default Value:
ShadowMode.DISABLED

showProperty

获取或设置boolean属性,指定圆柱体的可见性。

Default Value:
true

slicesProperty

获取或设置number属性,指定Cylinder周边的边数。

Default Value:
128

topRadiusProperty

获取或设置number属性,指定Cylinder顶部的半径长度。

Methods

clone(result){CylinderGraphics}

拷贝此实例。

Name Type Description
result CylinderGraphics 可选

存储结果的对象。

Returns:
Type Description
CylinderGraphics 修改后的结果参数,或一个新实例(如果没有提供)。

merge(source)

将此对象上每个未指定的属性赋值给所提供源对象上相同属性的值。

Name Type Description
source CylinderGraphics

提供属性值的对象。