Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
CylinderMesh¶
Inherits: PrimitiveMesh < Mesh < Resource < RefCounted < Object
表示圆柱形 PrimitiveMesh 的类。
Description¶
表示圆柱形 PrimitiveMesh 的类。通过将 top_radius 或 bottom_radius 属性设置为 0.0
,这个类可以用来创建圆锥体。
Properties¶
|
||
|
||
|
||
|
||
|
||
|
||
|
Property Descriptions¶
float bottom_radius = 0.5
圆柱体的底部半径。如果设置为 0.0
,则不会生成底面,呈圆锥状。另见 cap_bottom。
bool cap_bottom = true
如果为 true
,则在圆柱体底部生成一个盖子。这可以设置为 false
以在相机从未看到盖子时加速生成和渲染。另见 bottom_radius。
注意:如果 bottom_radius 为 0.0
,即使 cap_bottom 为 true
,盖子生成也会始终被跳过。
bool cap_top = true
如果为 true
,则在圆柱体顶部生成一个盖子。这可以设置为 false
以在相机从未看到盖子时加速生成和渲染。另见 top_radius。
注意:如果 top_radius 为 0.0
,即使 cap_top 为 true
,盖子生成也会始终被跳过。
float height = 2.0
圆柱体的全高。
int radial_segments = 64
圆柱体上的径向段数。更高的值会生成更细致的圆柱体或圆锥体,但以性能为代价。
int rings = 4
沿圆柱体的高度的边缘环的数量。除非使用着色器或程序网格工具来更改顶点数据,否则更改 rings 不会影响显示,rings 应保持其默认值。较高的值会产生更多的细分,这可用于使用着色器或程序式网格工具创建更平滑的显示效果,但以性能为代价。
float top_radius = 0.5
圆柱体的顶部半径。如果设置为 0.0
,则不会生成顶面,呈圆锥状。另见 cap_top。