class_csgcylinder3d.rst 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/modules/csg/doc_classes/CSGCylinder3D.xml.
  6. .. _class_CSGCylinder3D:
  7. CSGCylinder3D
  8. =============
  9. **Inherits:** :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>`
  10. A CSG Cylinder shape.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. This node allows you to create a cylinder (or cone) for use with the CSG system.
  15. \ **Note:** CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a :ref:`MeshInstance3D<class_MeshInstance3D>` with a :ref:`PrimitiveMesh<class_PrimitiveMesh>`. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay.
  16. .. rst-class:: classref-introduction-group
  17. Tutorials
  18. ---------
  19. - :doc:`Prototyping levels with CSG <../tutorials/3d/csg_tools>`
  20. .. rst-class:: classref-reftable-group
  21. Properties
  22. ----------
  23. .. table::
  24. :widths: auto
  25. +---------------------------------+----------------------------------------------------------------+-----------+
  26. | :ref:`bool<class_bool>` | :ref:`cone<class_CSGCylinder3D_property_cone>` | ``false`` |
  27. +---------------------------------+----------------------------------------------------------------+-----------+
  28. | :ref:`float<class_float>` | :ref:`height<class_CSGCylinder3D_property_height>` | ``2.0`` |
  29. +---------------------------------+----------------------------------------------------------------+-----------+
  30. | :ref:`Material<class_Material>` | :ref:`material<class_CSGCylinder3D_property_material>` | |
  31. +---------------------------------+----------------------------------------------------------------+-----------+
  32. | :ref:`float<class_float>` | :ref:`radius<class_CSGCylinder3D_property_radius>` | ``0.5`` |
  33. +---------------------------------+----------------------------------------------------------------+-----------+
  34. | :ref:`int<class_int>` | :ref:`sides<class_CSGCylinder3D_property_sides>` | ``8`` |
  35. +---------------------------------+----------------------------------------------------------------+-----------+
  36. | :ref:`bool<class_bool>` | :ref:`smooth_faces<class_CSGCylinder3D_property_smooth_faces>` | ``true`` |
  37. +---------------------------------+----------------------------------------------------------------+-----------+
  38. .. rst-class:: classref-section-separator
  39. ----
  40. .. rst-class:: classref-descriptions-group
  41. Property Descriptions
  42. ---------------------
  43. .. _class_CSGCylinder3D_property_cone:
  44. .. rst-class:: classref-property
  45. :ref:`bool<class_bool>` **cone** = ``false`` :ref:`🔗<class_CSGCylinder3D_property_cone>`
  46. .. rst-class:: classref-property-setget
  47. - |void| **set_cone**\ (\ value\: :ref:`bool<class_bool>`\ )
  48. - :ref:`bool<class_bool>` **is_cone**\ (\ )
  49. If ``true`` a cone is created, the :ref:`radius<class_CSGCylinder3D_property_radius>` will only apply to one side.
  50. .. rst-class:: classref-item-separator
  51. ----
  52. .. _class_CSGCylinder3D_property_height:
  53. .. rst-class:: classref-property
  54. :ref:`float<class_float>` **height** = ``2.0`` :ref:`🔗<class_CSGCylinder3D_property_height>`
  55. .. rst-class:: classref-property-setget
  56. - |void| **set_height**\ (\ value\: :ref:`float<class_float>`\ )
  57. - :ref:`float<class_float>` **get_height**\ (\ )
  58. The height of the cylinder.
  59. .. rst-class:: classref-item-separator
  60. ----
  61. .. _class_CSGCylinder3D_property_material:
  62. .. rst-class:: classref-property
  63. :ref:`Material<class_Material>` **material** :ref:`🔗<class_CSGCylinder3D_property_material>`
  64. .. rst-class:: classref-property-setget
  65. - |void| **set_material**\ (\ value\: :ref:`Material<class_Material>`\ )
  66. - :ref:`Material<class_Material>` **get_material**\ (\ )
  67. The material used to render the cylinder.
  68. .. rst-class:: classref-item-separator
  69. ----
  70. .. _class_CSGCylinder3D_property_radius:
  71. .. rst-class:: classref-property
  72. :ref:`float<class_float>` **radius** = ``0.5`` :ref:`🔗<class_CSGCylinder3D_property_radius>`
  73. .. rst-class:: classref-property-setget
  74. - |void| **set_radius**\ (\ value\: :ref:`float<class_float>`\ )
  75. - :ref:`float<class_float>` **get_radius**\ (\ )
  76. The radius of the cylinder.
  77. .. rst-class:: classref-item-separator
  78. ----
  79. .. _class_CSGCylinder3D_property_sides:
  80. .. rst-class:: classref-property
  81. :ref:`int<class_int>` **sides** = ``8`` :ref:`🔗<class_CSGCylinder3D_property_sides>`
  82. .. rst-class:: classref-property-setget
  83. - |void| **set_sides**\ (\ value\: :ref:`int<class_int>`\ )
  84. - :ref:`int<class_int>` **get_sides**\ (\ )
  85. The number of sides of the cylinder, the higher this number the more detail there will be in the cylinder.
  86. .. rst-class:: classref-item-separator
  87. ----
  88. .. _class_CSGCylinder3D_property_smooth_faces:
  89. .. rst-class:: classref-property
  90. :ref:`bool<class_bool>` **smooth_faces** = ``true`` :ref:`🔗<class_CSGCylinder3D_property_smooth_faces>`
  91. .. rst-class:: classref-property-setget
  92. - |void| **set_smooth_faces**\ (\ value\: :ref:`bool<class_bool>`\ )
  93. - :ref:`bool<class_bool>` **get_smooth_faces**\ (\ )
  94. If ``true`` the normals of the cylinder are set to give a smooth effect making the cylinder seem rounded. If ``false`` the cylinder will have a flat shaded look.
  95. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  96. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  97. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  98. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  99. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  100. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  101. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  102. .. |void| replace:: :abbr:`void (No return value.)`