CameraFeed.xml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="CameraFeed" inherits="Reference" version="3.4">
  3. <brief_description>
  4. A camera feed gives you access to a single physical camera attached to your device.
  5. </brief_description>
  6. <description>
  7. 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.
  8. [b]Note:[/b] 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.
  9. </description>
  10. <tutorials>
  11. </tutorials>
  12. <methods>
  13. <method name="get_id" qualifiers="const">
  14. <return type="int">
  15. </return>
  16. <description>
  17. Returns the unique ID for this feed.
  18. </description>
  19. </method>
  20. <method name="get_name" qualifiers="const">
  21. <return type="String">
  22. </return>
  23. <description>
  24. Returns the camera's name.
  25. </description>
  26. </method>
  27. <method name="get_position" qualifiers="const">
  28. <return type="int" enum="CameraFeed.FeedPosition">
  29. </return>
  30. <description>
  31. Returns the position of camera on the device.
  32. </description>
  33. </method>
  34. </methods>
  35. <members>
  36. <member name="feed_is_active" type="bool" setter="set_active" getter="is_active" default="false">
  37. If [code]true[/code], the feed is active.
  38. </member>
  39. <member name="feed_transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D( 1, 0, 0, -1, 0, 1 )">
  40. The transform applied to the camera's image.
  41. </member>
  42. </members>
  43. <constants>
  44. <constant name="FEED_NOIMAGE" value="0" enum="FeedDataType">
  45. No image set for the feed.
  46. </constant>
  47. <constant name="FEED_RGB" value="1" enum="FeedDataType">
  48. Feed supplies RGB images.
  49. </constant>
  50. <constant name="FEED_YCBCR" value="2" enum="FeedDataType">
  51. Feed supplies YCbCr images that need to be converted to RGB.
  52. </constant>
  53. <constant name="FEED_YCBCR_SEP" value="3" enum="FeedDataType">
  54. Feed supplies separate Y and CbCr images that need to be combined and converted to RGB.
  55. </constant>
  56. <constant name="FEED_UNSPECIFIED" value="0" enum="FeedPosition">
  57. Unspecified position.
  58. </constant>
  59. <constant name="FEED_FRONT" value="1" enum="FeedPosition">
  60. Camera is mounted at the front of the device.
  61. </constant>
  62. <constant name="FEED_BACK" value="2" enum="FeedPosition">
  63. Camera is mounted at the back of the device.
  64. </constant>
  65. </constants>
  66. </class>