mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
119 lines
5.5 KiB
ReStructuredText
119 lines
5.5 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
|
|
.. DO NOT EDIT THIS FILE, but the VisualInstance.xml source instead.
|
|
.. The source is found in doc/classes or modules/<name>/doc_classes.
|
|
|
|
.. _class_VisualInstance:
|
|
|
|
VisualInstance
|
|
==============
|
|
|
|
**Inherits:** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
|
|
|
**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>`
|
|
|
|
**Category:** Core
|
|
|
|
Brief Description
|
|
-----------------
|
|
|
|
|
|
|
|
Properties
|
|
----------
|
|
|
|
+-----------------------+-----------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`layers<class_VisualInstance_property_layers>` |
|
|
+-----------------------+-----------------------------------------------------+
|
|
|
|
Methods
|
|
-------
|
|
|
|
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`AABB<class_AABB>` | :ref:`get_aabb<class_VisualInstance_method_get_aabb>` **(** **)** const |
|
|
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`RID<class_RID>` | :ref:`get_base<class_VisualInstance_method_get_base>` **(** **)** const |
|
|
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`RID<class_RID>` | :ref:`get_instance<class_VisualInstance_method_get_instance>` **(** **)** const |
|
|
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`get_layer_mask_bit<class_VisualInstance_method_get_layer_mask_bit>` **(** :ref:`int<class_int>` layer **)** const |
|
|
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`AABB<class_AABB>` | :ref:`get_transformed_aabb<class_VisualInstance_method_get_transformed_aabb>` **(** **)** const |
|
|
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_base<class_VisualInstance_method_set_base>` **(** :ref:`RID<class_RID>` base **)** |
|
|
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_layer_mask_bit<class_VisualInstance_method_set_layer_mask_bit>` **(** :ref:`int<class_int>` layer, :ref:`bool<class_bool>` enabled **)** |
|
|
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
Property Descriptions
|
|
---------------------
|
|
|
|
.. _class_VisualInstance_property_layers:
|
|
|
|
- :ref:`int<class_int>` **layers**
|
|
|
|
+----------+-----------------------+
|
|
| *Setter* | set_layer_mask(value) |
|
|
+----------+-----------------------+
|
|
| *Getter* | get_layer_mask() |
|
|
+----------+-----------------------+
|
|
|
|
The render layer(s) this VisualInstance is drawn on.
|
|
|
|
This object will only be visible for :ref:`Camera<class_Camera>`\ s whose cull mask includes the render object this VisualInstance is set to.
|
|
|
|
Method Descriptions
|
|
-------------------
|
|
|
|
.. _class_VisualInstance_method_get_aabb:
|
|
|
|
- :ref:`AABB<class_AABB>` **get_aabb** **(** **)** const
|
|
|
|
Returns the :ref:`AABB<class_AABB>` (also known as the bounding box) for this VisualInstance.
|
|
|
|
----
|
|
|
|
.. _class_VisualInstance_method_get_base:
|
|
|
|
- :ref:`RID<class_RID>` **get_base** **(** **)** const
|
|
|
|
----
|
|
|
|
.. _class_VisualInstance_method_get_instance:
|
|
|
|
- :ref:`RID<class_RID>` **get_instance** **(** **)** const
|
|
|
|
----
|
|
|
|
.. _class_VisualInstance_method_get_layer_mask_bit:
|
|
|
|
- :ref:`bool<class_bool>` **get_layer_mask_bit** **(** :ref:`int<class_int>` layer **)** const
|
|
|
|
----
|
|
|
|
.. _class_VisualInstance_method_get_transformed_aabb:
|
|
|
|
- :ref:`AABB<class_AABB>` **get_transformed_aabb** **(** **)** const
|
|
|
|
Returns the transformed :ref:`AABB<class_AABB>` (also known as the bounding box) for this VisualInstance.
|
|
|
|
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>`
|
|
|
|
----
|
|
|
|
.. _class_VisualInstance_method_set_base:
|
|
|
|
- void **set_base** **(** :ref:`RID<class_RID>` base **)**
|
|
|
|
Sets the base of the VisualInstance, which changes how the engine handles the VisualInstance under the hood.
|
|
|
|
It is recommended to only use set_base if you know what you're doing.
|
|
|
|
----
|
|
|
|
.. _class_VisualInstance_method_set_layer_mask_bit:
|
|
|
|
- void **set_layer_mask_bit** **(** :ref:`int<class_int>` layer, :ref:`bool<class_bool>` enabled **)**
|
|
|