class_occludershapesphere.rst 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the OccluderShapeSphere.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_OccluderShapeSphere:
  6. OccluderShapeSphere
  7. ===================
  8. **Inherits:** :ref:`OccluderShape<class_OccluderShape>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. Spherical occlusion primitive for use with the :ref:`Occluder<class_Occluder>` node.
  10. Description
  11. -----------
  12. :ref:`OccluderShape<class_OccluderShape>`\ s are resources used by :ref:`Occluder<class_Occluder>` nodes, allowing geometric occlusion culling.
  13. This shape can include multiple spheres. These can be created and deleted either in the Editor inspector or by calling ``set_spheres``. The sphere positions can be set by dragging the handle in the Editor viewport. The radius can be set with the smaller handle.
  14. Properties
  15. ----------
  16. +---------------------------+------------------------------------------------------------+----------+
  17. | :ref:`Array<class_Array>` | :ref:`spheres<class_OccluderShapeSphere_property_spheres>` | ``[ ]`` |
  18. +---------------------------+------------------------------------------------------------+----------+
  19. Methods
  20. -------
  21. +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  22. | void | :ref:`set_sphere_position<class_OccluderShapeSphere_method_set_sphere_position>` **(** :ref:`int<class_int>` index, :ref:`Vector3<class_Vector3>` position **)** |
  23. +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | void | :ref:`set_sphere_radius<class_OccluderShapeSphere_method_set_sphere_radius>` **(** :ref:`int<class_int>` index, :ref:`float<class_float>` radius **)** |
  25. +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. Property Descriptions
  27. ---------------------
  28. .. _class_OccluderShapeSphere_property_spheres:
  29. - :ref:`Array<class_Array>` **spheres**
  30. +-----------+--------------------+
  31. | *Default* | ``[ ]`` |
  32. +-----------+--------------------+
  33. | *Setter* | set_spheres(value) |
  34. +-----------+--------------------+
  35. | *Getter* | get_spheres() |
  36. +-----------+--------------------+
  37. The sphere data can be accessed as an array of :ref:`Plane<class_Plane>`\ s. The position of each sphere is stored in the ``normal``, and the radius is stored in the ``d`` value of the plane.
  38. Method Descriptions
  39. -------------------
  40. .. _class_OccluderShapeSphere_method_set_sphere_position:
  41. - void **set_sphere_position** **(** :ref:`int<class_int>` index, :ref:`Vector3<class_Vector3>` position **)**
  42. Sets an individual sphere's position.
  43. ----
  44. .. _class_OccluderShapeSphere_method_set_sphere_radius:
  45. - void **set_sphere_radius** **(** :ref:`int<class_int>` index, :ref:`float<class_float>` radius **)**
  46. Sets an individual sphere's radius.
  47. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  48. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  49. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`