class_csgsphere3d.rst 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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/CSGSphere3D.xml.
  6. .. _class_CSGSphere3D:
  7. CSGSphere3D
  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 Sphere shape.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. This node allows you to create a sphere 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:`Material<class_Material>` | :ref:`material<class_CSGSphere3D_property_material>` | |
  27. +---------------------------------+--------------------------------------------------------------------+----------+
  28. | :ref:`int<class_int>` | :ref:`radial_segments<class_CSGSphere3D_property_radial_segments>` | ``12`` |
  29. +---------------------------------+--------------------------------------------------------------------+----------+
  30. | :ref:`float<class_float>` | :ref:`radius<class_CSGSphere3D_property_radius>` | ``0.5`` |
  31. +---------------------------------+--------------------------------------------------------------------+----------+
  32. | :ref:`int<class_int>` | :ref:`rings<class_CSGSphere3D_property_rings>` | ``6`` |
  33. +---------------------------------+--------------------------------------------------------------------+----------+
  34. | :ref:`bool<class_bool>` | :ref:`smooth_faces<class_CSGSphere3D_property_smooth_faces>` | ``true`` |
  35. +---------------------------------+--------------------------------------------------------------------+----------+
  36. .. rst-class:: classref-section-separator
  37. ----
  38. .. rst-class:: classref-descriptions-group
  39. Property Descriptions
  40. ---------------------
  41. .. _class_CSGSphere3D_property_material:
  42. .. rst-class:: classref-property
  43. :ref:`Material<class_Material>` **material** :ref:`🔗<class_CSGSphere3D_property_material>`
  44. .. rst-class:: classref-property-setget
  45. - |void| **set_material**\ (\ value\: :ref:`Material<class_Material>`\ )
  46. - :ref:`Material<class_Material>` **get_material**\ (\ )
  47. The material used to render the sphere.
  48. .. rst-class:: classref-item-separator
  49. ----
  50. .. _class_CSGSphere3D_property_radial_segments:
  51. .. rst-class:: classref-property
  52. :ref:`int<class_int>` **radial_segments** = ``12`` :ref:`🔗<class_CSGSphere3D_property_radial_segments>`
  53. .. rst-class:: classref-property-setget
  54. - |void| **set_radial_segments**\ (\ value\: :ref:`int<class_int>`\ )
  55. - :ref:`int<class_int>` **get_radial_segments**\ (\ )
  56. Number of vertical slices for the sphere.
  57. .. rst-class:: classref-item-separator
  58. ----
  59. .. _class_CSGSphere3D_property_radius:
  60. .. rst-class:: classref-property
  61. :ref:`float<class_float>` **radius** = ``0.5`` :ref:`🔗<class_CSGSphere3D_property_radius>`
  62. .. rst-class:: classref-property-setget
  63. - |void| **set_radius**\ (\ value\: :ref:`float<class_float>`\ )
  64. - :ref:`float<class_float>` **get_radius**\ (\ )
  65. Radius of the sphere.
  66. .. rst-class:: classref-item-separator
  67. ----
  68. .. _class_CSGSphere3D_property_rings:
  69. .. rst-class:: classref-property
  70. :ref:`int<class_int>` **rings** = ``6`` :ref:`🔗<class_CSGSphere3D_property_rings>`
  71. .. rst-class:: classref-property-setget
  72. - |void| **set_rings**\ (\ value\: :ref:`int<class_int>`\ )
  73. - :ref:`int<class_int>` **get_rings**\ (\ )
  74. Number of horizontal slices for the sphere.
  75. .. rst-class:: classref-item-separator
  76. ----
  77. .. _class_CSGSphere3D_property_smooth_faces:
  78. .. rst-class:: classref-property
  79. :ref:`bool<class_bool>` **smooth_faces** = ``true`` :ref:`🔗<class_CSGSphere3D_property_smooth_faces>`
  80. .. rst-class:: classref-property-setget
  81. - |void| **set_smooth_faces**\ (\ value\: :ref:`bool<class_bool>`\ )
  82. - :ref:`bool<class_bool>` **get_smooth_faces**\ (\ )
  83. If ``true`` the normals of the sphere are set to give a smooth effect making the sphere seem rounded. If ``false`` the sphere will have a flat shaded look.
  84. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  85. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  86. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  87. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  88. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  89. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  90. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  91. .. |void| replace:: :abbr:`void (No return value.)`