class_csgcylinder3d.rst 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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. Description
  12. -----------
  13. This node allows you to create a cylinder (or cone) for use with the CSG system.
  14. \ **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.
  15. Tutorials
  16. ---------
  17. - :doc:`Prototyping levels with CSG <../tutorials/3d/csg_tools>`
  18. Properties
  19. ----------
  20. +---------------------------------+----------------------------------------------------------------+-----------+
  21. | :ref:`bool<class_bool>` | :ref:`cone<class_CSGCylinder3D_property_cone>` | ``false`` |
  22. +---------------------------------+----------------------------------------------------------------+-----------+
  23. | :ref:`float<class_float>` | :ref:`height<class_CSGCylinder3D_property_height>` | ``2.0`` |
  24. +---------------------------------+----------------------------------------------------------------+-----------+
  25. | :ref:`Material<class_Material>` | :ref:`material<class_CSGCylinder3D_property_material>` | |
  26. +---------------------------------+----------------------------------------------------------------+-----------+
  27. | :ref:`float<class_float>` | :ref:`radius<class_CSGCylinder3D_property_radius>` | ``0.5`` |
  28. +---------------------------------+----------------------------------------------------------------+-----------+
  29. | :ref:`int<class_int>` | :ref:`sides<class_CSGCylinder3D_property_sides>` | ``8`` |
  30. +---------------------------------+----------------------------------------------------------------+-----------+
  31. | :ref:`bool<class_bool>` | :ref:`smooth_faces<class_CSGCylinder3D_property_smooth_faces>` | ``true`` |
  32. +---------------------------------+----------------------------------------------------------------+-----------+
  33. Property Descriptions
  34. ---------------------
  35. .. _class_CSGCylinder3D_property_cone:
  36. - :ref:`bool<class_bool>` **cone**
  37. +-----------+-----------------+
  38. | *Default* | ``false`` |
  39. +-----------+-----------------+
  40. | *Setter* | set_cone(value) |
  41. +-----------+-----------------+
  42. | *Getter* | is_cone() |
  43. +-----------+-----------------+
  44. If ``true`` a cone is created, the :ref:`radius<class_CSGCylinder3D_property_radius>` will only apply to one side.
  45. ----
  46. .. _class_CSGCylinder3D_property_height:
  47. - :ref:`float<class_float>` **height**
  48. +-----------+-------------------+
  49. | *Default* | ``2.0`` |
  50. +-----------+-------------------+
  51. | *Setter* | set_height(value) |
  52. +-----------+-------------------+
  53. | *Getter* | get_height() |
  54. +-----------+-------------------+
  55. The height of the cylinder.
  56. ----
  57. .. _class_CSGCylinder3D_property_material:
  58. - :ref:`Material<class_Material>` **material**
  59. +----------+---------------------+
  60. | *Setter* | set_material(value) |
  61. +----------+---------------------+
  62. | *Getter* | get_material() |
  63. +----------+---------------------+
  64. The material used to render the cylinder.
  65. ----
  66. .. _class_CSGCylinder3D_property_radius:
  67. - :ref:`float<class_float>` **radius**
  68. +-----------+-------------------+
  69. | *Default* | ``0.5`` |
  70. +-----------+-------------------+
  71. | *Setter* | set_radius(value) |
  72. +-----------+-------------------+
  73. | *Getter* | get_radius() |
  74. +-----------+-------------------+
  75. The radius of the cylinder.
  76. ----
  77. .. _class_CSGCylinder3D_property_sides:
  78. - :ref:`int<class_int>` **sides**
  79. +-----------+------------------+
  80. | *Default* | ``8`` |
  81. +-----------+------------------+
  82. | *Setter* | set_sides(value) |
  83. +-----------+------------------+
  84. | *Getter* | get_sides() |
  85. +-----------+------------------+
  86. The number of sides of the cylinder, the higher this number the more detail there will be in the cylinder.
  87. ----
  88. .. _class_CSGCylinder3D_property_smooth_faces:
  89. - :ref:`bool<class_bool>` **smooth_faces**
  90. +-----------+-------------------------+
  91. | *Default* | ``true`` |
  92. +-----------+-------------------------+
  93. | *Setter* | set_smooth_faces(value) |
  94. +-----------+-------------------------+
  95. | *Getter* | get_smooth_faces() |
  96. +-----------+-------------------------+
  97. 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.
  98. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  99. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  100. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  101. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  102. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  103. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`