123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238 |
- :github_url: hide
- .. DO NOT EDIT THIS FILE!!!
- .. Generated automatically from Godot engine sources.
- .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
- .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/CameraFeed.xml.
- .. _class_CameraFeed:
- CameraFeed
- ==========
- **Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
- A camera feed gives you access to a single physical camera attached to your device.
- .. rst-class:: classref-introduction-group
- Description
- -----------
- A camera feed gives you access to a single physical camera attached to your device. When enabled, Godot will start capturing frames from the camera which can then be used. See also :ref:`CameraServer<class_CameraServer>`.
- \ **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
- ----------
- .. 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
- -------
- .. 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:
- .. rst-class:: classref-enumeration
- enum **FeedDataType**:
- .. _class_CameraFeed_constant_FEED_NOIMAGE:
- .. rst-class:: classref-enumeration-constant
- :ref:`FeedDataType<enum_CameraFeed_FeedDataType>` **FEED_NOIMAGE** = ``0``
- 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:
- .. rst-class:: classref-enumeration
- enum **FeedPosition**:
- .. _class_CameraFeed_constant_FEED_UNSPECIFIED:
- .. rst-class:: classref-enumeration-constant
- :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:
- .. rst-class:: classref-property
- :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:
- .. rst-class:: classref-property
- :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:
- .. 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:
- .. 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:
- .. 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:
- .. rst-class:: classref-method
- :ref:`FeedPosition<enum_CameraFeed_FeedPosition>` **get_position** **(** **)** |const|
- Returns the position of camera on the device.
- .. |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.)`
- .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
- .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
- .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
- .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
- .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|