Wikitude Unity Plugin
|
The Wikitude camera handles the connection with the native plugins. More...
Inherits MonoBehaviour.
Public Member Functions | |
bool | IsFocusModeSupported (CaptureFocusMode focusMode) |
Checks if a focus mode is supported is supported by the current capture device. More... | |
bool | IsExposureModeSupported (CaptureExposureMode exposureMode) |
Checks if an exposure mode is supported by the current capture device. More... | |
bool | IsZoomLevelSupported (float zoomLevel) |
Checks if a zoom level is supported by the current capture device. More... | |
bool | IsFlashModeSupported (CaptureFlashMode flashMode) |
Checks if a flash mode is supported by the current capture device. More... | |
bool | IsCameraListSupported () |
Checks if the platform supports listing external cameras. More... | |
void | GetCameraList (Action< int > callback) |
Retrieve a list of available camera on the host system. More... | |
string | GetCameraName (int cameraIndex) |
Get the camera name given it's index. More... | |
void | SetActiveCamera (int cameraIndex) |
On platfoms supporting external cameras, select a camera by its index. More... | |
int | GetActiveCameraIndex () |
On platforms supporting external cameras, get the current active camera index. More... | |
void | FocusAtPointOfInterest (Vector2 pointOfInterest) |
Sets the focus around a point. Should be called again whenever the camera is restarted More... | |
void | ExposeAtPointOfInterest (Vector2 pointOfInterest, CaptureExposureMode exposureMode) |
Sets the exposure level around a point. Should be called again whenever the camera is restarted. More... | |
Public Attributes | |
OnCameraErrorEvent | OnCameraError = new OnCameraErrorEvent() |
Called whenever the device camera encounters an error. More... | |
OnCameraOpenedEvent | OnCameraOpened = new OnCameraOpenedEvent() |
Called whenever the device camera is opened. More... | |
OnSDKInitializedEvent | OnSDKInitialized = new OnSDKInitializedEvent() |
Called after the SDK finished initialization. More... | |
TransformOverride | ActiveOverride = null |
The current TransformOverride that should be applied before any Transform changes are made. More... | |
Properties | |
CaptureDevicePosition | DevicePosition [get, set] |
Gets or sets the position of the capture device that is used or should be used. More... | |
CaptureFocusMode | FocusMode [get, set] |
Gets or sets the focus mode that should be used by the current capture device, if supported. More... | |
CaptureExposureMode | ExposureMode [get, set] |
Gets or sets the exposure mode that should be used by the current capture device, if supported. More... | |
float | ManualFocusDistance [set] |
Gets or sets the manual focus distance that should be used. 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] |
Checks 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] |
Gets or sets the current auto focus range restriction. This option is only available on iOS. More... | |
bool | IsAutoFocusRestrictionSupported [get] |
Checks if auto focus range restriction is supported on the device. More... | |
float | ZoomLevel [get, set] |
Gets or sets the zoom level that should be used. More... | |
float | MaxZoomLevel [get] |
Gets the maximum zoom level supported by the current capture device. More... | |
CaptureFlashMode | FlashMode [get, set] |
Gets or sets the current flash mode that should be used by the capture device. More... | |
CaptureDeviceResolution | DesiredCameraResolution [get, set] |
Gets or sets the desired resolution of the camera capture device. The change will take place the next time a camera is started. More... | |
CaptureDeviceFramerate | DesiredCameraFramerate [get, set] |
Gets or sets the desired framerate of the camera capture device. The change will take place the next time a camera is started. More... | |
bool | EnableCamera2 [get, set] |
Enables Camera 2 API on Android, required if the Focus Distance needs to be set manually. More... | |
bool | IsFocusAtPointOfInterestSupported [get] |
Checks if FocusAtPointOfInterest is supported by the current capture device. More... | |
bool | IsExposeAtPointOfInterstSupported [get] |
Checks if FocusAtPointOfInterest is supported by the current capture device. More... | |
string | WikitudeLicenseKey [get, set] |
Gets or sets the Wikitude license key. More... | |
bool | EnableCameraRendering [get, set] |
Enables or disables rendering of the camera feed in the background of the scene. More... | |
bool | StaticCamera [get, set] |
Changes how the camera and trackables are positioned in the world. By default, the camera is dynamic and moves around a static trackable. When enabling StaticCamera, the camera is fixed to the original position and the trackable moves around it. A static camera can be procedurally moved at runtime without affecting tracking. More... | |
Vector3 | CalibrationPositionOffset [get, set] |
Position offset that is applied to the tracking matrix before it is processed by the plugin. More... | |
Quaternion | CalibrationRotationOffset [get, set] |
Rotation offset that is applied to the tracking matrix before it is processed by the plugin. More... | |
bool | IgnoreTrackableScale [get, set] |
When enabled, ignores the scaling of the trackable for tracking purposes and assumes it to be 1.0f. When doing a TransformOverride that also changes the scale of the trackables, this should be set to true. More... | |
bool | PrintErrorsToConsole [get, set] |
Automatically print all errors encountered by the SDK to the console. More... | |
Texture | CameraTexture [get] |
Gets the GPU texture that contains the current camera frame. More... | |
bool | EnableLivePreview [get, set] |
Gets or sets if the Live Preview mode should be enabled or not. More... | |
LivePreviewMode | LivePreviewMode [get, set] |
Gets or sets which Live Preview mode should be used. More... | |
Texture2D | StaticImage [get, set] |
Gets or sets which Image should be used in the Live Preview mode. The selected image should have the Read / Write settings enabled. More... | |
String | WebCamName [get, set] |
Gets or sets which WebCam should be used in the Live Preview mode. More... | |
CaptureDevicePosition | RemoteCameraPosition [get, set] |
Gets or sets which camera position to use in the Live Preview mode when using the Unity Remote app. More... | |
float | CameraToHorizonAngle [get, set] |
Gets or sets the angle between the forward vector of the camera and the horizontal plane. A value of 0 indicates that the camera is pointed directly forward, while a value of 90 means that the camera is pointed directly down to the ground. When using static images or webcams, there is no sensor data to indicate how the ground plane is oriented in the image, but this is crucial for Instant Tracking to work correctly. More... | |
bool | ForceResendData [get, set] |
When set to true, it will force resending the same image data, even if it didn't change. The value will revert to false when after the data was resent. 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 |
Sets the exposure level around a point. Should be called again whenever the camera is restarted.
pointOfInterest | The point of interest around which the exposure should be taken. The point is in screen space, as would be returned by Input.mousePosition, for example. |
exposureMode | The exposure mode that should be used around the point. |
|
inline |
Sets the focus around a point. Should be called again whenever the camera is restarted
pointOfInterest | The point of interest where the camera should focus. The point is in screen space, as would be returned by Input.mousePosition, for example. |
|
inline |
On platforms supporting external cameras, get the current active camera index.
|
inline |
Retrieve a list of available camera on the host system.
callback | This callback is called once the list of camera has been filled, with the number of available cameras as a parameter. |
|
inline |
Get the camera name given it's index.
|
inline |
Checks if the platform supports listing external cameras.
|
inline |
Checks if an exposure mode is supported by the current capture device.
|
inline |
Checks if a flash mode is supported by the current capture device.
|
inline |
Checks if a focus mode is supported is supported by the current capture device.
|
inline |
Checks if a zoom level is supported by the current capture device.
|
inline |
On platfoms supporting external cameras, select a camera by its index.
TransformOverride Wikitude.WikitudeCamera.ActiveOverride = null |
The current TransformOverride that should be applied before any Transform changes are made.
OnCameraErrorEvent Wikitude.WikitudeCamera.OnCameraError = new OnCameraErrorEvent() |
Called whenever the device camera encounters an error.
OnCameraOpenedEvent Wikitude.WikitudeCamera.OnCameraOpened = new OnCameraOpenedEvent() |
Called whenever the device camera is opened.
OnSDKInitializedEvent Wikitude.WikitudeCamera.OnSDKInitialized = new OnSDKInitializedEvent() |
Called after the SDK finished initialization.
|
getset |
Gets or sets the current auto focus range restriction. This option is only available on iOS.
|
getset |
Position offset that is applied to the tracking matrix before it is processed by the plugin.
|
getset |
Rotation offset that is applied to the tracking matrix before it is processed by the plugin.
|
get |
Gets the GPU texture that contains the current camera frame.
|
getset |
Gets or sets the angle between the forward vector of the camera and the horizontal plane. A value of 0 indicates that the camera is pointed directly forward, while a value of 90 means that the camera is pointed directly down to the ground. When using static images or webcams, there is no sensor data to indicate how the ground plane is oriented in the image, but this is crucial for Instant Tracking to work correctly.
|
getset |
Gets or sets the desired framerate of the camera capture device. The change will take place the next time a camera is started.
|
getset |
Gets or sets the desired resolution of the camera capture device. The change will take place the next time a camera is started.
|
getset |
Gets or sets the position of the capture device that is used or should be used.
|
getset |
Enables Camera 2 API on Android, required if the Focus Distance needs to be set manually.
|
getset |
Enables or disables rendering of the camera feed in the background of the scene.
|
getset |
Gets or sets if the Live Preview mode should be enabled or not.
|
getset |
Gets or sets the exposure mode that should be used by the current capture device, if supported.
|
getset |
Gets or sets the current flash mode that should be used by the capture device.
|
getset |
Gets or sets the focus mode that should be used by the current capture device, if supported.
|
getset |
When set to true, it will force resending the same image data, even if it didn't change. The value will revert to false when after the data was resent.
|
getset |
When enabled, ignores the scaling of the trackable for tracking purposes and assumes it to be 1.0f. When doing a TransformOverride that also changes the scale of the trackables, this should be set to true.
|
get |
Checks if auto focus range restriction is supported on the device.
|
get |
Checks if FocusAtPointOfInterest is supported by the current capture device.
|
get |
Checks if FocusAtPointOfInterest is supported by the current capture device.
|
get |
Checks if the current device supports manual focus. On Android, if Camera 2 API is not enabled, this will always be false.
|
getset |
Gets or sets which Live Preview mode should be used.
|
set |
Gets or sets the manual focus distance that should be used. 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 |
Gets the maximum zoom level supported by the current capture device.
|
getset |
Automatically print all errors encountered by the SDK to the console.
|
getset |
Gets or sets which camera position to use in the Live Preview mode when using the Unity Remote app.
|
getset |
Changes how the camera and trackables are positioned in the world. By default, the camera is dynamic and moves around a static trackable. When enabling StaticCamera, the camera is fixed to the original position and the trackable moves around it. A static camera can be procedurally moved at runtime without affecting tracking.
|
getset |
Gets or sets which Image should be used in the Live Preview mode. The selected image should have the Read / Write settings enabled.
|
getset |
Gets or sets which WebCam should be used in the Live Preview mode.
|
getset |
Gets or sets the Wikitude license key.
The wikitude license key.
|
getset |
Gets or sets the zoom level that should be used.