class_lod.rst 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/LOD.xml.
  6. .. _class_LOD:
  7. LOD
  8. ===
  9. **Inherits:** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. Provides discrete level of detail.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Automatically hides and shows :ref:`Spatial<class_Spatial>` children depending on the distance from the closest :ref:`Camera<class_Camera>` to the **LOD** node. Child nodes that don't inherit from :ref:`Spatial<class_Spatial>` are ignored by the LOD system.
  15. Children are shown in order with the first children shown when closest to the :ref:`Camera<class_Camera>`, and the latter children shown when further away.
  16. The threshold distances for changes are determined by :ref:`Spatial.lod_range<class_Spatial_property_lod_range>`.
  17. For example, a first child with a range of ``2`` will be shown from distance 0 to 2. A second child with a range of ``5`` will be shown from distance 2 to 7, etc.
  18. .. rst-class:: classref-reftable-group
  19. Properties
  20. ----------
  21. .. table::
  22. :widths: auto
  23. +---------------------------+------------------------------------------------------+---------+
  24. | :ref:`float<class_float>` | :ref:`hysteresis<class_LOD_property_hysteresis>` | ``1.0`` |
  25. +---------------------------+------------------------------------------------------+---------+
  26. | :ref:`int<class_int>` | :ref:`lod_priority<class_LOD_property_lod_priority>` | ``0`` |
  27. +---------------------------+------------------------------------------------------+---------+
  28. .. rst-class:: classref-section-separator
  29. ----
  30. .. rst-class:: classref-descriptions-group
  31. Property Descriptions
  32. ---------------------
  33. .. _class_LOD_property_hysteresis:
  34. .. rst-class:: classref-property
  35. :ref:`float<class_float>` **hysteresis** = ``1.0``
  36. .. rst-class:: classref-property-setget
  37. - void **set_hysteresis** **(** :ref:`float<class_float>` value **)**
  38. - :ref:`float<class_float>` **get_hysteresis** **(** **)**
  39. To prevent flickering at borders, a hysteresis distance will be added to threshold distances when the object is moving away from the :ref:`Camera<class_Camera>`.
  40. .. rst-class:: classref-item-separator
  41. ----
  42. .. _class_LOD_property_lod_priority:
  43. .. rst-class:: classref-property
  44. :ref:`int<class_int>` **lod_priority** = ``0``
  45. .. rst-class:: classref-property-setget
  46. - void **set_lod_priority** **(** :ref:`int<class_int>` value **)**
  47. - :ref:`int<class_int>` **get_lod_priority** **(** **)**
  48. Determines the rate at which level of detail will be updated.
  49. Higher priorities will update faster, but use more CPU.
  50. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  51. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  52. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  53. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`