Class XREALCameraDevice
- Espace de noms
- easyar
XREALCameraDevice implémente un appareil camera basé sur XREAL Enterprise Native SDK Plugin et produit InputFrame (image, camera parameters, timestamp, informations de position 6DOF et tracking status ne peuvent pas être obtenus). Après création, start/stop peut être appelé pour démarrer et arrêter la collecte des données video stream. Assurez-vous d'appeler start uniquement après que isDeviceSupported renvoie true. Lorsque l'appareil n'est plus nécessaire, close peut être appelé pour le fermer. Il ne doit plus être utilisé après close. XREALCameraDevice produit InputFrame via inputFrameSource, et inputFrameSource doit être connecté à InputFrameSink pour être utilisé. bufferCapacity représente la capacité du buffer de InputFrame. Si plus de InputFrame que ce nombre sont produits par l'appareil et ne sont pas libérés, l'appareil ne produira plus de nouveaux InputFrame jusqu'à ce que les InputFrame précédents soient libérés. Cela peut provoquer des problèmes comme le gel de l'image.
Constructeurs
XREALCameraDevice
void easyar_XREALCameraDevice__ctor(easyar_XREALCameraDevice * * Return)
XREALCameraDevice()
public XREALCameraDevice()
constructor()
+ (easyar_XREALCameraDevice *) create
public convenience init()
public XREALCameraDevice()
Méthodes
isAvailable
Vérifie s'il est disponible. Renvoie true uniquement sur les appareils qui prennent en charge les lunettes XREAL et après la connexion réussie des lunettes XREAL.
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()
Retours
| Type | Description |
|---|---|
| Boolean |
isDeviceSupported
Vérifie si les lunettes sont prises en charge. Sur les appareils disponibles, une valeur n'existe qu'après la fin de l'initialisation de XREAL.
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()
Retours
| Type | Description |
|---|---|
| Optional<> |
bufferCapacity
Capacité du buffer de InputFrame. La valeur par défaut est 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()
Retours
| Type | Description |
|---|---|
| Int32 |
setBufferCapacity
Définit la capacité du 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)
Paramètres
| Nom | Type | Description |
|---|---|---|
| capacity | Int32 |
Retours
| Type | Description |
|---|---|
| Void |
inputFrameSource
Port de sortie 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()
Retours
| Type | Description |
|---|---|
| InputFrameSource |
getMotionInputData
Obtient les motion input data synchronisées. À utiliser après que isDeviceSupported renvoie 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()
Retours
| Type | Description |
|---|---|
| Optional<MotionInputData> |
receivedFrameCount
Nombre de frames obtenues depuis la camera. Après start, il devrait continuer à augmenter ; sinon, la connexion de l'appareil peut être instable ou le service/SDK XREAL peut ne pas fonctionner correctement. Dans ce cas, obtenez de l'aide directement auprès du support officiel 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()
Retours
| Type | Description |
|---|---|
| Int32 |
open
Ouvre l'appareil camera. À utiliser après que isDeviceSupported renvoie true. Sur des appareils comme Air2 Ultra, la license XREAL doit d'abord être vérifiée par les méthodes officielles 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()
Retours
| Type | Description |
|---|---|
| Boolean |
start
Démarre la collecte des données 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()
Retours
| Type | Description |
|---|---|
| Boolean |
stop
Arrête la collecte des données 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()
Retours
| Type | Description |
|---|---|
| Void |
close
Ferme. Ne doit plus être utilisé aprè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()
Retours
| Type | Description |
|---|---|
| Void |
type
Type de camera. Appeler après un open réussi.
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()
Retours
| Type | Description |
|---|---|
| CameraDeviceType |
cameraOrientation
Angle de rotation horaire requis pour afficher l'image camera dans l'orientation naturelle de l'appareil. Appeler après un open réussi.
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()
Retours
| Type | Description |
|---|---|
| Int32 |
size
Obtient la taille image actuelle. Appeler après un open réussi.
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()
Retours
| Type | Description |
|---|---|
| Vec2I |
frameRate
Obtient le frame rate actuel. Appeler après un open réussi.
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()
Retours
| Type | Description |
|---|---|
| Double |