Files
godot-docs-l10n/classes/zh_Hans/class_csgcylinder3d.rst

166 lines
6.2 KiB
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

:github_url: hide
.. _class_CSGCylinder3D:
CSGCylinder3D
=============
**继承:** :ref:`CSGPrimitive3D<class_CSGPrimitive3D>` **<** :ref:`CSGShape3D<class_CSGShape3D>` **<** :ref:`GeometryInstance3D<class_GeometryInstance3D>` **<** :ref:`VisualInstance3D<class_VisualInstance3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
CSG 圆柱形状。
.. rst-class:: classref-introduction-group
描述
----
此节点允许你创建与 CSG 系统一起使用的圆柱体(或圆锥体)。
\ **注意:**\ CSG 节点旨在用于关卡原型设计。与使用 :ref:`PrimitiveMesh<class_PrimitiveMesh>` 创建 :ref:`MeshInstance3D<class_MeshInstance3D>` 相比,创建 CSG 节点具有显着的 CPU 成本。在另一个 CSG 节点中,移动一个 CSG 节点,也会大量消耗 CPU因此在游戏过程中应该避免这种情况。
.. rst-class:: classref-introduction-group
教程
----
- :doc:`使用 CSG 设计关卡原型 <../tutorials/3d/csg_tools>`
.. rst-class:: classref-reftable-group
属性
----
.. table::
:widths: auto
+---------------------------------+----------------------------------------------------------------+-----------+
| :ref:`bool<class_bool>` | :ref:`cone<class_CSGCylinder3D_property_cone>` | ``false`` |
+---------------------------------+----------------------------------------------------------------+-----------+
| :ref:`float<class_float>` | :ref:`height<class_CSGCylinder3D_property_height>` | ``2.0`` |
+---------------------------------+----------------------------------------------------------------+-----------+
| :ref:`Material<class_Material>` | :ref:`material<class_CSGCylinder3D_property_material>` | |
+---------------------------------+----------------------------------------------------------------+-----------+
| :ref:`float<class_float>` | :ref:`radius<class_CSGCylinder3D_property_radius>` | ``0.5`` |
+---------------------------------+----------------------------------------------------------------+-----------+
| :ref:`int<class_int>` | :ref:`sides<class_CSGCylinder3D_property_sides>` | ``8`` |
+---------------------------------+----------------------------------------------------------------+-----------+
| :ref:`bool<class_bool>` | :ref:`smooth_faces<class_CSGCylinder3D_property_smooth_faces>` | ``true`` |
+---------------------------------+----------------------------------------------------------------+-----------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
属性说明
--------
.. _class_CSGCylinder3D_property_cone:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **cone** = ``false`` :ref:`🔗<class_CSGCylinder3D_property_cone>`
.. rst-class:: classref-property-setget
- |void| **set_cone**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_cone**\ (\ )
如果为 ``true``\ ,则创建圆锥,仅在一侧应用 :ref:`radius<class_CSGCylinder3D_property_radius>`\ 。
.. rst-class:: classref-item-separator
----
.. _class_CSGCylinder3D_property_height:
.. rst-class:: classref-property
:ref:`float<class_float>` **height** = ``2.0`` :ref:`🔗<class_CSGCylinder3D_property_height>`
.. rst-class:: classref-property-setget
- |void| **set_height**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_height**\ (\ )
圆柱体的高度。
.. rst-class:: classref-item-separator
----
.. _class_CSGCylinder3D_property_material:
.. rst-class:: classref-property
:ref:`Material<class_Material>` **material** :ref:`🔗<class_CSGCylinder3D_property_material>`
.. rst-class:: classref-property-setget
- |void| **set_material**\ (\ value\: :ref:`Material<class_Material>`\ )
- :ref:`Material<class_Material>` **get_material**\ (\ )
用于渲染圆柱体的材质。
.. rst-class:: classref-item-separator
----
.. _class_CSGCylinder3D_property_radius:
.. rst-class:: classref-property
:ref:`float<class_float>` **radius** = ``0.5`` :ref:`🔗<class_CSGCylinder3D_property_radius>`
.. rst-class:: classref-property-setget
- |void| **set_radius**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_radius**\ (\ )
圆柱体的半径。
.. rst-class:: classref-item-separator
----
.. _class_CSGCylinder3D_property_sides:
.. rst-class:: classref-property
:ref:`int<class_int>` **sides** = ``8`` :ref:`🔗<class_CSGCylinder3D_property_sides>`
.. rst-class:: classref-property-setget
- |void| **set_sides**\ (\ value\: :ref:`int<class_int>`\ )
- :ref:`int<class_int>` **get_sides**\ (\ )
圆柱体的边数越多,圆柱体的细节越多。
.. rst-class:: classref-item-separator
----
.. _class_CSGCylinder3D_property_smooth_faces:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **smooth_faces** = ``true`` :ref:`🔗<class_CSGCylinder3D_property_smooth_faces>`
.. rst-class:: classref-property-setget
- |void| **set_smooth_faces**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_smooth_faces**\ (\ )
如果为 ``true``\ ,则将圆柱体的法线设置为具有平滑效果,使圆柱体看起来是圆形的。如果为 ``false``\ ,则圆柱体将具有平坦的阴影表现。
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
.. |const| replace:: :abbr:`const (本方法无副作用,不会修改该实例的任何成员变量。)`
.. |vararg| replace:: :abbr:`vararg (本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。)`
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
.. |static| replace:: :abbr:`static (调用本方法无需实例,可直接使用类名进行调用。)`
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效运算符。)`
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列位标志构成位掩码的整数。)`
.. |void| replace:: :abbr:`void (无返回值。)`