CameraServer

package
v0.0.0-...-a7442fb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2025 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package CameraServer provides methods for working with CameraServer object instances.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFeed

func AddFeed(feed CameraFeed.Instance)

Adds the camera [param feed] to the camera server.

func Advanced

func Advanced() class

Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.

func Feeds

func Feeds() []CameraFeed.Instance

Returns an array of [CameraFeed]s.

func GetFeed

func GetFeed(index int) CameraFeed.Instance

Returns the [CameraFeed] corresponding to the camera with the given [param index].

func GetFeedCount

func GetFeedCount() int

Returns the number of [CameraFeed]s registered.

func OnCameraFeedAdded

func OnCameraFeedAdded(cb func(id int), flags ...Signal.Flags)

func OnCameraFeedRemoved

func OnCameraFeedRemoved(cb func(id int), flags ...Signal.Flags)

func RemoveFeed

func RemoveFeed(feed CameraFeed.Instance)

Removes the specified camera [param feed].

Types

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension

func (*Extension[T]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

type ID

type ID Object.ID

ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

type Instance

type Instance [1]gdclass.CameraServer

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. [b]Note:[/b] This class is currently only implemented on Linux, macOS, and iOS. On other platforms no [CameraFeed]s will be available. To get a [CameraFeed] on iOS, the camera plugin from [url=https://github.com/godotengine/godot-ios-plugins]godot-ios-plugins[/url] is required.

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) ID

func (self Instance) ID() ID

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL