class_visualinstance.rst 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the VisualInstance.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_VisualInstance:
  6. VisualInstance
  7. ==============
  8. **Inherits:** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. **Inherited By:** :ref:`BakedLightmap<class_BakedLightmap>`, :ref:`CSGShape<class_CSGShape>`, :ref:`GIProbe<class_GIProbe>`, :ref:`GeometryInstance<class_GeometryInstance>`, :ref:`Light<class_Light>`, :ref:`ReflectionProbe<class_ReflectionProbe>`, :ref:`RootMotionView<class_RootMotionView>`
  10. **Category:** Core
  11. Brief Description
  12. -----------------
  13. Properties
  14. ----------
  15. +-----------------------+-----------------------------------------------------+
  16. | :ref:`int<class_int>` | :ref:`layers<class_VisualInstance_property_layers>` |
  17. +-----------------------+-----------------------------------------------------+
  18. Methods
  19. -------
  20. +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`AABB<class_AABB>` | :ref:`get_aabb<class_VisualInstance_method_get_aabb>` **(** **)** const |
  22. +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`RID<class_RID>` | :ref:`get_base<class_VisualInstance_method_get_base>` **(** **)** const |
  24. +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`RID<class_RID>` | :ref:`get_instance<class_VisualInstance_method_get_instance>` **(** **)** const |
  26. +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`bool<class_bool>` | :ref:`get_layer_mask_bit<class_VisualInstance_method_get_layer_mask_bit>` **(** :ref:`int<class_int>` layer **)** const |
  28. +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`AABB<class_AABB>` | :ref:`get_transformed_aabb<class_VisualInstance_method_get_transformed_aabb>` **(** **)** const |
  30. +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | void | :ref:`set_base<class_VisualInstance_method_set_base>` **(** :ref:`RID<class_RID>` base **)** |
  32. +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | void | :ref:`set_layer_mask_bit<class_VisualInstance_method_set_layer_mask_bit>` **(** :ref:`int<class_int>` layer, :ref:`bool<class_bool>` enabled **)** |
  34. +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  35. Property Descriptions
  36. ---------------------
  37. .. _class_VisualInstance_property_layers:
  38. - :ref:`int<class_int>` **layers**
  39. +----------+-----------------------+
  40. | *Setter* | set_layer_mask(value) |
  41. +----------+-----------------------+
  42. | *Getter* | get_layer_mask() |
  43. +----------+-----------------------+
  44. The render layer(s) this VisualInstance is drawn on.
  45. This object will only be visible for :ref:`Camera<class_Camera>`\ s whose cull mask includes the render object this VisualInstance is set to.
  46. Method Descriptions
  47. -------------------
  48. .. _class_VisualInstance_method_get_aabb:
  49. - :ref:`AABB<class_AABB>` **get_aabb** **(** **)** const
  50. Returns the :ref:`AABB<class_AABB>` (also known as the bounding box) for this VisualInstance.
  51. ----
  52. .. _class_VisualInstance_method_get_base:
  53. - :ref:`RID<class_RID>` **get_base** **(** **)** const
  54. ----
  55. .. _class_VisualInstance_method_get_instance:
  56. - :ref:`RID<class_RID>` **get_instance** **(** **)** const
  57. ----
  58. .. _class_VisualInstance_method_get_layer_mask_bit:
  59. - :ref:`bool<class_bool>` **get_layer_mask_bit** **(** :ref:`int<class_int>` layer **)** const
  60. ----
  61. .. _class_VisualInstance_method_get_transformed_aabb:
  62. - :ref:`AABB<class_AABB>` **get_transformed_aabb** **(** **)** const
  63. Returns the transformed :ref:`AABB<class_AABB>` (also known as the bounding box) for this VisualInstance.
  64. Transformed in this case means the :ref:`AABB<class_AABB>` plus the position, rotation, and scale of the :ref:`Spatial<class_Spatial>`\ s :ref:`Transform<class_Transform>`
  65. ----
  66. .. _class_VisualInstance_method_set_base:
  67. - void **set_base** **(** :ref:`RID<class_RID>` base **)**
  68. Sets the base of the VisualInstance, which changes how the engine handles the VisualInstance under the hood.
  69. It is recommended to only use set_base if you know what you're doing.
  70. ----
  71. .. _class_VisualInstance_method_set_layer_mask_bit:
  72. - void **set_layer_mask_bit** **(** :ref:`int<class_int>` layer, :ref:`bool<class_bool>` enabled **)**