Class XREALCameraDevice
- Espaço de nomes
- easyar
XREALCameraDevice implementa um dispositivo camera baseado no XREAL Enterprise Native SDK Plugin e emite InputFrame (image, camera parameters, timestamp, informações de posição 6DOF e tracking status não podem ser obtidos). Após a criação, start/stop pode ser chamado para iniciar e interromper a coleta de dados video stream. Certifique-se de chamar start somente depois que isDeviceSupported retornar true. Quando o dispositivo não for mais necessário, close pode ser chamado para fechá-lo. Ele não deve ser usado após close. XREALCameraDevice emite InputFrame por meio de inputFrameSource, e inputFrameSource deve ser conectado a InputFrameSink para uso. bufferCapacity representa a capacidade do buffer de InputFrame. Se mais que esse número de InputFrame forem emitidos pelo dispositivo e não forem liberados, o dispositivo deixará de emitir novos InputFrame até que os InputFrame anteriores sejam liberados. Isso pode causar problemas como imagem travada.
Construtores
XREALCameraDevice
void easyar_XREALCameraDevice__ctor(easyar_XREALCameraDevice * * Return)
XREALCameraDevice()
public XREALCameraDevice()
constructor()
+ (easyar_XREALCameraDevice *) create
public convenience init()
public XREALCameraDevice()
Métodos
isAvailable
Verifica se está disponível. Retorna true somente em dispositivos que suportam óculos XREAL e após os óculos XREAL serem conectados com sucesso.
bool easyar_XREALCameraDevice_isAvailable(void)
static bool isAvailable()
public static boolean isAvailable()
companion object fun isAvailable(): Boolean
+ (bool)isAvailable
public static func isAvailable() -> Bool
public static bool isAvailable()
Retorna
| Tipo | Descrição |
|---|---|
| Boolean |
isDeviceSupported
Verifica se os óculos são suportados. Em dispositivos disponíveis, só tem valor depois que XREAL conclui a inicialização.
easyar_OptionalOfBool easyar_XREALCameraDevice_isDeviceSupported(void)
static std::optional<bool> isDeviceSupported()
public static java.lang.@Nullable Boolean isDeviceSupported()
companion object fun isDeviceSupported(): Boolean?
+ (NSNumber *)isDeviceSupported
public static func isDeviceSupported() -> Bool?
public static Optional<bool> isDeviceSupported()
Retorna
| Tipo | Descrição |
|---|---|
| Optional<> |
bufferCapacity
Capacidade do buffer de InputFrame. O valor padrão é 8.
int easyar_XREALCameraDevice_bufferCapacity(const easyar_XREALCameraDevice * This)
int bufferCapacity()
public int bufferCapacity()
fun bufferCapacity(): Int
- (int)bufferCapacity
public func bufferCapacity() -> Int32
public virtual int bufferCapacity()
Retorna
| Tipo | Descrição |
|---|---|
| Int32 |
setBufferCapacity
Define a capacidade do buffer de InputFrame.
void easyar_XREALCameraDevice_setBufferCapacity(easyar_XREALCameraDevice * This, int capacity)
void setBufferCapacity(int capacity)
public void setBufferCapacity(int capacity)
fun setBufferCapacity(capacity: Int): Unit
- (void)setBufferCapacity:(int)capacity
public func setBufferCapacity(_ capacity: Int32) -> Void
public virtual void setBufferCapacity(int capacity)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
| capacity | Int32 |
Retorna
| Tipo | Descrição |
|---|---|
| Void |
inputFrameSource
Porta de saída InputFrame.
void easyar_XREALCameraDevice_inputFrameSource(const easyar_XREALCameraDevice * This, easyar_InputFrameSource * * Return)
std::shared_ptr<InputFrameSource> inputFrameSource()
public @Nonnull InputFrameSource inputFrameSource()
fun inputFrameSource(): InputFrameSource
- (easyar_InputFrameSource *)inputFrameSource
public func inputFrameSource() -> InputFrameSource
public virtual InputFrameSource inputFrameSource()
Retorna
| Tipo | Descrição |
|---|---|
| InputFrameSource |
getMotionInputData
Obtém motion input data sincronizados. Use depois que isDeviceSupported retornar true.
void easyar_XREALCameraDevice_getMotionInputData(const easyar_XREALCameraDevice * This, easyar_OptionalOfMotionInputData * Return)
std::optional<std::shared_ptr<MotionInputData>> getMotionInputData()
public @Nullable MotionInputData getMotionInputData()
fun getMotionInputData(): MotionInputData?
- (easyar_MotionInputData *)getMotionInputData
public func getMotionInputData() -> MotionInputData?
public virtual Optional<MotionInputData> getMotionInputData()
Retorna
| Tipo | Descrição |
|---|---|
| Optional<MotionInputData> |
receivedFrameCount
Número de frames obtidos da camera. Após start, deve continuar aumentando; caso contrário, a conexão do dispositivo pode estar instável ou o serviço/SDK XREAL pode não estar funcionando corretamente. Nesse caso, obtenha ajuda diretamente do suporte oficial XREAL.
int easyar_XREALCameraDevice_receivedFrameCount(const easyar_XREALCameraDevice * This)
int receivedFrameCount()
public int receivedFrameCount()
fun receivedFrameCount(): Int
- (int)receivedFrameCount
public func receivedFrameCount() -> Int32
public virtual int receivedFrameCount()
Retorna
| Tipo | Descrição |
|---|---|
| Int32 |
open
Abre o dispositivo camera. Use depois que isDeviceSupported retornar true. Em dispositivos como Air2 Ultra, a license XREAL deve primeiro ser verificada pelos métodos oficiais da XREAL.
bool easyar_XREALCameraDevice_open(easyar_XREALCameraDevice * This)
bool open()
public boolean open()
fun open(): Boolean
- (bool)open
public func `open`() -> Bool
public virtual bool open()
Retorna
| Tipo | Descrição |
|---|---|
| Boolean |
start
Inicia a coleta de dados video stream.
bool easyar_XREALCameraDevice_start(easyar_XREALCameraDevice * This)
bool start()
public boolean start()
fun start(): Boolean
- (bool)start
public func start() -> Bool
public virtual bool start()
Retorna
| Tipo | Descrição |
|---|---|
| Boolean |
stop
Interrompe a coleta de dados video stream.
void easyar_XREALCameraDevice_stop(easyar_XREALCameraDevice * This)
void stop()
public void stop()
fun stop(): Unit
- (void)stop
public func stop() -> Void
public virtual void stop()
Retorna
| Tipo | Descrição |
|---|---|
| Void |
close
Fecha. Não deve ser usado após close.
void easyar_XREALCameraDevice_close(easyar_XREALCameraDevice * This)
void close()
public void close()
fun close(): Unit
- (void)close
public func close() -> Void
public virtual void close()
Retorna
| Tipo | Descrição |
|---|---|
| Void |
type
Tipo de camera. Chame após um open bem-sucedido.
easyar_CameraDeviceType easyar_XREALCameraDevice_type(const easyar_XREALCameraDevice * This)
CameraDeviceType type()
public int type()
fun type(): Int
- (easyar_CameraDeviceType)type
public func type() -> CameraDeviceType
public virtual CameraDeviceType type()
Retorna
| Tipo | Descrição |
|---|---|
| CameraDeviceType |
cameraOrientation
Ângulo de rotação horário necessário para exibir a imagem camera na orientação natural do dispositivo. Chame após um open bem-sucedido.
int easyar_XREALCameraDevice_cameraOrientation(const easyar_XREALCameraDevice * This)
int cameraOrientation()
public int cameraOrientation()
fun cameraOrientation(): Int
- (int)cameraOrientation
public func cameraOrientation() -> Int32
public virtual int cameraOrientation()
Retorna
| Tipo | Descrição |
|---|---|
| Int32 |
size
Obtém o tamanho image atual. Chame após um open bem-sucedido.
easyar_Vec2I easyar_XREALCameraDevice_size(const easyar_XREALCameraDevice * This)
Vec2I size()
public @Nonnull Vec2I size()
fun size(): Vec2I
- (easyar_Vec2I *)size
public func size() -> Vec2I
public virtual Vec2I size()
Retorna
| Tipo | Descrição |
|---|---|
| Vec2I |
frameRate
Obtém o frame rate atual. Chame após um open bem-sucedido.
double easyar_XREALCameraDevice_frameRate(const easyar_XREALCameraDevice * This)
double frameRate()
public double frameRate()
fun frameRate(): Double
- (double)frameRate
public func frameRate() -> Double
public virtual double frameRate()
Retorna
| Tipo | Descrição |
|---|---|
| Double |