mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
classref: Sync with current master branch (f87858a8f)
This commit is contained in:
@@ -12,138 +12,197 @@ RID
|
||||
|
||||
Handle for a :ref:`Resource<class_Resource>`'s unique ID.
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
The RID type is used to access the unique integer ID of a resource. They are opaque, which means they do not grant access to the associated resource by themselves. They are used by and with the low-level Server classes such as :ref:`RenderingServer<class_RenderingServer>`.
|
||||
The RID :ref:`Variant<class_Variant>` type is used to access a low-level resource by its unique ID. RIDs are opaque, which means they do not grant access to the resource by themselves. They are used by the low-level server classes, such as :ref:`DisplayServer<class_DisplayServer>`, :ref:`RenderingServer<class_RenderingServer>`, :ref:`TextServer<class_TextServer>`, etc.
|
||||
|
||||
A low-level resource may correspond to a high-level :ref:`Resource<class_Resource>`, such as :ref:`Texture<class_Texture>` or :ref:`Mesh<class_Mesh>`.
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Constructors
|
||||
------------
|
||||
|
||||
+-----------------------+------------------------------------------------------------------------------+
|
||||
| :ref:`RID<class_RID>` | :ref:`RID<class_RID_constructor_RID>` **(** **)** |
|
||||
+-----------------------+------------------------------------------------------------------------------+
|
||||
| :ref:`RID<class_RID>` | :ref:`RID<class_RID_constructor_RID>` **(** :ref:`RID<class_RID>` from **)** |
|
||||
+-----------------------+------------------------------------------------------------------------------+
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-----------------------+------------------------------------------------------------------------------+
|
||||
| :ref:`RID<class_RID>` | :ref:`RID<class_RID_constructor_RID>` **(** **)** |
|
||||
+-----------------------+------------------------------------------------------------------------------+
|
||||
| :ref:`RID<class_RID>` | :ref:`RID<class_RID_constructor_RID>` **(** :ref:`RID<class_RID>` from **)** |
|
||||
+-----------------------+------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
|
||||
+-------------------------+----------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_id<class_RID_method_get_id>` **(** **)** |const| |
|
||||
+-------------------------+----------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_valid<class_RID_method_is_valid>` **(** **)** |const| |
|
||||
+-------------------------+----------------------------------------------------------------+
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-------------------------+----------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_id<class_RID_method_get_id>` **(** **)** |const| |
|
||||
+-------------------------+----------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_valid<class_RID_method_is_valid>` **(** **)** |const| |
|
||||
+-------------------------+----------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Operators
|
||||
---------
|
||||
|
||||
+-------------------------+------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`operator !=<class_RID_operator_neq_bool>` **(** :ref:`RID<class_RID>` right **)** |
|
||||
+-------------------------+------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`operator \<<class_RID_operator_lt_bool>` **(** :ref:`RID<class_RID>` right **)** |
|
||||
+-------------------------+------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`operator \<=<class_RID_operator_lte_bool>` **(** :ref:`RID<class_RID>` right **)** |
|
||||
+-------------------------+------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`operator ==<class_RID_operator_eq_bool>` **(** :ref:`RID<class_RID>` right **)** |
|
||||
+-------------------------+------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`operator ><class_RID_operator_gt_bool>` **(** :ref:`RID<class_RID>` right **)** |
|
||||
+-------------------------+------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`operator >=<class_RID_operator_gte_bool>` **(** :ref:`RID<class_RID>` right **)** |
|
||||
+-------------------------+------------------------------------------------------------------------------------------+
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-------------------------+-----------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`operator !=<class_RID_operator_neq_RID>` **(** :ref:`RID<class_RID>` right **)** |
|
||||
+-------------------------+-----------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`operator \<<class_RID_operator_lt_RID>` **(** :ref:`RID<class_RID>` right **)** |
|
||||
+-------------------------+-----------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`operator \<=<class_RID_operator_lte_RID>` **(** :ref:`RID<class_RID>` right **)** |
|
||||
+-------------------------+-----------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`operator ==<class_RID_operator_eq_RID>` **(** :ref:`RID<class_RID>` right **)** |
|
||||
+-------------------------+-----------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`operator ><class_RID_operator_gt_RID>` **(** :ref:`RID<class_RID>` right **)** |
|
||||
+-------------------------+-----------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`operator >=<class_RID_operator_gte_RID>` **(** :ref:`RID<class_RID>` right **)** |
|
||||
+-------------------------+-----------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
----
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Constructor Descriptions
|
||||
------------------------
|
||||
|
||||
.. _class_RID_constructor_RID:
|
||||
|
||||
- :ref:`RID<class_RID>` **RID** **(** **)**
|
||||
.. rst-class:: classref-constructor
|
||||
|
||||
Constructs an empty ``RID`` with the invalid ID ``0``.
|
||||
:ref:`RID<class_RID>` **RID** **(** **)**
|
||||
|
||||
Constructs an empty **RID** with the invalid ID ``0``.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
- :ref:`RID<class_RID>` **RID** **(** :ref:`RID<class_RID>` from **)**
|
||||
.. rst-class:: classref-constructor
|
||||
|
||||
Constructs a ``RID`` as a copy of the given ``RID``.
|
||||
:ref:`RID<class_RID>` **RID** **(** :ref:`RID<class_RID>` from **)**
|
||||
|
||||
Constructs a **RID** as a copy of the given **RID**.
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
----
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
|
||||
.. _class_RID_method_get_id:
|
||||
|
||||
- :ref:`int<class_int>` **get_id** **(** **)** |const|
|
||||
.. rst-class:: classref-method
|
||||
|
||||
Returns the ID of the referenced resource.
|
||||
:ref:`int<class_int>` **get_id** **(** **)** |const|
|
||||
|
||||
Returns the ID of the referenced low-level resource.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_RID_method_is_valid:
|
||||
|
||||
- :ref:`bool<class_bool>` **is_valid** **(** **)** |const|
|
||||
.. rst-class:: classref-method
|
||||
|
||||
Returns ``true`` if ``RID`` is valid.
|
||||
:ref:`bool<class_bool>` **is_valid** **(** **)** |const|
|
||||
|
||||
Returns ``true`` if the **RID** is not ``0``.
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
----
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Operator Descriptions
|
||||
---------------------
|
||||
|
||||
.. _class_RID_operator_neq_bool:
|
||||
.. _class_RID_operator_neq_RID:
|
||||
|
||||
- :ref:`bool<class_bool>` **operator !=** **(** :ref:`RID<class_RID>` right **)**
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
.. container:: contribute
|
||||
:ref:`bool<class_bool>` **operator !=** **(** :ref:`RID<class_RID>` right **)**
|
||||
|
||||
There is currently no description for this operator. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
Returns ``true`` if the **RID**\ s are not equal.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_RID_operator_lt_bool:
|
||||
.. _class_RID_operator_lt_RID:
|
||||
|
||||
- :ref:`bool<class_bool>` **operator <** **(** :ref:`RID<class_RID>` right **)**
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
.. container:: contribute
|
||||
:ref:`bool<class_bool>` **operator <** **(** :ref:`RID<class_RID>` right **)**
|
||||
|
||||
There is currently no description for this operator. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
Returns ``true`` if the **RID**'s ID is less than ``right``'s ID.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_RID_operator_lte_bool:
|
||||
.. _class_RID_operator_lte_RID:
|
||||
|
||||
- :ref:`bool<class_bool>` **operator <=** **(** :ref:`RID<class_RID>` right **)**
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
.. container:: contribute
|
||||
:ref:`bool<class_bool>` **operator <=** **(** :ref:`RID<class_RID>` right **)**
|
||||
|
||||
There is currently no description for this operator. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
Returns ``true`` if the **RID**'s ID is less than or equal to ``right``'s ID.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_RID_operator_eq_bool:
|
||||
.. _class_RID_operator_eq_RID:
|
||||
|
||||
- :ref:`bool<class_bool>` **operator ==** **(** :ref:`RID<class_RID>` right **)**
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
.. container:: contribute
|
||||
:ref:`bool<class_bool>` **operator ==** **(** :ref:`RID<class_RID>` right **)**
|
||||
|
||||
There is currently no description for this operator. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
Returns ``true`` if both **RID**\ s are equal, which means they both refer to the same low-level resource.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_RID_operator_gt_bool:
|
||||
.. _class_RID_operator_gt_RID:
|
||||
|
||||
- :ref:`bool<class_bool>` **operator >** **(** :ref:`RID<class_RID>` right **)**
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
.. container:: contribute
|
||||
:ref:`bool<class_bool>` **operator >** **(** :ref:`RID<class_RID>` right **)**
|
||||
|
||||
There is currently no description for this operator. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
Returns ``true`` if the **RID**'s ID is greater than ``right``'s ID.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_RID_operator_gte_bool:
|
||||
.. _class_RID_operator_gte_RID:
|
||||
|
||||
- :ref:`bool<class_bool>` **operator >=** **(** :ref:`RID<class_RID>` right **)**
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
.. container:: contribute
|
||||
:ref:`bool<class_bool>` **operator >=** **(** :ref:`RID<class_RID>` right **)**
|
||||
|
||||
There is currently no description for this operator. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
Returns ``true`` if the **RID**'s ID is greater than or equal to ``right``'s ID.
|
||||
|
||||
.. |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.)`
|
||||
|
||||
Reference in New Issue
Block a user