12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- :github_url: hide
- .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
- .. DO NOT EDIT THIS FILE, but the OccluderShapeSphere.xml source instead.
- .. The source is found in doc/classes or modules/<name>/doc_classes.
- .. _class_OccluderShapeSphere:
- OccluderShapeSphere
- ===================
- **Inherits:** :ref:`OccluderShape<class_OccluderShape>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
- Spherical occlusion primitive for use with the :ref:`Occluder<class_Occluder>` node.
- Description
- -----------
- :ref:`OccluderShape<class_OccluderShape>`\ s are resources used by :ref:`Occluder<class_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.
- Properties
- ----------
- +---------------------------+------------------------------------------------------------+----------+
- | :ref:`Array<class_Array>` | :ref:`spheres<class_OccluderShapeSphere_property_spheres>` | ``[ ]`` |
- +---------------------------+------------------------------------------------------------+----------+
- Methods
- -------
- +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_sphere_position<class_OccluderShapeSphere_method_set_sphere_position>` **(** :ref:`int<class_int>` index, :ref:`Vector3<class_Vector3>` position **)** |
- +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_sphere_radius<class_OccluderShapeSphere_method_set_sphere_radius>` **(** :ref:`int<class_int>` index, :ref:`float<class_float>` radius **)** |
- +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- Property Descriptions
- ---------------------
- .. _class_OccluderShapeSphere_property_spheres:
- - :ref:`Array<class_Array>` **spheres**
- +-----------+--------------------+
- | *Default* | ``[ ]`` |
- +-----------+--------------------+
- | *Setter* | set_spheres(value) |
- +-----------+--------------------+
- | *Getter* | get_spheres() |
- +-----------+--------------------+
- 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.
- Method Descriptions
- -------------------
- .. _class_OccluderShapeSphere_method_set_sphere_position:
- - void **set_sphere_position** **(** :ref:`int<class_int>` index, :ref:`Vector3<class_Vector3>` position **)**
- Sets an individual sphere's position.
- ----
- .. _class_OccluderShapeSphere_method_set_sphere_radius:
- - void **set_sphere_radius** **(** :ref:`int<class_int>` index, :ref:`float<class_float>` radius **)**
- Sets an individual sphere's radius.
- .. |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.)`
|