class_cameratexture.rst 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the CameraTexture.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_CameraTexture:
  6. CameraTexture
  7. =============
  8. **Inherits:** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. This texture gives access to the camera texture provided by a :ref:`CameraFeed<class_CameraFeed>`.
  13. **Note:** Many cameras supply YCbCr images which need to be converted in a shader.
  14. Properties
  15. ----------
  16. +-----------------------------------------------+------------------------------------------------------------------------+----------+
  17. | :ref:`int<class_int>` | :ref:`camera_feed_id<class_CameraTexture_property_camera_feed_id>` | 0 |
  18. +-----------------------------------------------+------------------------------------------------------------------------+----------+
  19. | :ref:`bool<class_bool>` | :ref:`camera_is_active<class_CameraTexture_property_camera_is_active>` | false |
  20. +-----------------------------------------------+------------------------------------------------------------------------+----------+
  21. | :ref:`int<class_int>` | flags | **O:** 0 |
  22. +-----------------------------------------------+------------------------------------------------------------------------+----------+
  23. | :ref:`FeedImage<enum_CameraServer_FeedImage>` | :ref:`which_feed<class_CameraTexture_property_which_feed>` | 0 |
  24. +-----------------------------------------------+------------------------------------------------------------------------+----------+
  25. Property Descriptions
  26. ---------------------
  27. .. _class_CameraTexture_property_camera_feed_id:
  28. - :ref:`int<class_int>` **camera_feed_id**
  29. +-----------+---------------------------+
  30. | *Default* | 0 |
  31. +-----------+---------------------------+
  32. | *Setter* | set_camera_feed_id(value) |
  33. +-----------+---------------------------+
  34. | *Getter* | get_camera_feed_id() |
  35. +-----------+---------------------------+
  36. The ID of the :ref:`CameraFeed<class_CameraFeed>` for which we want to display the image.
  37. ----
  38. .. _class_CameraTexture_property_camera_is_active:
  39. - :ref:`bool<class_bool>` **camera_is_active**
  40. +-----------+--------------------------+
  41. | *Default* | false |
  42. +-----------+--------------------------+
  43. | *Setter* | set_camera_active(value) |
  44. +-----------+--------------------------+
  45. | *Getter* | get_camera_active() |
  46. +-----------+--------------------------+
  47. Convenience property that gives access to the active property of the :ref:`CameraFeed<class_CameraFeed>`.
  48. ----
  49. .. _class_CameraTexture_property_which_feed:
  50. - :ref:`FeedImage<enum_CameraServer_FeedImage>` **which_feed**
  51. +-----------+-----------------------+
  52. | *Default* | 0 |
  53. +-----------+-----------------------+
  54. | *Setter* | set_which_feed(value) |
  55. +-----------+-----------------------+
  56. | *Getter* | get_which_feed() |
  57. +-----------+-----------------------+
  58. Which image within the :ref:`CameraFeed<class_CameraFeed>` we want access to, important if the camera image is split in a Y and CbCr component.