classref: Sync with current master branch (f87858a8f)

This commit is contained in:
Yuri Sizov
2022-12-05 20:38:58 +03:00
parent 913ff5e602
commit a7745c4cc4
843 changed files with 158186 additions and 80821 deletions
+131 -53
View File
@@ -14,6 +14,8 @@ CameraFeed
A camera feed gives you access to a single physical camera attached to your device.
.. rst-class:: classref-introduction-group
Description
-----------
@@ -21,132 +23,208 @@ A camera feed gives you access to a single physical camera attached to your devi
\ **Note:** Many cameras will return YCbCr images which are split into two textures and need to be combined in a shader. Godot does this automatically for you if you set the environment to show the camera image in the background.
.. rst-class:: classref-reftable-group
Properties
----------
+---------------------------------------+-----------------------------------------------------------------+------------------------------------+
| :ref:`bool<class_bool>` | :ref:`feed_is_active<class_CameraFeed_property_feed_is_active>` | ``false`` |
+---------------------------------------+-----------------------------------------------------------------+------------------------------------+
| :ref:`Transform2D<class_Transform2D>` | :ref:`feed_transform<class_CameraFeed_property_feed_transform>` | ``Transform2D(1, 0, 0, -1, 0, 1)`` |
+---------------------------------------+-----------------------------------------------------------------+------------------------------------+
.. table::
:widths: auto
+---------------------------------------+-----------------------------------------------------------------+------------------------------------+
| :ref:`bool<class_bool>` | :ref:`feed_is_active<class_CameraFeed_property_feed_is_active>` | ``false`` |
+---------------------------------------+-----------------------------------------------------------------+------------------------------------+
| :ref:`Transform2D<class_Transform2D>` | :ref:`feed_transform<class_CameraFeed_property_feed_transform>` | ``Transform2D(1, 0, 0, -1, 0, 1)`` |
+---------------------------------------+-----------------------------------------------------------------+------------------------------------+
.. rst-class:: classref-reftable-group
Methods
-------
+---------------------------------------------------+-------------------------------------------------------------------------------+
| :ref:`FeedDataType<enum_CameraFeed_FeedDataType>` | :ref:`get_datatype<class_CameraFeed_method_get_datatype>` **(** **)** |const| |
+---------------------------------------------------+-------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_id<class_CameraFeed_method_get_id>` **(** **)** |const| |
+---------------------------------------------------+-------------------------------------------------------------------------------+
| :ref:`String<class_String>` | :ref:`get_name<class_CameraFeed_method_get_name>` **(** **)** |const| |
+---------------------------------------------------+-------------------------------------------------------------------------------+
| :ref:`FeedPosition<enum_CameraFeed_FeedPosition>` | :ref:`get_position<class_CameraFeed_method_get_position>` **(** **)** |const| |
+---------------------------------------------------+-------------------------------------------------------------------------------+
.. table::
:widths: auto
+---------------------------------------------------+-------------------------------------------------------------------------------+
| :ref:`FeedDataType<enum_CameraFeed_FeedDataType>` | :ref:`get_datatype<class_CameraFeed_method_get_datatype>` **(** **)** |const| |
+---------------------------------------------------+-------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_id<class_CameraFeed_method_get_id>` **(** **)** |const| |
+---------------------------------------------------+-------------------------------------------------------------------------------+
| :ref:`String<class_String>` | :ref:`get_name<class_CameraFeed_method_get_name>` **(** **)** |const| |
+---------------------------------------------------+-------------------------------------------------------------------------------+
| :ref:`FeedPosition<enum_CameraFeed_FeedPosition>` | :ref:`get_position<class_CameraFeed_method_get_position>` **(** **)** |const| |
+---------------------------------------------------+-------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Enumerations
------------
.. _enum_CameraFeed_FeedDataType:
.. _class_CameraFeed_constant_FEED_NOIMAGE:
.. _class_CameraFeed_constant_FEED_RGB:
.. _class_CameraFeed_constant_FEED_YCBCR:
.. _class_CameraFeed_constant_FEED_YCBCR_SEP:
.. rst-class:: classref-enumeration
enum **FeedDataType**:
- **FEED_NOIMAGE** = **0** --- No image set for the feed.
.. _class_CameraFeed_constant_FEED_NOIMAGE:
- **FEED_RGB** = **1** --- Feed supplies RGB images.
.. rst-class:: classref-enumeration-constant
- **FEED_YCBCR** = **2** --- Feed supplies YCbCr images that need to be converted to RGB.
:ref:`FeedDataType<enum_CameraFeed_FeedDataType>` **FEED_NOIMAGE** = ``0``
- **FEED_YCBCR_SEP** = **3** --- Feed supplies separate Y and CbCr images that need to be combined and converted to RGB.
No image set for the feed.
.. _class_CameraFeed_constant_FEED_RGB:
.. rst-class:: classref-enumeration-constant
:ref:`FeedDataType<enum_CameraFeed_FeedDataType>` **FEED_RGB** = ``1``
Feed supplies RGB images.
.. _class_CameraFeed_constant_FEED_YCBCR:
.. rst-class:: classref-enumeration-constant
:ref:`FeedDataType<enum_CameraFeed_FeedDataType>` **FEED_YCBCR** = ``2``
Feed supplies YCbCr images that need to be converted to RGB.
.. _class_CameraFeed_constant_FEED_YCBCR_SEP:
.. rst-class:: classref-enumeration-constant
:ref:`FeedDataType<enum_CameraFeed_FeedDataType>` **FEED_YCBCR_SEP** = ``3``
Feed supplies separate Y and CbCr images that need to be combined and converted to RGB.
.. rst-class:: classref-item-separator
----
.. _enum_CameraFeed_FeedPosition:
.. _class_CameraFeed_constant_FEED_UNSPECIFIED:
.. _class_CameraFeed_constant_FEED_FRONT:
.. _class_CameraFeed_constant_FEED_BACK:
.. rst-class:: classref-enumeration
enum **FeedPosition**:
- **FEED_UNSPECIFIED** = **0** --- Unspecified position.
.. _class_CameraFeed_constant_FEED_UNSPECIFIED:
- **FEED_FRONT** = **1** --- Camera is mounted at the front of the device.
.. rst-class:: classref-enumeration-constant
- **FEED_BACK** = **2** --- Camera is mounted at the back of the device.
:ref:`FeedPosition<enum_CameraFeed_FeedPosition>` **FEED_UNSPECIFIED** = ``0``
Unspecified position.
.. _class_CameraFeed_constant_FEED_FRONT:
.. rst-class:: classref-enumeration-constant
:ref:`FeedPosition<enum_CameraFeed_FeedPosition>` **FEED_FRONT** = ``1``
Camera is mounted at the front of the device.
.. _class_CameraFeed_constant_FEED_BACK:
.. rst-class:: classref-enumeration-constant
:ref:`FeedPosition<enum_CameraFeed_FeedPosition>` **FEED_BACK** = ``2``
Camera is mounted at the back of the device.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Property Descriptions
---------------------
.. _class_CameraFeed_property_feed_is_active:
- :ref:`bool<class_bool>` **feed_is_active**
.. rst-class:: classref-property
+-----------+-------------------+
| *Default* | ``false`` |
+-----------+-------------------+
| *Setter* | set_active(value) |
+-----------+-------------------+
| *Getter* | is_active() |
+-----------+-------------------+
:ref:`bool<class_bool>` **feed_is_active** = ``false``
.. rst-class:: classref-property-setget
- void **set_active** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **is_active** **(** **)**
If ``true``, the feed is active.
.. rst-class:: classref-item-separator
----
.. _class_CameraFeed_property_feed_transform:
- :ref:`Transform2D<class_Transform2D>` **feed_transform**
.. rst-class:: classref-property
+-----------+------------------------------------+
| *Default* | ``Transform2D(1, 0, 0, -1, 0, 1)`` |
+-----------+------------------------------------+
| *Setter* | set_transform(value) |
+-----------+------------------------------------+
| *Getter* | get_transform() |
+-----------+------------------------------------+
:ref:`Transform2D<class_Transform2D>` **feed_transform** = ``Transform2D(1, 0, 0, -1, 0, 1)``
.. rst-class:: classref-property-setget
- void **set_transform** **(** :ref:`Transform2D<class_Transform2D>` value **)**
- :ref:`Transform2D<class_Transform2D>` **get_transform** **(** **)**
The transform applied to the camera's image.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Method Descriptions
-------------------
.. _class_CameraFeed_method_get_datatype:
- :ref:`FeedDataType<enum_CameraFeed_FeedDataType>` **get_datatype** **(** **)** |const|
.. rst-class:: classref-method
:ref:`FeedDataType<enum_CameraFeed_FeedDataType>` **get_datatype** **(** **)** |const|
Returns feed image data type.
.. rst-class:: classref-item-separator
----
.. _class_CameraFeed_method_get_id:
- :ref:`int<class_int>` **get_id** **(** **)** |const|
.. rst-class:: classref-method
:ref:`int<class_int>` **get_id** **(** **)** |const|
Returns the unique ID for this feed.
.. rst-class:: classref-item-separator
----
.. _class_CameraFeed_method_get_name:
- :ref:`String<class_String>` **get_name** **(** **)** |const|
.. rst-class:: classref-method
:ref:`String<class_String>` **get_name** **(** **)** |const|
Returns the camera's name.
.. rst-class:: classref-item-separator
----
.. _class_CameraFeed_method_get_position:
- :ref:`FeedPosition<enum_CameraFeed_FeedPosition>` **get_position** **(** **)** |const|
.. rst-class:: classref-method
:ref:`FeedPosition<enum_CameraFeed_FeedPosition>` **get_position** **(** **)** |const|
Returns the position of camera on the device.