Wikitude Unity Plugin
|
The Wikitude camera handles the connection with the native plugins. More...
Inherits MonoBehaviour.
Public Member Functions | |
void | NewCameraFrame (int frameIndex, int frameDataSize, IntPtr frameData) |
Notifies the Wikitude SDK about a new input frame. More... | |
long | GetPresentableInputFrameIndex () |
Use this method to retrieve the last processed input frame index. Using this will allow you to synchronize the camera with the tracking data. More... | |
Public Attributes | |
UnityEvent | OnInputPluginRegistered = new UnityEvent() |
Event called when the input plugin was registered and it is safe to try to access the camera. More... | |
OnInputPluginFailureEvent | OnInputPluginFailure = new OnInputPluginFailureEvent() |
Event called when there was an error with the input plugin. More... | |
OnCameraFailureEvent | OnCameraFailure = new OnCameraFailureEvent() |
Called whenever the device camera encounters an error. More... | |
Properties | |
string | WikitudeLicenseKey [get, set] |
Gets or sets the Wikitude license key. More... | |
Texture2D | CameraTexture [get] |
Gets the camera feed texture. More... | |
CaptureDevicePosition | DevicePosition [get, set] |
Indicates the physical position of the capture device on the system. More... | |
CaptureFocusMode | FocusMode [get, set] |
Indicates the current focus mode of the device. More... | |
float | ManualFocusDistance [set] |
Indicates the current value of for manual focus. Valid values are between 0 and 1 and only works when the FocusMode is set to Locked and Camera2 API is enabled on Android. Value 0 indicates that the camera should focus as close as possible. More... | |
bool | IsManualFocusAvailable [get] |
Indicates if the current device supports manual focus. On Android, if Camera 2 API is not enabled, this will always be false. More... | |
CaptureAutoFocusRestriction | AutoFocusRestriction [get, set] |
Indicates the current autofocus restriction. More... | |
float | ZoomLevel [get, set] |
The zoom level that is currently active. More... | |
float | MaxZoomLevel [get] |
The maximum supported zoom level. More... | |
CaptureFlashMode | FlashMode [get, set] |
Indicates the current flash mode of the device. More... | |
CaptureDeviceResolution | DesiredCameraResolution [get, set] |
Indicates the desired resolution of the camera capture device. More... | |
CaptureDeviceFramerate | DesiredCameraFramerate [get, set] |
Indicates the desired framerate of the camera capture device. More... | |
bool | EnableCamera2 [get] |
Enables Camera 2 API on Android, required if the Focus Distance needs to be set manually. More... | |
bool | EnableInputPlugin [get, set] |
Enables Input Plugins for Unity. The setter should only be used during initialization, otherwise, it won't have any effect. More... | |
bool | EnableMirroring [get, set] |
Will flip the frame horizontally for rendering only. No operations are done on the data itself. Only works if RequestInputFrameRendering is also enabled. More... | |
bool | InvertedFrame [get, set] |
Will flip the frame vertically before any processing and rendering is done. Can be used together with MirroredFrame to rotate the frame by 180 degrees. Only works if the color space is RGBA. More... | |
bool | MirroredFrame [get, set] |
Will flip the frame horizontally before any processing and rendering is done. Can be used together with InvertedFrame to rotate the frame by 180 degrees. Only works if the color space is RGBA. More... | |
FrameColorSpace | InputFrameColorSpace [get] |
Input Plugin color space More... | |
float | HorizontalAngle [get, set] |
Gets or sets the horizontal angle of the device used to capture the frame (FOV). More... | |
int | InputFrameWidth [get, set] |
Gets or sets the width of the input frame. More... | |
int | InputFrameHeight [get, set] |
Gets or sets the height of the input frame. More... | |
bool | RequestInputFrameRendering [get, set] |
Gets or sets a value indicating whether the SDK should render the frame. More... | |
The Wikitude camera handles the connection with the native plugins.
When the Awake function is called on it, the native plugin is initialized. When the WikitudeCamera it is destroyed, the plugin is also destroyed.
Also handles camera rendering and camera settings.
|
inline |
Use this method to retrieve the last processed input frame index. Using this will allow you to synchronize the camera with the tracking data.
|
inline |
Notifies the Wikitude SDK about a new input frame.
frameIndex | A unique identifier for each frame. Specifying the same value twice will lead to undefined behaviour. |
frameDataSize | The size of the frame data in bytes. |
frameData | Native pointer to the frame data. |
OnCameraFailureEvent Wikitude.WikitudeCamera.OnCameraFailure = new OnCameraFailureEvent() |
Called whenever the device camera encounters an error.
OnInputPluginFailureEvent Wikitude.WikitudeCamera.OnInputPluginFailure = new OnInputPluginFailureEvent() |
Event called when there was an error with the input plugin.
UnityEvent Wikitude.WikitudeCamera.OnInputPluginRegistered = new UnityEvent() |
Event called when the input plugin was registered and it is safe to try to access the camera.
|
getset |
Indicates the current autofocus restriction.
The auto focus restriction.
|
get |
Gets the camera feed texture.
The camera texture.
|
getset |
Indicates the desired framerate of the camera capture device.
|
getset |
Indicates the desired resolution of the camera capture device.
|
getset |
Indicates the physical position of the capture device on the system.
|
get |
Enables Camera 2 API on Android, required if the Focus Distance needs to be set manually.
|
getset |
Enables Input Plugins for Unity. The setter should only be used during initialization, otherwise, it won't have any effect.
true
if Input Plugins should be running; otherwise, false
.
|
getset |
Will flip the frame horizontally for rendering only. No operations are done on the data itself. Only works if RequestInputFrameRendering is also enabled.
true
if mirroring for rendering should be enabled; otherwise, false
.
|
getset |
Indicates the current flash mode of the device.
|
getset |
Indicates the current focus mode of the device.
|
getset |
Gets or sets the horizontal angle of the device used to capture the frame (FOV).
The horizontal angle.
|
get |
Input Plugin color space
The input frame color space.
|
getset |
Gets or sets the height of the input frame.
The height of the input frame.
|
getset |
Gets or sets the width of the input frame.
The width of the input frame.
|
getset |
Will flip the frame vertically before any processing and rendering is done. Can be used together with MirroredFrame to rotate the frame by 180 degrees. Only works if the color space is RGBA.
true
if the frame should be flipped vertically; otherwise, false
.
|
get |
Indicates if the current device supports manual focus. On Android, if Camera 2 API is not enabled, this will always be false.
|
set |
Indicates the current value of for manual focus. Valid values are between 0 and 1 and only works when the FocusMode is set to Locked and Camera2 API is enabled on Android. Value 0 indicates that the camera should focus as close as possible.
|
get |
The maximum supported zoom level.
The max zoom level.
|
getset |
Will flip the frame horizontally before any processing and rendering is done. Can be used together with InvertedFrame to rotate the frame by 180 degrees. Only works if the color space is RGBA.
///
true
if the frame should be flipped horizontally; otherwise, false
.
|
getset |
Gets or sets a value indicating whether the SDK should render the frame.
true
if the SDK should render the frame; otherwise, false
.
|
getset |
Gets or sets the Wikitude license key.
The wikitude license key.
|
getset |
The zoom level that is currently active.