class_visibleonscreennotifier3d.rst 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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/doc/classes/VisibleOnScreenNotifier3D.xml.
  6. .. _class_VisibleOnScreenNotifier3D:
  7. VisibleOnScreenNotifier3D
  8. =========================
  9. **Inherits:** :ref:`VisualInstance3D<class_VisualInstance3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`VisibleOnScreenEnabler3D<class_VisibleOnScreenEnabler3D>`
  11. Detects approximately when the node is visible on screen.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. The VisibleOnScreenNotifier3D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a :ref:`Camera3D<class_Camera3D>`'s view.
  16. If you want nodes to be disabled automatically when they exit the screen, use :ref:`VisibleOnScreenEnabler3D<class_VisibleOnScreenEnabler3D>` instead.
  17. \ **Note:** VisibleOnScreenNotifier3D uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. The heuristic is an implementation detail and may change in future versions. If you need precise visibility checking, use another method such as adding an :ref:`Area3D<class_Area3D>` node as a child of a :ref:`Camera3D<class_Camera3D>` node and/or :ref:`Vector3.dot<class_Vector3_method_dot>`.
  18. .. rst-class:: classref-reftable-group
  19. Properties
  20. ----------
  21. .. table::
  22. :widths: auto
  23. +-------------------------+------------------------------------------------------------+-------------------------------+
  24. | :ref:`AABB<class_AABB>` | :ref:`aabb<class_VisibleOnScreenNotifier3D_property_aabb>` | ``AABB(-1, -1, -1, 2, 2, 2)`` |
  25. +-------------------------+------------------------------------------------------------+-------------------------------+
  26. .. rst-class:: classref-reftable-group
  27. Methods
  28. -------
  29. .. table::
  30. :widths: auto
  31. +-------------------------+----------------------------------------------------------------------------------------------+
  32. | :ref:`bool<class_bool>` | :ref:`is_on_screen<class_VisibleOnScreenNotifier3D_method_is_on_screen>` **(** **)** |const| |
  33. +-------------------------+----------------------------------------------------------------------------------------------+
  34. .. rst-class:: classref-section-separator
  35. ----
  36. .. rst-class:: classref-descriptions-group
  37. Signals
  38. -------
  39. .. _class_VisibleOnScreenNotifier3D_signal_screen_entered:
  40. .. rst-class:: classref-signal
  41. **screen_entered** **(** **)**
  42. Emitted when the VisibleOnScreenNotifier3D enters the screen.
  43. .. rst-class:: classref-item-separator
  44. ----
  45. .. _class_VisibleOnScreenNotifier3D_signal_screen_exited:
  46. .. rst-class:: classref-signal
  47. **screen_exited** **(** **)**
  48. Emitted when the VisibleOnScreenNotifier3D exits the screen.
  49. .. rst-class:: classref-section-separator
  50. ----
  51. .. rst-class:: classref-descriptions-group
  52. Property Descriptions
  53. ---------------------
  54. .. _class_VisibleOnScreenNotifier3D_property_aabb:
  55. .. rst-class:: classref-property
  56. :ref:`AABB<class_AABB>` **aabb** = ``AABB(-1, -1, -1, 2, 2, 2)``
  57. .. rst-class:: classref-property-setget
  58. - void **set_aabb** **(** :ref:`AABB<class_AABB>` value **)**
  59. - :ref:`AABB<class_AABB>` **get_aabb** **(** **)**
  60. The VisibleOnScreenNotifier3D's bounding box.
  61. .. rst-class:: classref-section-separator
  62. ----
  63. .. rst-class:: classref-descriptions-group
  64. Method Descriptions
  65. -------------------
  66. .. _class_VisibleOnScreenNotifier3D_method_is_on_screen:
  67. .. rst-class:: classref-method
  68. :ref:`bool<class_bool>` **is_on_screen** **(** **)** |const|
  69. If ``true``, the bounding box is on the screen.
  70. \ **Note:** It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return ``false`` right after it is instantiated, even if it will be on screen in the draw pass.
  71. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  72. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  73. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  74. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  75. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  76. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`