MasCameraDevice class controls the camera device.
Inherits NSObject.
◆ MasFlipDirection
Flip direction enumerator.
Enumerator |
---|
HORIZONTAL | Horizontal Direction
|
VERTICAL | Vertical Direction
|
◆ MasResultCode
ResultCode enumerator related to camera and tracker.
Enumerator |
---|
Success | Success
|
CameraPermissionIsNotResolved | CameraPermissionIsNotResolved
|
CameraDevicedRestriced | CameraDevicedRestriced
|
CameraPermissionIsNotGranted | CameraPermissionIsNotGranted
|
CameraAlreadyOpened | CameraAlreadyOpened
|
TrackerAlreadyStarted | TrackerAlreadyStarted
|
UnknownError | UnknownError
|
◆ flipVideo
Flip the video background with respect to the given direction.
- Parameters
-
direction | the direction to be flipped. |
true | for flipping, false for undoing |
◆ getBackgroundPlaneInfo
- (float *) getBackgroundPlaneInfo |
|
|
|
Get the coordinates of the background plane where a camera image is rendered.
- Returns
- the coordinates of the background plane
◆ getMaxZoomValue
Get the maximum zoom-in value supporting the camera device.
- Returns
- the maximum zoom-in value.
◆ getProjectionMatrix
- (matrix_float4x4) getProjectionMatrix |
|
|
|
Get a projection matrix for rendering 3d virtual objects.
MAXST AR obeys the right-handed coordinated system same as OpenGL.
- Returns
- a 4x4 projection matrix stored in column-major order.
◆ isFlipHorizontal
- (bool) isFlipHorizontal |
|
|
|
Get a boolean value representing whether the video background is flipped horizontally.
- Parameters
-
- Returns
- true if the video background is flipped horizontally.
◆ isFlipVertical
Get a boolean value representing whether the video background is flipped vertically.
- Parameters
-
- Returns
- true if the video background is flipped vertically.
◆ setFlashLightMode
- (bool) setFlashLightMode: |
|
(bool) |
toggle |
|
◆ setFusionEnable
Enable ARKit for AR Fusion.
◆ setZoom
- (bool) setZoom: |
|
(float) |
zoomScale |
|
Set a camera zoom scale.
- Parameters
-
- Returns
- true if setting is successful.
◆ start
- (MasResultCode) start: |
|
(int) |
cameraId |
width: |
|
(int) |
width |
height: |
|
(int) |
height |
|
|
| |
Start a camera preview.
After an AR tracker starts, camera frames is sequentially sent to the AR tracker. This method gets preferable camera width and height as parameters. If the camera device does not support the exact width and height, the most similar width and height are chosen.
- Parameters
-
cameraId | 0 is a rear camera, 1 is a front camera. |
width | the preferable camera width. |
height | the preferable camera height. |
- Returns
- ResultCode concerning camera initialization.
◆ stop
Stop a camera preview.
- Returns
- ResultCode concerning camera termination.