class_csgtorus3d.rst 6.3 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/CSGTorus3D.xml.
  6. .. _class_CSGTorus3D:
  7. CSGTorus3D
  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 Torus shape.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. This node allows you to create a torus 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:`float<class_float>` | :ref:`inner_radius<class_CSGTorus3D_property_inner_radius>` | ``0.5`` |
  27. +---------------------------------+-------------------------------------------------------------+----------+
  28. | :ref:`Material<class_Material>` | :ref:`material<class_CSGTorus3D_property_material>` | |
  29. +---------------------------------+-------------------------------------------------------------+----------+
  30. | :ref:`float<class_float>` | :ref:`outer_radius<class_CSGTorus3D_property_outer_radius>` | ``1.0`` |
  31. +---------------------------------+-------------------------------------------------------------+----------+
  32. | :ref:`int<class_int>` | :ref:`ring_sides<class_CSGTorus3D_property_ring_sides>` | ``6`` |
  33. +---------------------------------+-------------------------------------------------------------+----------+
  34. | :ref:`int<class_int>` | :ref:`sides<class_CSGTorus3D_property_sides>` | ``8`` |
  35. +---------------------------------+-------------------------------------------------------------+----------+
  36. | :ref:`bool<class_bool>` | :ref:`smooth_faces<class_CSGTorus3D_property_smooth_faces>` | ``true`` |
  37. +---------------------------------+-------------------------------------------------------------+----------+
  38. .. rst-class:: classref-section-separator
  39. ----
  40. .. rst-class:: classref-descriptions-group
  41. Property Descriptions
  42. ---------------------
  43. .. _class_CSGTorus3D_property_inner_radius:
  44. .. rst-class:: classref-property
  45. :ref:`float<class_float>` **inner_radius** = ``0.5`` :ref:`🔗<class_CSGTorus3D_property_inner_radius>`
  46. .. rst-class:: classref-property-setget
  47. - |void| **set_inner_radius**\ (\ value\: :ref:`float<class_float>`\ )
  48. - :ref:`float<class_float>` **get_inner_radius**\ (\ )
  49. The inner radius of the torus.
  50. .. rst-class:: classref-item-separator
  51. ----
  52. .. _class_CSGTorus3D_property_material:
  53. .. rst-class:: classref-property
  54. :ref:`Material<class_Material>` **material** :ref:`🔗<class_CSGTorus3D_property_material>`
  55. .. rst-class:: classref-property-setget
  56. - |void| **set_material**\ (\ value\: :ref:`Material<class_Material>`\ )
  57. - :ref:`Material<class_Material>` **get_material**\ (\ )
  58. The material used to render the torus.
  59. .. rst-class:: classref-item-separator
  60. ----
  61. .. _class_CSGTorus3D_property_outer_radius:
  62. .. rst-class:: classref-property
  63. :ref:`float<class_float>` **outer_radius** = ``1.0`` :ref:`🔗<class_CSGTorus3D_property_outer_radius>`
  64. .. rst-class:: classref-property-setget
  65. - |void| **set_outer_radius**\ (\ value\: :ref:`float<class_float>`\ )
  66. - :ref:`float<class_float>` **get_outer_radius**\ (\ )
  67. The outer radius of the torus.
  68. .. rst-class:: classref-item-separator
  69. ----
  70. .. _class_CSGTorus3D_property_ring_sides:
  71. .. rst-class:: classref-property
  72. :ref:`int<class_int>` **ring_sides** = ``6`` :ref:`🔗<class_CSGTorus3D_property_ring_sides>`
  73. .. rst-class:: classref-property-setget
  74. - |void| **set_ring_sides**\ (\ value\: :ref:`int<class_int>`\ )
  75. - :ref:`int<class_int>` **get_ring_sides**\ (\ )
  76. The number of edges each ring of the torus is constructed of.
  77. .. rst-class:: classref-item-separator
  78. ----
  79. .. _class_CSGTorus3D_property_sides:
  80. .. rst-class:: classref-property
  81. :ref:`int<class_int>` **sides** = ``8`` :ref:`🔗<class_CSGTorus3D_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 slices the torus is constructed of.
  86. .. rst-class:: classref-item-separator
  87. ----
  88. .. _class_CSGTorus3D_property_smooth_faces:
  89. .. rst-class:: classref-property
  90. :ref:`bool<class_bool>` **smooth_faces** = ``true`` :ref:`🔗<class_CSGTorus3D_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 torus are set to give a smooth effect making the torus seem rounded. If ``false`` the torus 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.)`