class_camerafeed.rst 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/CameraFeed.xml.
  6. .. _class_CameraFeed:
  7. CameraFeed
  8. ==========
  9. **Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. A camera feed gives you access to a single physical camera attached to your device.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. 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>`.
  15. \ **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.
  16. .. rst-class:: classref-reftable-group
  17. Properties
  18. ----------
  19. .. table::
  20. :widths: auto
  21. +---------------------------------------+-----------------------------------------------------------------+------------------------------------+
  22. | :ref:`bool<class_bool>` | :ref:`feed_is_active<class_CameraFeed_property_feed_is_active>` | ``false`` |
  23. +---------------------------------------+-----------------------------------------------------------------+------------------------------------+
  24. | :ref:`Transform2D<class_Transform2D>` | :ref:`feed_transform<class_CameraFeed_property_feed_transform>` | ``Transform2D(1, 0, 0, -1, 0, 1)`` |
  25. +---------------------------------------+-----------------------------------------------------------------+------------------------------------+
  26. .. rst-class:: classref-reftable-group
  27. Methods
  28. -------
  29. .. table::
  30. :widths: auto
  31. +---------------------------------------------------+-------------------------------------------------------------------------------+
  32. | :ref:`FeedDataType<enum_CameraFeed_FeedDataType>` | :ref:`get_datatype<class_CameraFeed_method_get_datatype>` **(** **)** |const| |
  33. +---------------------------------------------------+-------------------------------------------------------------------------------+
  34. | :ref:`int<class_int>` | :ref:`get_id<class_CameraFeed_method_get_id>` **(** **)** |const| |
  35. +---------------------------------------------------+-------------------------------------------------------------------------------+
  36. | :ref:`String<class_String>` | :ref:`get_name<class_CameraFeed_method_get_name>` **(** **)** |const| |
  37. +---------------------------------------------------+-------------------------------------------------------------------------------+
  38. | :ref:`FeedPosition<enum_CameraFeed_FeedPosition>` | :ref:`get_position<class_CameraFeed_method_get_position>` **(** **)** |const| |
  39. +---------------------------------------------------+-------------------------------------------------------------------------------+
  40. .. rst-class:: classref-section-separator
  41. ----
  42. .. rst-class:: classref-descriptions-group
  43. Enumerations
  44. ------------
  45. .. _enum_CameraFeed_FeedDataType:
  46. .. rst-class:: classref-enumeration
  47. enum **FeedDataType**:
  48. .. _class_CameraFeed_constant_FEED_NOIMAGE:
  49. .. rst-class:: classref-enumeration-constant
  50. :ref:`FeedDataType<enum_CameraFeed_FeedDataType>` **FEED_NOIMAGE** = ``0``
  51. No image set for the feed.
  52. .. _class_CameraFeed_constant_FEED_RGB:
  53. .. rst-class:: classref-enumeration-constant
  54. :ref:`FeedDataType<enum_CameraFeed_FeedDataType>` **FEED_RGB** = ``1``
  55. Feed supplies RGB images.
  56. .. _class_CameraFeed_constant_FEED_YCBCR:
  57. .. rst-class:: classref-enumeration-constant
  58. :ref:`FeedDataType<enum_CameraFeed_FeedDataType>` **FEED_YCBCR** = ``2``
  59. Feed supplies YCbCr images that need to be converted to RGB.
  60. .. _class_CameraFeed_constant_FEED_YCBCR_SEP:
  61. .. rst-class:: classref-enumeration-constant
  62. :ref:`FeedDataType<enum_CameraFeed_FeedDataType>` **FEED_YCBCR_SEP** = ``3``
  63. Feed supplies separate Y and CbCr images that need to be combined and converted to RGB.
  64. .. rst-class:: classref-item-separator
  65. ----
  66. .. _enum_CameraFeed_FeedPosition:
  67. .. rst-class:: classref-enumeration
  68. enum **FeedPosition**:
  69. .. _class_CameraFeed_constant_FEED_UNSPECIFIED:
  70. .. rst-class:: classref-enumeration-constant
  71. :ref:`FeedPosition<enum_CameraFeed_FeedPosition>` **FEED_UNSPECIFIED** = ``0``
  72. Unspecified position.
  73. .. _class_CameraFeed_constant_FEED_FRONT:
  74. .. rst-class:: classref-enumeration-constant
  75. :ref:`FeedPosition<enum_CameraFeed_FeedPosition>` **FEED_FRONT** = ``1``
  76. Camera is mounted at the front of the device.
  77. .. _class_CameraFeed_constant_FEED_BACK:
  78. .. rst-class:: classref-enumeration-constant
  79. :ref:`FeedPosition<enum_CameraFeed_FeedPosition>` **FEED_BACK** = ``2``
  80. Camera is mounted at the back of the device.
  81. .. rst-class:: classref-section-separator
  82. ----
  83. .. rst-class:: classref-descriptions-group
  84. Property Descriptions
  85. ---------------------
  86. .. _class_CameraFeed_property_feed_is_active:
  87. .. rst-class:: classref-property
  88. :ref:`bool<class_bool>` **feed_is_active** = ``false``
  89. .. rst-class:: classref-property-setget
  90. - void **set_active** **(** :ref:`bool<class_bool>` value **)**
  91. - :ref:`bool<class_bool>` **is_active** **(** **)**
  92. If ``true``, the feed is active.
  93. .. rst-class:: classref-item-separator
  94. ----
  95. .. _class_CameraFeed_property_feed_transform:
  96. .. rst-class:: classref-property
  97. :ref:`Transform2D<class_Transform2D>` **feed_transform** = ``Transform2D(1, 0, 0, -1, 0, 1)``
  98. .. rst-class:: classref-property-setget
  99. - void **set_transform** **(** :ref:`Transform2D<class_Transform2D>` value **)**
  100. - :ref:`Transform2D<class_Transform2D>` **get_transform** **(** **)**
  101. The transform applied to the camera's image.
  102. .. rst-class:: classref-section-separator
  103. ----
  104. .. rst-class:: classref-descriptions-group
  105. Method Descriptions
  106. -------------------
  107. .. _class_CameraFeed_method_get_datatype:
  108. .. rst-class:: classref-method
  109. :ref:`FeedDataType<enum_CameraFeed_FeedDataType>` **get_datatype** **(** **)** |const|
  110. Returns feed image data type.
  111. .. rst-class:: classref-item-separator
  112. ----
  113. .. _class_CameraFeed_method_get_id:
  114. .. rst-class:: classref-method
  115. :ref:`int<class_int>` **get_id** **(** **)** |const|
  116. Returns the unique ID for this feed.
  117. .. rst-class:: classref-item-separator
  118. ----
  119. .. _class_CameraFeed_method_get_name:
  120. .. rst-class:: classref-method
  121. :ref:`String<class_String>` **get_name** **(** **)** |const|
  122. Returns the camera's name.
  123. .. rst-class:: classref-item-separator
  124. ----
  125. .. _class_CameraFeed_method_get_position:
  126. .. rst-class:: classref-method
  127. :ref:`FeedPosition<enum_CameraFeed_FeedPosition>` **get_position** **(** **)** |const|
  128. Returns the position of camera on the device.
  129. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  130. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  131. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  132. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  133. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  134. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  135. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`