class_cameratexture.rst 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.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:`Texture2D<class_Texture2D>` **<** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  9. Texture provided by a :ref:`CameraFeed<class_CameraFeed>`.
  10. 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:`FeedImage<enum_CameraServer_FeedImage>` | :ref:`which_feed<class_CameraTexture_property_which_feed>` | ``0`` |
  22. +-----------------------------------------------+------------------------------------------------------------------------+-----------+
  23. Property Descriptions
  24. ---------------------
  25. .. _class_CameraTexture_property_camera_feed_id:
  26. - :ref:`int<class_int>` **camera_feed_id**
  27. +-----------+---------------------------+
  28. | *Default* | ``0`` |
  29. +-----------+---------------------------+
  30. | *Setter* | set_camera_feed_id(value) |
  31. +-----------+---------------------------+
  32. | *Getter* | get_camera_feed_id() |
  33. +-----------+---------------------------+
  34. The ID of the :ref:`CameraFeed<class_CameraFeed>` for which we want to display the image.
  35. ----
  36. .. _class_CameraTexture_property_camera_is_active:
  37. - :ref:`bool<class_bool>` **camera_is_active**
  38. +-----------+--------------------------+
  39. | *Default* | ``false`` |
  40. +-----------+--------------------------+
  41. | *Setter* | set_camera_active(value) |
  42. +-----------+--------------------------+
  43. | *Getter* | get_camera_active() |
  44. +-----------+--------------------------+
  45. Convenience property that gives access to the active property of the :ref:`CameraFeed<class_CameraFeed>`.
  46. ----
  47. .. _class_CameraTexture_property_which_feed:
  48. - :ref:`FeedImage<enum_CameraServer_FeedImage>` **which_feed**
  49. +-----------+-----------------------+
  50. | *Default* | ``0`` |
  51. +-----------+-----------------------+
  52. | *Setter* | set_which_feed(value) |
  53. +-----------+-----------------------+
  54. | *Getter* | get_which_feed() |
  55. +-----------+-----------------------+
  56. 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.
  57. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  58. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  59. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  60. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  61. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  62. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`