KudanAR - Unity  1.6.0
Kudan.AR.TrackerBase Class Referenceabstract

Base class for the tracker plugin. This abstracts the native plugin for each operating system. More...

Inherits Kudan.AR.ITracker.

Inherited by Kudan.AR.Tracker.

Public Member Functions

string GetPluginVersion ()
 Gets the current plugin version. More...
 
int GetNumTrackables ()
 Gets the number of trackables. More...
 
Trackable GetTrackable (int index)
 Gets a trackable at given index. More...
 
bool IsTrackingRunning ()
 Determines whether tracking is running. More...
 
void RemoveTrackable (string name)
 Removes a trackable with a given name. More...
 
void ClearTrackables ()
 Clears trackables. More...
 
abstract bool InitPlugin ()
 Initialisess the plugin. More...
 
abstract void DeinitPlugin ()
 Deinitialises the plugin. More...
 
abstract float GetNativePluginVersion ()
 Gets the native plugin version. More...
 
abstract void OnApplicationFocus (bool focusStatus)
 Raises the application focus event. More...
 
abstract void OnApplicationPause (bool pauseStatus)
 Raises the application pause event. More...
 
abstract int GetNumCameras ()
 Gets the number of cameras. More...
 
abstract bool StartInputFromImage (Texture2D image)
 Starts input from an image. More...
 
abstract bool StartInputFromCamera (int deviceIndex, int targetWidth, int targetHeight)
 Starts input from a given camera device. More...
 
abstract void StopInput ()
 Stops all input. More...
 
abstract bool AddTrackable (byte[] data, string id, bool extensible)
 
abstract bool AddTrackableSet (byte[] data, string id)
 Adds a trackable with a given set of data and ID. More...
 
abstract void UpdateTracking ()
 Updates tracking. More...
 
abstract void PostRender ()
 Function called just after the current frame has been drawn. More...
 
abstract void NativeRender ()
 
abstract void StartTracking ()
 Starts tracking. More...
 
abstract void StopTracking ()
 Stops tracking. More...
 
abstract bool EnableTrackingMethod (int trackingMethodId)
 Enables the given tracking method. More...
 
abstract bool DisableTrackingMethod (int trackingMethodId)
 Disables the given tracking method. More...
 
abstract bool GetMarkerRecoveryStatus ()
 Gets the marker recovery status. More...
 
abstract void SetMarkerRecoveryStatus (bool status)
 Sets the marker recovery status. Enabling this feature allows for quicker re-detection if a marker is lost as well as making it easier to re-detect the marker from shallower angles and greater distances. This is a feature that we recommend everyone should generally enable. N.B. Enabling this feature will use a fraction more CPU power. More...
 
abstract bool GetMarkerExtensibilityStatus ()
 Gets the extensible markers status. More...
 
abstract void SetMarkerExtensibilityStatus (bool status)
 Sets the extensability for all of the markers being added after this flag has been changed More...
 
abstract void SetMaximumSimultaneousTracking (int maxToTrack)
 Set the maximum number of trackables which can be tracked at the same time. More...
 
abstract void SetApiKey (string key, string bundleId)
 Sets the API key. More...
 
abstract void ArbiTrackStart (Vector3 position, Quaternion orientation)
 Starts arbitrary tracking using a given position and orientation. More...
 
abstract void ArbiTrackStop ()
 Stops ArbiTrack and returns to placement mode More...
 
abstract bool ArbiTrackIsTracking ()
 Checks if arbitrary tracking is currently running. More...
 
abstract void FloorPlaceGetPose (out Vector3 position, out Quaternion orientation)
 Gets the current position and orientation of the floor, relative to the device. More...
 
abstract void ArbiTrackGetPose (out Vector3 position, out Quaternion orientation)
 Gets the current position and rotation of the markerless driver being tracked. More...
 
void SetupRenderingCamera (float cameraNearPlane, float cameraFarPlane)
 Sets up the rendering camera. More...
 
bool AddTrackableSet (string path, string id)
 Adds the trackable from a given path with a given ID. More...
 
Texture GetTrackingTexture ()
 Gets the tracking texture. More...
 
int GetNumDetectedTrackables ()
 Gets the number of detected trackables. More...
 
Trackable GetDetectedTrackable (int index)
 Gets detected trackable at the given index. More...
 
Matrix4x4 GetProjectionMatrix ()
 Gets the projection matrix. More...
 
Trackable[] GetDetectedTrackablesAsArray ()
 Gets the detected trackables as array. More...
 
void SetArbiTrackFloorHeight (float floorHeight)
 
virtual void updateCam ()
 Updates the camera. More...
 

Protected Attributes

List< Trackable_trackables = new List<Trackable>()
 List of trackables the user has loaded. More...
 
float _cameraNearPlane = 0.3f
 The default camera near plane value. More...
 
float _cameraFarPlane = 1000f
 The default camera far plane value. More...
 
float _floorHeight = 200.0f
 ArbiTracker default floor height. More...
 
System.Threading.Thread _trackingThread
 The tracking thread. More...
 
bool _isTrackingRunning
 Is tracking currently running? More...
 
Texture _finalTexture
 The texture used to render to the camera. More...
 
Matrix4x4 _projectionMatrix
 The projection matrix. More...
 
List< Trackable_detected = new List<Trackable>()
 List of detected trackables. More...
 
float _cameraRate
 The camera rate, number of times the camera feed refreshes each second. More...
 
float _trackerRate
 The tracker rate, the number of times the tracker updates each second. More...
 
float _appRate
 The app rate, the number of times the app updates each second. More...
 
Texture _clonedTexture
 The cloned texture. More...
 

Properties

float CameraFrameRate [get]
 Gets the camera frame rate. More...
 
float TrackerFrameRate [get]
 Gets the tracker frame rate. More...
 
float AppFrameRate [get]
 Gets the app frame rate. More...
 

Detailed Description

Base class for the tracker plugin. This abstracts the native plugin for each operating system.

Member Function Documentation

◆ AddTrackableSet() [1/2]

abstract bool Kudan.AR.TrackerBase.AddTrackableSet ( byte[]  data,
string  id 
)
pure virtual

Adds a trackable with a given set of data and ID.

Returns
true, if trackable was added, false otherwise.
Parameters
dataData.
idIdentifier.

Implements Kudan.AR.ITracker.

Implemented in Kudan.AR.Tracker.

◆ AddTrackableSet() [2/2]

bool Kudan.AR.TrackerBase.AddTrackableSet ( string  path,
string  id 
)
inline

Adds the trackable from a given path with a given ID.

Returns
true, if trackable was added, false otherwise.
Parameters
pathPath.
idIdentifier.

Implements Kudan.AR.ITracker.

◆ ArbiTrackGetPose()

abstract void Kudan.AR.TrackerBase.ArbiTrackGetPose ( out Vector3  position,
out Quaternion  orientation 
)
pure virtual

Gets the current position and rotation of the markerless driver being tracked.

Parameters
positionPosition.
orientationOrientation.

Implemented in Kudan.AR.Tracker.

◆ ArbiTrackIsTracking()

abstract bool Kudan.AR.TrackerBase.ArbiTrackIsTracking ( )
pure virtual

Checks if arbitrary tracking is currently running.

Returns
true, if arbitrary tracking is running, false otherwise.

Implemented in Kudan.AR.Tracker.

◆ ArbiTrackStart()

abstract void Kudan.AR.TrackerBase.ArbiTrackStart ( Vector3  position,
Quaternion  orientation 
)
pure virtual

Starts arbitrary tracking using a given position and orientation.

Parameters
positionPosition.
orientationOrientation.

Implemented in Kudan.AR.Tracker.

◆ ArbiTrackStop()

abstract void Kudan.AR.TrackerBase.ArbiTrackStop ( )
pure virtual

Stops ArbiTrack and returns to placement mode

Implemented in Kudan.AR.Tracker.

◆ ClearTrackables()

void Kudan.AR.TrackerBase.ClearTrackables ( )
inline

Clears trackables.

Implements Kudan.AR.ITracker.

◆ DeinitPlugin()

abstract void Kudan.AR.TrackerBase.DeinitPlugin ( )
pure virtual

Deinitialises the plugin.

Implements Kudan.AR.ITracker.

Implemented in Kudan.AR.Tracker.

◆ DisableTrackingMethod()

abstract bool Kudan.AR.TrackerBase.DisableTrackingMethod ( int  trackingMethodId)
pure virtual

Disables the given tracking method.

Returns
true, if tracking method was disabled, false otherwise.
Parameters
trackingMethodIdTracking method identifier.

Implements Kudan.AR.ITracker.

Implemented in Kudan.AR.Tracker.

◆ EnableTrackingMethod()

abstract bool Kudan.AR.TrackerBase.EnableTrackingMethod ( int  trackingMethodId)
pure virtual

Enables the given tracking method.

Returns
true, if tracking method was enabled, false otherwise.
Parameters
trackingMethodIdTracking method identifier.

Implements Kudan.AR.ITracker.

Implemented in Kudan.AR.Tracker.

◆ FloorPlaceGetPose()

abstract void Kudan.AR.TrackerBase.FloorPlaceGetPose ( out Vector3  position,
out Quaternion  orientation 
)
pure virtual

Gets the current position and orientation of the floor, relative to the device.

Parameters
positionPosition.
orientationOrientation.

Implemented in Kudan.AR.Tracker.

◆ GetDetectedTrackable()

Trackable Kudan.AR.TrackerBase.GetDetectedTrackable ( int  index)
inline

Gets detected trackable at the given index.

Returns
The detected trackable.
Parameters
indexIndex.

Implements Kudan.AR.ITracker.

◆ GetDetectedTrackablesAsArray()

Trackable [] Kudan.AR.TrackerBase.GetDetectedTrackablesAsArray ( )
inline

Gets the detected trackables as array.

Returns
The detected trackables as array.

◆ GetMarkerExtensibilityStatus()

abstract bool Kudan.AR.TrackerBase.GetMarkerExtensibilityStatus ( )
pure virtual

Gets the extensible markers status.

Returns
true, if extensible markers status was gotten, false otherwise.

Implements Kudan.AR.ITracker.

Implemented in Kudan.AR.Tracker.

◆ GetMarkerRecoveryStatus()

abstract bool Kudan.AR.TrackerBase.GetMarkerRecoveryStatus ( )
pure virtual

Gets the marker recovery status.

Returns
true, if marker recovery is enabled, false otherwise.

Implements Kudan.AR.ITracker.

Implemented in Kudan.AR.Tracker.

◆ GetNativePluginVersion()

abstract float Kudan.AR.TrackerBase.GetNativePluginVersion ( )
pure virtual

Gets the native plugin version.

Returns
The native plugin version.

Implements Kudan.AR.ITracker.

Implemented in Kudan.AR.Tracker.

◆ GetNumCameras()

abstract int Kudan.AR.TrackerBase.GetNumCameras ( )
pure virtual

Gets the number of cameras.

Returns
The number of cameras.

Implements Kudan.AR.ITracker.

Implemented in Kudan.AR.Tracker.

◆ GetNumDetectedTrackables()

int Kudan.AR.TrackerBase.GetNumDetectedTrackables ( )
inline

Gets the number of detected trackables.

Returns
The number of detected trackables.

Implements Kudan.AR.ITracker.

◆ GetNumTrackables()

int Kudan.AR.TrackerBase.GetNumTrackables ( )
inline

Gets the number of trackables.

Returns
The number of trackables.

Implements Kudan.AR.ITracker.

◆ GetPluginVersion()

string Kudan.AR.TrackerBase.GetPluginVersion ( )
inline

Gets the current plugin version.

Returns
The plugin version.

Implements Kudan.AR.ITracker.

◆ GetProjectionMatrix()

Matrix4x4 Kudan.AR.TrackerBase.GetProjectionMatrix ( )
inline

Gets the projection matrix.

Returns
The projection matrix.

Implements Kudan.AR.ITracker.

◆ GetTrackable()

Trackable Kudan.AR.TrackerBase.GetTrackable ( int  index)
inline

Gets a trackable at given index.

Returns
A trackable.
Parameters
indexIndex.

Implements Kudan.AR.ITracker.

◆ GetTrackingTexture()

Texture Kudan.AR.TrackerBase.GetTrackingTexture ( )
inline

Gets the tracking texture.

Returns
The tracking texture.

Implements Kudan.AR.ITracker.

◆ InitPlugin()

abstract bool Kudan.AR.TrackerBase.InitPlugin ( )
pure virtual

Initialisess the plugin.

Returns
true, if plugin was inited, false otherwise.

Implements Kudan.AR.ITracker.

Implemented in Kudan.AR.Tracker.

◆ IsTrackingRunning()

bool Kudan.AR.TrackerBase.IsTrackingRunning ( )
inline

Determines whether tracking is running.

Returns
true if tracking is running; otherwise, false.

Implements Kudan.AR.ITracker.

◆ OnApplicationFocus()

abstract void Kudan.AR.TrackerBase.OnApplicationFocus ( bool  focusStatus)
pure virtual

Raises the application focus event.

Parameters
focusStatusIf set to true focus status.

Implemented in Kudan.AR.Tracker.

◆ OnApplicationPause()

abstract void Kudan.AR.TrackerBase.OnApplicationPause ( bool  pauseStatus)
pure virtual

Raises the application pause event.

Parameters
pauseStatusIf set to true application is paused.

Implemented in Kudan.AR.Tracker.

◆ PostRender()

abstract void Kudan.AR.TrackerBase.PostRender ( )
pure virtual

Function called just after the current frame has been drawn.

Implemented in Kudan.AR.Tracker.

◆ RemoveTrackable()

void Kudan.AR.TrackerBase.RemoveTrackable ( string  name)
inline

Removes a trackable with a given name.

Parameters
nameName.

Implements Kudan.AR.ITracker.

◆ SetApiKey()

abstract void Kudan.AR.TrackerBase.SetApiKey ( string  key,
string  bundleId 
)
pure virtual

Sets the API key.

Parameters
keyKey.
bundleIdBundle identifier.

Implemented in Kudan.AR.Tracker.

◆ SetMarkerExtensibilityStatus()

abstract void Kudan.AR.TrackerBase.SetMarkerExtensibilityStatus ( bool  status)
pure virtual

Sets the extensability for all of the markers being added after this flag has been changed

Parameters
statusIf set to true status.

Implements Kudan.AR.ITracker.

Implemented in Kudan.AR.Tracker.

◆ SetMarkerRecoveryStatus()

abstract void Kudan.AR.TrackerBase.SetMarkerRecoveryStatus ( bool  status)
pure virtual

Sets the marker recovery status. Enabling this feature allows for quicker re-detection if a marker is lost as well as making it easier to re-detect the marker from shallower angles and greater distances. This is a feature that we recommend everyone should generally enable. N.B. Enabling this feature will use a fraction more CPU power.

Parameters
statusMarker recovery is enabled if set to true, otherwise flow recovery is disabled. Default is false.

Implements Kudan.AR.ITracker.

Implemented in Kudan.AR.Tracker.

◆ SetMaximumSimultaneousTracking()

abstract void Kudan.AR.TrackerBase.SetMaximumSimultaneousTracking ( int  maxToTrack)
pure virtual

Set the maximum number of trackables which can be tracked at the same time.

Parameters
maxToTrack

The maximum number of trackables which can be simultaneously tracked

Implements Kudan.AR.ITracker.

Implemented in Kudan.AR.Tracker.

◆ SetupRenderingCamera()

void Kudan.AR.TrackerBase.SetupRenderingCamera ( float  cameraNearPlane,
float  cameraFarPlane 
)
inline

Sets up the rendering camera.

Parameters
cameraNearPlaneCamera near plane.
cameraFarPlaneCamera far plane.

Implements Kudan.AR.ITracker.

◆ StartInputFromCamera()

abstract bool Kudan.AR.TrackerBase.StartInputFromCamera ( int  deviceIndex,
int  targetWidth,
int  targetHeight 
)
pure virtual

Starts input from a given camera device.

Returns
true, if input from camera was started, false otherwise.
Parameters
deviceIndexDevice index.
targetWidthTarget width.
targetHeightTarget height.

Implements Kudan.AR.ITracker.

Implemented in Kudan.AR.Tracker.

◆ StartInputFromImage()

abstract bool Kudan.AR.TrackerBase.StartInputFromImage ( Texture2D  image)
pure virtual

Starts input from an image.

Returns
true, if input from image was started, false otherwise.
Parameters
imageImage.

Implements Kudan.AR.ITracker.

Implemented in Kudan.AR.Tracker.

◆ StartTracking()

abstract void Kudan.AR.TrackerBase.StartTracking ( )
pure virtual

Starts tracking.

Implements Kudan.AR.ITracker.

Implemented in Kudan.AR.Tracker.

◆ StopInput()

abstract void Kudan.AR.TrackerBase.StopInput ( )
pure virtual

Stops all input.

Implements Kudan.AR.ITracker.

Implemented in Kudan.AR.Tracker.

◆ StopTracking()

abstract void Kudan.AR.TrackerBase.StopTracking ( )
pure virtual

Stops tracking.

Implements Kudan.AR.ITracker.

Implemented in Kudan.AR.Tracker.

◆ updateCam()

virtual void Kudan.AR.TrackerBase.updateCam ( )
inlinevirtual

Updates the camera.

Implements Kudan.AR.ITracker.

Reimplemented in Kudan.AR.Tracker.

◆ UpdateTracking()

abstract void Kudan.AR.TrackerBase.UpdateTracking ( )
pure virtual

Updates tracking.

Implements Kudan.AR.ITracker.

Implemented in Kudan.AR.Tracker.

Member Data Documentation

◆ _appRate

float Kudan.AR.TrackerBase._appRate
protected

The app rate, the number of times the app updates each second.

◆ _cameraFarPlane

float Kudan.AR.TrackerBase._cameraFarPlane = 1000f
protected

The default camera far plane value.

◆ _cameraNearPlane

float Kudan.AR.TrackerBase._cameraNearPlane = 0.3f
protected

The default camera near plane value.

◆ _cameraRate

float Kudan.AR.TrackerBase._cameraRate
protected

The camera rate, number of times the camera feed refreshes each second.

◆ _clonedTexture

Texture Kudan.AR.TrackerBase._clonedTexture
protected

The cloned texture.

◆ _detected

List<Trackable> Kudan.AR.TrackerBase._detected = new List<Trackable>()
protected

List of detected trackables.

◆ _finalTexture

Texture Kudan.AR.TrackerBase._finalTexture
protected

The texture used to render to the camera.

◆ _floorHeight

float Kudan.AR.TrackerBase._floorHeight = 200.0f
protected

ArbiTracker default floor height.

◆ _isTrackingRunning

bool Kudan.AR.TrackerBase._isTrackingRunning
protected

Is tracking currently running?

◆ _projectionMatrix

Matrix4x4 Kudan.AR.TrackerBase._projectionMatrix
protected

The projection matrix.

◆ _trackables

List<Trackable> Kudan.AR.TrackerBase._trackables = new List<Trackable>()
protected

List of trackables the user has loaded.

◆ _trackerRate

float Kudan.AR.TrackerBase._trackerRate
protected

The tracker rate, the number of times the tracker updates each second.

◆ _trackingThread

System.Threading.Thread Kudan.AR.TrackerBase._trackingThread
protected

The tracking thread.

Property Documentation

◆ AppFrameRate

float Kudan.AR.TrackerBase.AppFrameRate
get

Gets the app frame rate.

The app frame rate.

◆ CameraFrameRate

float Kudan.AR.TrackerBase.CameraFrameRate
get

Gets the camera frame rate.

The camera frame rate.

◆ TrackerFrameRate

float Kudan.AR.TrackerBase.TrackerFrameRate
get

Gets the tracker frame rate.

The tracker frame rate.


The documentation for this class was generated from the following file: