Wikitude Unity Expert Edition
Public Member Functions | Public Attributes | Properties | List of all members
Wikitude.DeviceCamera Class Reference

Controls the configuration and access to the physical camera on the device. If an input plugin is used instead, this script should be removed from the scene. 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...
 
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...
 

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...
 
Camera2SupportLevel Camera2SupportLevel [get, set]
 Sets the Camera 2 API's minimum support level. The Camera 2 API will not be used if the Android device doesn't support the chosen value. More...
 
bool IsFocusAtPointOfInterestSupported [get]
 Checks if FocusAtPointOfInterest is supported by the current capture device. More...
 
bool IsExposeAtPointOfInterestSupported [get]
 Checks if FocusAtPointOfInterest is supported by the current capture device. More...
 

Detailed Description

Controls the configuration and access to the physical camera on the device. If an input plugin is used instead, this script should be removed from the scene.

Member Function Documentation

void Wikitude.DeviceCamera.ExposeAtPointOfInterest ( Vector2  pointOfInterest,
CaptureExposureMode  exposureMode 
)
inline

Sets the exposure level around a point. Should be called again whenever the camera is restarted.

Parameters
pointOfInterestThe 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.
exposureModeThe exposure mode that should be used around the point.
void Wikitude.DeviceCamera.FocusAtPointOfInterest ( Vector2  pointOfInterest)
inline

Sets the focus around a point. Should be called again whenever the camera is restarted

Parameters
pointOfInterestThe point of interest where the camera should focus. The point is in screen space, as would be returned by Input.mousePosition, for example.
bool Wikitude.DeviceCamera.IsExposureModeSupported ( CaptureExposureMode  exposureMode)
inline

Checks if an exposure mode is supported by the current capture device.

bool Wikitude.DeviceCamera.IsFlashModeSupported ( CaptureFlashMode  flashMode)
inline

Checks if a flash mode is supported by the current capture device.

bool Wikitude.DeviceCamera.IsFocusModeSupported ( CaptureFocusMode  focusMode)
inline

Checks if a focus mode is supported is supported by the current capture device.

bool Wikitude.DeviceCamera.IsZoomLevelSupported ( float  zoomLevel)
inline

Checks if a zoom level is supported by the current capture device.

Member Data Documentation

OnCameraErrorEvent Wikitude.DeviceCamera.OnCameraError = new OnCameraErrorEvent()

Called whenever the device camera encounters an error.

OnCameraOpenedEvent Wikitude.DeviceCamera.OnCameraOpened = new OnCameraOpenedEvent()

Called whenever the device camera is opened.

Property Documentation

CaptureAutoFocusRestriction Wikitude.DeviceCamera.AutoFocusRestriction
getset

Gets or sets the current auto focus range restriction. This option is only available on iOS.

Camera2SupportLevel Wikitude.DeviceCamera.Camera2SupportLevel
getset

Sets the Camera 2 API's minimum support level. The Camera 2 API will not be used if the Android device doesn't support the chosen value.

Returns
CaptureDeviceFramerate Wikitude.DeviceCamera.DesiredCameraFramerate
getset

Gets or sets the desired framerate of the camera capture device. The change will take place the next time a camera is started.

CaptureDeviceResolution Wikitude.DeviceCamera.DesiredCameraResolution
getset

Gets or sets the desired resolution of the camera capture device. The change will take place the next time a camera is started.

CaptureDevicePosition Wikitude.DeviceCamera.DevicePosition
getset

Gets or sets the position of the capture device that is used or should be used.

bool Wikitude.DeviceCamera.EnableCamera2
getset

Enables Camera 2 API on Android, required if the Focus Distance needs to be set manually.

Returns
CaptureExposureMode Wikitude.DeviceCamera.ExposureMode
getset

Gets or sets the exposure mode that should be used by the current capture device, if supported.

CaptureFlashMode Wikitude.DeviceCamera.FlashMode
getset

Gets or sets the current flash mode that should be used by the capture device.

CaptureFocusMode Wikitude.DeviceCamera.FocusMode
getset

Gets or sets the focus mode that should be used by the current capture device, if supported.

bool Wikitude.DeviceCamera.IsAutoFocusRestrictionSupported
get

Checks if auto focus range restriction is supported on the device.

Returns
bool Wikitude.DeviceCamera.IsExposeAtPointOfInterestSupported
get

Checks if FocusAtPointOfInterest is supported by the current capture device.

bool Wikitude.DeviceCamera.IsFocusAtPointOfInterestSupported
get

Checks if FocusAtPointOfInterest is supported by the current capture device.

bool Wikitude.DeviceCamera.IsManualFocusAvailable
get

Checks if the current device supports manual focus. On Android, if Camera 2 API is not enabled, this will always be false.

float Wikitude.DeviceCamera.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.

float Wikitude.DeviceCamera.MaxZoomLevel
get

Gets the maximum zoom level supported by the current capture device.

float Wikitude.DeviceCamera.ZoomLevel
getset

Gets or sets the zoom level that should be used.