pandemonium_engine_docs/classes/class_cameraserver.rst

125 lines
4.7 KiB
ReStructuredText

:github_url: hide
.. DO NOT EDIT THIS FILE!!!
.. Generated automatically from Godot engine sources.
.. Generator: https://github.com/godotengine/godot/tree/3.5/doc/tools/make_rst.py.
.. XML source: https://github.com/godotengine/godot/tree/3.5/doc/classes/CameraServer.xml.
.. _class_CameraServer:
CameraServer
============
**Inherits:** :ref:`Object<class_Object>`
Server keeping track of different cameras accessible in Godot.
Description
-----------
The ``CameraServer`` keeps track of different cameras accessible in Godot. These are external cameras such as webcams or the cameras on your phone.
It is notably used to provide AR modules with a video feed from the camera.
\ **Note:** This class is currently only implemented on macOS and iOS. On other platforms, no :ref:`CameraFeed<class_CameraFeed>`\ s will be available.
Methods
-------
+-------------------------------------+----------------------------------------------------------------------------------------------------------------+
| void | :ref:`add_feed<class_CameraServer_method_add_feed>` **(** :ref:`CameraFeed<class_CameraFeed>` feed **)** |
+-------------------------------------+----------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>` | :ref:`feeds<class_CameraServer_method_feeds>` **(** **)** |
+-------------------------------------+----------------------------------------------------------------------------------------------------------------+
| :ref:`CameraFeed<class_CameraFeed>` | :ref:`get_feed<class_CameraServer_method_get_feed>` **(** :ref:`int<class_int>` index **)** |
+-------------------------------------+----------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_feed_count<class_CameraServer_method_get_feed_count>` **(** **)** |
+-------------------------------------+----------------------------------------------------------------------------------------------------------------+
| void | :ref:`remove_feed<class_CameraServer_method_remove_feed>` **(** :ref:`CameraFeed<class_CameraFeed>` feed **)** |
+-------------------------------------+----------------------------------------------------------------------------------------------------------------+
Signals
-------
.. _class_CameraServer_signal_camera_feed_added:
- **camera_feed_added** **(** :ref:`int<class_int>` id **)**
Emitted when a :ref:`CameraFeed<class_CameraFeed>` is added (e.g. a webcam is plugged in).
----
.. _class_CameraServer_signal_camera_feed_removed:
- **camera_feed_removed** **(** :ref:`int<class_int>` id **)**
Emitted when a :ref:`CameraFeed<class_CameraFeed>` is removed (e.g. a webcam is unplugged).
Enumerations
------------
.. _enum_CameraServer_FeedImage:
.. _class_CameraServer_constant_FEED_RGBA_IMAGE:
.. _class_CameraServer_constant_FEED_YCBCR_IMAGE:
.. _class_CameraServer_constant_FEED_Y_IMAGE:
.. _class_CameraServer_constant_FEED_CBCR_IMAGE:
enum **FeedImage**:
- **FEED_RGBA_IMAGE** = **0** --- The RGBA camera image.
- **FEED_YCBCR_IMAGE** = **0** --- The `YCbCr <https://en.wikipedia.org/wiki/YCbCr>`__ camera image.
- **FEED_Y_IMAGE** = **0** --- The Y component camera image.
- **FEED_CBCR_IMAGE** = **1** --- The CbCr component camera image.
Method Descriptions
-------------------
.. _class_CameraServer_method_add_feed:
- void **add_feed** **(** :ref:`CameraFeed<class_CameraFeed>` feed **)**
Adds the camera ``feed`` to the camera server.
----
.. _class_CameraServer_method_feeds:
- :ref:`Array<class_Array>` **feeds** **(** **)**
Returns an array of :ref:`CameraFeed<class_CameraFeed>`\ s.
----
.. _class_CameraServer_method_get_feed:
- :ref:`CameraFeed<class_CameraFeed>` **get_feed** **(** :ref:`int<class_int>` index **)**
Returns the :ref:`CameraFeed<class_CameraFeed>` corresponding to the camera with the given ``index``.
----
.. _class_CameraServer_method_get_feed_count:
- :ref:`int<class_int>` **get_feed_count** **(** **)**
Returns the number of :ref:`CameraFeed<class_CameraFeed>`\ s registered.
----
.. _class_CameraServer_method_remove_feed:
- void **remove_feed** **(** :ref:`CameraFeed<class_CameraFeed>` feed **)**
Removes the specified camera ``feed``.
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`