:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/OccluderShapeSphere.xml. .. _class_OccluderShapeSphere: OccluderShapeSphere =================== **Inherits:** :ref:`OccluderShape` **<** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` Spherical occlusion primitive for use with the :ref:`Occluder` node. .. rst-class:: classref-introduction-group Description ----------- :ref:`OccluderShape`\ s are resources used by :ref:`Occluder` nodes, allowing geometric occlusion culling. 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. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +---------------------------+------------------------------------------------------------+-----------------------------+ | :ref:`Array` | :ref:`spheres` | ``[ Plane( 0, 0, 0, 1 ) ]`` | +---------------------------+------------------------------------------------------------+-----------------------------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_sphere_position` **(** :ref:`int` index, :ref:`Vector3` position **)** | +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_sphere_radius` **(** :ref:`int` index, :ref:`float` radius **)** | +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_OccluderShapeSphere_property_spheres: .. rst-class:: classref-property :ref:`Array` **spheres** = ``[ Plane( 0, 0, 0, 1 ) ]`` .. rst-class:: classref-property-setget - void **set_spheres** **(** :ref:`Array` value **)** - :ref:`Array` **get_spheres** **(** **)** The sphere data can be accessed as an array of :ref:`Plane`\ s. The position of each sphere is stored in the ``normal``, and the radius is stored in the ``d`` value of the plane. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_OccluderShapeSphere_method_set_sphere_position: .. rst-class:: classref-method void **set_sphere_position** **(** :ref:`int` index, :ref:`Vector3` position **)** Sets an individual sphere's position. Primarily for use by the editor. .. rst-class:: classref-item-separator ---- .. _class_OccluderShapeSphere_method_set_sphere_radius: .. rst-class:: classref-method void **set_sphere_radius** **(** :ref:`int` index, :ref:`float` radius **)** Sets an individual sphere's radius. Primarily for use by the editor. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`