Class XREALCameraDevice
- 네임스페이스
- easyar
XREALCameraDevice는 XREAL Enterprise Native SDK Plugin 기반 camera 장치를 구현하며 InputFrame(image, camera parameters, timestamp, 6DOF 위치 정보 및 tracking status는 가져올 수 없음)을 출력합니다. 생성 후 start/stop을 호출하여 video stream data 수집을 시작하고 중지할 수 있습니다. isDeviceSupported가 true를 반환한 후에만 start를 호출해야 합니다. 장치가 더 이상 필요하지 않으면 close를 호출하여 닫을 수 있습니다. close 후에는 계속 사용하면 안 됩니다. XREALCameraDevice는 inputFrameSource를 통해 InputFrame을 출력하므로, inputFrameSource를 InputFrameSink에 연결하여 사용해야 합니다. bufferCapacity는 InputFrame 버퍼의 용량을 나타냅니다. 이 수보다 많은 InputFrame이 장치에서 출력되고 해제되지 않으면, 이전 InputFrame이 해제될 때까지 장치는 새 InputFrame을 더 이상 출력하지 않습니다. 이로 인해 화면이 멈추는 등의 문제가 발생할 수 있습니다.
생성자
XREALCameraDevice
void easyar_XREALCameraDevice__ctor(easyar_XREALCameraDevice * * Return)
XREALCameraDevice()
public XREALCameraDevice()
constructor()
+ (easyar_XREALCameraDevice *) create
public convenience init()
public XREALCameraDevice()
메서드
isAvailable
사용 가능한지 확인합니다. XREAL 안경을 지원하는 장치에서 XREAL 안경이 성공적으로 연결된 후에만 true를 반환합니다.
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()
반환 값
| 형식 | 설명 |
|---|---|
| Boolean |
isDeviceSupported
안경이 지원되는지 확인합니다. 사용 가능한 장치에서는 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()
반환 값
| 형식 | 설명 |
|---|---|
| Optional<> |
bufferCapacity
InputFrame 버퍼의 용량입니다. 기본값은 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()
반환 값
| 형식 | 설명 |
|---|---|
| Int32 |
setBufferCapacity
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)
매개 변수
| 이름 | 형식 | 설명 |
|---|---|---|
| capacity | Int32 |
반환 값
| 형식 | 설명 |
|---|---|
| Void |
inputFrameSource
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()
반환 값
| 형식 | 설명 |
|---|---|
| InputFrameSource |
getMotionInputData
동기화된 motion input data를 가져옵니다. isDeviceSupported가 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()
반환 값
| 형식 | 설명 |
|---|---|
| Optional<MotionInputData> |
receivedFrameCount
camera에서 얻은 frame 수입니다. start 후에는 계속 증가해야 하며, 그렇지 않으면 장치 연결이 불안정하거나 XREAL 서비스/SDK가 정상적으로 작동하지 않을 수 있습니다. 이 경우 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()
반환 값
| 형식 | 설명 |
|---|---|
| Int32 |
open
camera 장치를 엽니다. isDeviceSupported가 true를 반환한 후 사용합니다. Air2 Ultra 같은 장치에서는 먼저 XREAL 공식 방법으로 XREAL license 검증을 완료해야 합니다.
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()
반환 값
| 형식 | 설명 |
|---|---|
| Boolean |
start
video stream data 수집을 시작합니다.
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()
반환 값
| 형식 | 설명 |
|---|---|
| Boolean |
stop
video stream data 수집을 중지합니다.
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()
반환 값
| 형식 | 설명 |
|---|---|
| Void |
close
닫습니다. 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()
반환 값
| 형식 | 설명 |
|---|---|
| Void |
type
camera 타입입니다. open 성공 후 호출합니다.
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()
반환 값
| 형식 | 설명 |
|---|---|
| CameraDeviceType |
cameraOrientation
camera 이미지를 장치의 자연 방향으로 표시할 때 필요한 시계 방향 회전 각도입니다. open 성공 후 호출합니다.
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()
반환 값
| 형식 | 설명 |
|---|---|
| Int32 |
size
현재 image 크기를 가져옵니다. open 성공 후 호출합니다.
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()
반환 값
| 형식 | 설명 |
|---|---|
| Vec2I |
frameRate
현재 frame rate를 가져옵니다. open 성공 후 호출합니다.
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()
반환 값
| 형식 | 설명 |
|---|---|
| Double |