class_camerafeed.rst 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the CameraFeed.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_CameraFeed:
  5. CameraFeed
  6. ==========
  7. **Inherits:** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. A camera feed gives you access to a single physical camera attached to your device.
  12. Properties
  13. ----------
  14. +---------------------------------------+-----------------------------------------------------------------+
  15. | :ref:`bool<class_bool>` | :ref:`feed_is_active<class_CameraFeed_property_feed_is_active>` |
  16. +---------------------------------------+-----------------------------------------------------------------+
  17. | :ref:`Transform2D<class_Transform2D>` | :ref:`feed_transform<class_CameraFeed_property_feed_transform>` |
  18. +---------------------------------------+-----------------------------------------------------------------+
  19. Methods
  20. -------
  21. +---------------------------------------------------+-----------------------------------------------------------------------------+
  22. | :ref:`int<class_int>` | :ref:`get_id<class_CameraFeed_method_get_id>` **(** **)** const |
  23. +---------------------------------------------------+-----------------------------------------------------------------------------+
  24. | :ref:`String<class_String>` | :ref:`get_name<class_CameraFeed_method_get_name>` **(** **)** const |
  25. +---------------------------------------------------+-----------------------------------------------------------------------------+
  26. | :ref:`FeedPosition<enum_CameraFeed_FeedPosition>` | :ref:`get_position<class_CameraFeed_method_get_position>` **(** **)** const |
  27. +---------------------------------------------------+-----------------------------------------------------------------------------+
  28. Enumerations
  29. ------------
  30. .. _enum_CameraFeed_FeedDataType:
  31. .. _class_CameraFeed_constant_FEED_NOIMAGE:
  32. .. _class_CameraFeed_constant_FEED_RGB:
  33. .. _class_CameraFeed_constant_FEED_YCBCR:
  34. .. _class_CameraFeed_constant_FEED_YCBCR_SEP:
  35. enum **FeedDataType**:
  36. - **FEED_NOIMAGE** = **0** --- No image set for the feed.
  37. - **FEED_RGB** = **1** --- Feed supplies RGB images.
  38. - **FEED_YCBCR** = **2** --- Feed supplies YCbCr images that need to be converted to RGB.
  39. - **FEED_YCBCR_SEP** = **3** --- Feed supplies separate Y and CbCr images that need to be combined and converted to RGB.
  40. .. _enum_CameraFeed_FeedPosition:
  41. .. _class_CameraFeed_constant_FEED_UNSPECIFIED:
  42. .. _class_CameraFeed_constant_FEED_FRONT:
  43. .. _class_CameraFeed_constant_FEED_BACK:
  44. enum **FeedPosition**:
  45. - **FEED_UNSPECIFIED** = **0** --- Unspecified position.
  46. - **FEED_FRONT** = **1** --- Camera is mounted at the front of the device.
  47. - **FEED_BACK** = **2** --- Camera is moutned at the back of the device.
  48. Description
  49. -----------
  50. A camera feed gives you access to a single physical camera attached to your device.
  51. When enabled Godot will start capturing frames from the camera which can then be used. Do note that 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.
  52. Property Descriptions
  53. ---------------------
  54. .. _class_CameraFeed_property_feed_is_active:
  55. - :ref:`bool<class_bool>` **feed_is_active**
  56. +----------+-------------------+
  57. | *Setter* | set_active(value) |
  58. +----------+-------------------+
  59. | *Getter* | is_active() |
  60. +----------+-------------------+
  61. .. _class_CameraFeed_property_feed_transform:
  62. - :ref:`Transform2D<class_Transform2D>` **feed_transform**
  63. +----------+----------------------+
  64. | *Setter* | set_transform(value) |
  65. +----------+----------------------+
  66. | *Getter* | get_transform() |
  67. +----------+----------------------+
  68. Method Descriptions
  69. -------------------
  70. .. _class_CameraFeed_method_get_id:
  71. - :ref:`int<class_int>` **get_id** **(** **)** const
  72. Get unique id for this feed
  73. .. _class_CameraFeed_method_get_name:
  74. - :ref:`String<class_String>` **get_name** **(** **)** const
  75. Get name of the camera
  76. .. _class_CameraFeed_method_get_position:
  77. - :ref:`FeedPosition<enum_CameraFeed_FeedPosition>` **get_position** **(** **)** const
  78. Position of camera on the device.