class_csgtorus3d.rst 5.7 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/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. Description
  12. -----------
  13. This node allows you to create a torus 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:`float<class_float>` | :ref:`inner_radius<class_CSGTorus3D_property_inner_radius>` | ``0.5`` |
  22. +---------------------------------+-------------------------------------------------------------+----------+
  23. | :ref:`Material<class_Material>` | :ref:`material<class_CSGTorus3D_property_material>` | |
  24. +---------------------------------+-------------------------------------------------------------+----------+
  25. | :ref:`float<class_float>` | :ref:`outer_radius<class_CSGTorus3D_property_outer_radius>` | ``1.0`` |
  26. +---------------------------------+-------------------------------------------------------------+----------+
  27. | :ref:`int<class_int>` | :ref:`ring_sides<class_CSGTorus3D_property_ring_sides>` | ``6`` |
  28. +---------------------------------+-------------------------------------------------------------+----------+
  29. | :ref:`int<class_int>` | :ref:`sides<class_CSGTorus3D_property_sides>` | ``8`` |
  30. +---------------------------------+-------------------------------------------------------------+----------+
  31. | :ref:`bool<class_bool>` | :ref:`smooth_faces<class_CSGTorus3D_property_smooth_faces>` | ``true`` |
  32. +---------------------------------+-------------------------------------------------------------+----------+
  33. Property Descriptions
  34. ---------------------
  35. .. _class_CSGTorus3D_property_inner_radius:
  36. - :ref:`float<class_float>` **inner_radius**
  37. +-----------+-------------------------+
  38. | *Default* | ``0.5`` |
  39. +-----------+-------------------------+
  40. | *Setter* | set_inner_radius(value) |
  41. +-----------+-------------------------+
  42. | *Getter* | get_inner_radius() |
  43. +-----------+-------------------------+
  44. The inner radius of the torus.
  45. ----
  46. .. _class_CSGTorus3D_property_material:
  47. - :ref:`Material<class_Material>` **material**
  48. +----------+---------------------+
  49. | *Setter* | set_material(value) |
  50. +----------+---------------------+
  51. | *Getter* | get_material() |
  52. +----------+---------------------+
  53. The material used to render the torus.
  54. ----
  55. .. _class_CSGTorus3D_property_outer_radius:
  56. - :ref:`float<class_float>` **outer_radius**
  57. +-----------+-------------------------+
  58. | *Default* | ``1.0`` |
  59. +-----------+-------------------------+
  60. | *Setter* | set_outer_radius(value) |
  61. +-----------+-------------------------+
  62. | *Getter* | get_outer_radius() |
  63. +-----------+-------------------------+
  64. The outer radius of the torus.
  65. ----
  66. .. _class_CSGTorus3D_property_ring_sides:
  67. - :ref:`int<class_int>` **ring_sides**
  68. +-----------+-----------------------+
  69. | *Default* | ``6`` |
  70. +-----------+-----------------------+
  71. | *Setter* | set_ring_sides(value) |
  72. +-----------+-----------------------+
  73. | *Getter* | get_ring_sides() |
  74. +-----------+-----------------------+
  75. The number of edges each ring of the torus is constructed of.
  76. ----
  77. .. _class_CSGTorus3D_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 slices the torus is constructed of.
  87. ----
  88. .. _class_CSGTorus3D_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 torus are set to give a smooth effect making the torus seem rounded. If ``false`` the torus 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.)`