KudanAR - Unity  1.6.0
Kudan.AR.KudanTracker Class Reference

Inherits MonoBehaviour.

Public Member Functions

void AddTrackable (byte[] data, string id)
 Adds a single trackable to the tracker from image data, names it with the given string, and applies any settings. This method uses the default values for whether this trackable should use extended tracking or auto-cropping. More...
 
void AddTrackable (byte[] data, string id, bool extensible)
 Adds a single trackable to the tracker from image data, names it with the given string, and sets whether the trackable should utilise extended tracking or auto-cropping. More...
 
void AddTrackableSet (string pathToFile, string ID)
 Adds a .KARMarker data set to the tracker with a given name. More...
 
void StartTracking ()
 Start tracking with this tracker. More...
 
void StopTracking ()
 Stop tracking with this tracker. More...
 
void ChangeTrackingMethod (TrackingMethodBase newTrackingMethod)
 Changes the current tracking method to the given tracking method. More...
 
void ArbiTrackStart (Vector3 position, Quaternion orientation)
 Start ArbiTrack on the current platform. More...
 
void ArbiTrackStop ()
 Stop ArbiTrack and return to placement mode. More...
 
bool ArbiTrackIsTracking ()
 Checks if arbitrary tracking is currently running. More...
 
void FloorPlaceGetPose (out Vector3 position, out Quaternion orientation)
 Gets the current position and orientation of the floor, relative to the device. More...
 
void ArbiTrackGetPose (out Vector3 position, out Quaternion orientation)
 Gets the current position and orientation of the markerless driver being tracked. More...
 
bool HasActiveTrackingData ()
 Determines whether or not the tracker is currently detecting a trackable. More...
 
void SetArbiTrackFloorHeight (float floorHeight)
 Sets the position of the floor plane that ArbiTrack uses as a reference for tracking. More...
 
bool StartLineRendering ()
 Starts line rendering. More...
 
void takeScreenshot ()
 Takes a screenshot of the camera feed and any projected objects, without any UI. More...
 

Public Attributes

string _EditorAPIKey = string.Empty
 The license key used to run the plugin in the Editor. By registering an account on the Kudan website, you can claim one free key for personal use. NOTE: This key is separate from the API Key checked on iOS and Android builds. Use _APIKey for those platforms. More...
 
string _APIKey = string.Empty
 The API License key used to run the plugin on mobile platforms. Development keys can be obtained from https://wiki.kudan.eu/Development_License_Keys. In order to publish an app using the Kudan plugin to the app store, a license is required. Publish keys can be bought at https://www.kudan.eu/pricing/. More...
 
TrackingMethodBase _defaultTrackingMethod
 The default tracking method used by the tracker when the app starts. More...
 
TrackingMethodBase[] _trackingMethods
 Array of all tracking methods that can be used by the tracker. More...
 
bool _useFrontFacingCameraOnMobile
 Setting this to true gets the front-facing camera instead of defaulting to the back-facing camera. NOTE: This only applies to mobile devices. In the Editor use the WebCamID instead. More...
 
bool _markerRecoveryMode
 Whether or not Marker Recovery Mode is enabled. This feature allows for quick re-detection of a marker after it has been lost. It is also easier to re-detect the marker from shallower angles and greater distances. More...
 
bool _markerExtensibility
 Whether the markers should be used with Extensibility turned on. Please note this should only be used with stationary markers. That means that if your marker at all moves, you should not use this mode. Extended Tracking and Detection is a feature where trackables can be extended by automatically creating new markers from the surrounding scene. This means that after being expanded, trackables can be detected and tracked from much further away. Enabling this feature will use slightly more memory space. More...
 
int _maxToTrack
 Set the maximum number of trackables which can be tracked at the same time. More...
 
bool _makePersistent = true
 Whether or not to make this tracker persist between scenes. More...
 
bool _startOnEnable = true
 Whether or not to initialise this tracker when it is loaded. More...
 
bool _applyProjection = true
 Whether or not to apply the projection matrix of the tracker to the camera. More...
 
Camera _renderingCamera
 The camera to apply the projection matrix to. If left blank, this will use the main camera. More...
 
Renderer _background
 Reference to the Mesh Renderer component of the object the camera texture is being drawn to. More...
 
bool _displayDebugGUI = true
 Whether or not to display the debug GUI. More...
 
int _debugGUIScale = 1
 Overall size of the debug GUI on the screen. More...
 
Shader _debugFlatShader
 The debug shader. More...
 

Protected Attributes

TrackerBase _trackerPlugin
 Reference to the tracker class, which interfaces between Unity and the native frameworks. More...
 
Trackable[] _lastDetectedTrackables
 Array containing all trackables that were detected in the previous frame. More...
 

Properties

TrackerBase Interface [get]
 Gets the interface exposing the Kudan API for those that need scripting control. More...
 
TrackingMethodBase CurrentTrackingMethod [get]
 Gets the current tracking method. More...
 

Member Function Documentation

◆ AddTrackable() [1/2]

void Kudan.AR.KudanTracker.AddTrackable ( byte[]  data,
string  id 
)
inline

Adds a single trackable to the tracker from image data, names it with the given string, and applies any settings. This method uses the default values for whether this trackable should use extended tracking or auto-cropping.

Returns
true, if trackable was successfully added to the tracker, false otherwise.
Parameters
dataThe array of image data.
idA name applied to the trackable to identify it in the tracker while the app is running.

◆ AddTrackable() [2/2]

void Kudan.AR.KudanTracker.AddTrackable ( byte[]  data,
string  id,
bool  extensible 
)
inline

Adds a single trackable to the tracker from image data, names it with the given string, and sets whether the trackable should utilise extended tracking or auto-cropping.

Returns
true, if trackable was successfully added to the tracker, false otherwise.
Parameters
dataThe array of image data.
idA name applied to the trackable to identify it in the tracker while the app is running.
extensibleIf set to true the loaded trackable will use extended tracking.

◆ AddTrackableSet()

void Kudan.AR.KudanTracker.AddTrackableSet ( string  pathToFile,
string  ID 
)
inline

Adds a .KARMarker data set to the tracker with a given name.

Returns
true<c>/c>, if the data set was successfully added to the tracker, false otherwise.
Parameters
pathToFileThe filepath pointing to the data set.
idA string used to identify the data set while the app is running.

◆ ArbiTrackGetPose()

void Kudan.AR.KudanTracker.ArbiTrackGetPose ( out Vector3  position,
out Quaternion  orientation 
)
inline

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

Parameters
positionThe position of the markerless transform driver.
orientationThe orientation of the markerless transform driver.

◆ ArbiTrackIsTracking()

bool Kudan.AR.KudanTracker.ArbiTrackIsTracking ( )
inline

Checks if arbitrary tracking is currently running.

Returns
true<c>/c>, if ArbiTrack is running false if not.

◆ ArbiTrackStart()

void Kudan.AR.KudanTracker.ArbiTrackStart ( Vector3  position,
Quaternion  orientation 
)
inline

Start ArbiTrack on the current platform.

Parameters
positionPosition to start tracking at.
orientationOrientation to start tracking at.

◆ ArbiTrackStop()

void Kudan.AR.KudanTracker.ArbiTrackStop ( )
inline

Stop ArbiTrack and return to placement mode.

◆ ChangeTrackingMethod()

void Kudan.AR.KudanTracker.ChangeTrackingMethod ( TrackingMethodBase  newTrackingMethod)
inline

Changes the current tracking method to the given tracking method.

Parameters
newTrackingMethodNew tracking method.

◆ FloorPlaceGetPose()

void Kudan.AR.KudanTracker.FloorPlaceGetPose ( out Vector3  position,
out Quaternion  orientation 
)
inline

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

Parameters
positionPosition of the floor, relative to the camera.
orientationOrientation of the floor, relative to the camera.

◆ HasActiveTrackingData()

bool Kudan.AR.KudanTracker.HasActiveTrackingData ( )
inline

Determines whether or not the tracker is currently detecting a trackable.

Returns
true if the tracker tracked at least one trackable this frame, false otherwise.

◆ SetArbiTrackFloorHeight()

void Kudan.AR.KudanTracker.SetArbiTrackFloorHeight ( float  floorHeight)
inline

Sets the position of the floor plane that ArbiTrack uses as a reference for tracking.

Parameters
floorHeightHow far from the camera the floor is positioned.

◆ StartLineRendering()

bool Kudan.AR.KudanTracker.StartLineRendering ( )
inline

Starts line rendering.

Returns
true, if line rendering was started, false otherwise.

◆ StartTracking()

void Kudan.AR.KudanTracker.StartTracking ( )
inline

Start tracking with this tracker.

◆ StopTracking()

void Kudan.AR.KudanTracker.StopTracking ( )
inline

Stop tracking with this tracker.

◆ takeScreenshot()

void Kudan.AR.KudanTracker.takeScreenshot ( )
inline

Takes a screenshot of the camera feed and any projected objects, without any UI.

Member Data Documentation

◆ _APIKey

string Kudan.AR.KudanTracker._APIKey = string.Empty

The API License key used to run the plugin on mobile platforms. Development keys can be obtained from https://wiki.kudan.eu/Development_License_Keys. In order to publish an app using the Kudan plugin to the app store, a license is required. Publish keys can be bought at https://www.kudan.eu/pricing/.

◆ _applyProjection

bool Kudan.AR.KudanTracker._applyProjection = true

Whether or not to apply the projection matrix of the tracker to the camera.

◆ _background

Renderer Kudan.AR.KudanTracker._background

Reference to the Mesh Renderer component of the object the camera texture is being drawn to.

◆ _debugFlatShader

Shader Kudan.AR.KudanTracker._debugFlatShader

The debug shader.

◆ _debugGUIScale

int Kudan.AR.KudanTracker._debugGUIScale = 1

Overall size of the debug GUI on the screen.

◆ _defaultTrackingMethod

TrackingMethodBase Kudan.AR.KudanTracker._defaultTrackingMethod

The default tracking method used by the tracker when the app starts.

◆ _displayDebugGUI

bool Kudan.AR.KudanTracker._displayDebugGUI = true

Whether or not to display the debug GUI.

◆ _EditorAPIKey

string Kudan.AR.KudanTracker._EditorAPIKey = string.Empty

The license key used to run the plugin in the Editor. By registering an account on the Kudan website, you can claim one free key for personal use. NOTE: This key is separate from the API Key checked on iOS and Android builds. Use _APIKey for those platforms.

◆ _lastDetectedTrackables

Trackable [] Kudan.AR.KudanTracker._lastDetectedTrackables
protected

Array containing all trackables that were detected in the previous frame.

◆ _makePersistent

bool Kudan.AR.KudanTracker._makePersistent = true

Whether or not to make this tracker persist between scenes.

◆ _markerExtensibility

bool Kudan.AR.KudanTracker._markerExtensibility

Whether the markers should be used with Extensibility turned on. Please note this should only be used with stationary markers. That means that if your marker at all moves, you should not use this mode. Extended Tracking and Detection is a feature where trackables can be extended by automatically creating new markers from the surrounding scene. This means that after being expanded, trackables can be detected and tracked from much further away. Enabling this feature will use slightly more memory space.

◆ _markerRecoveryMode

bool Kudan.AR.KudanTracker._markerRecoveryMode

Whether or not Marker Recovery Mode is enabled. This feature allows for quick re-detection of a marker after it has been lost. It is also easier to re-detect the marker from shallower angles and greater distances.

NOTE: The Recovery Mode uses slightly more CPU power while tracking.

◆ _maxToTrack

int Kudan.AR.KudanTracker._maxToTrack

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

◆ _renderingCamera

Camera Kudan.AR.KudanTracker._renderingCamera

The camera to apply the projection matrix to. If left blank, this will use the main camera.

◆ _startOnEnable

bool Kudan.AR.KudanTracker._startOnEnable = true

Whether or not to initialise this tracker when it is loaded.

◆ _trackerPlugin

TrackerBase Kudan.AR.KudanTracker._trackerPlugin
protected

Reference to the tracker class, which interfaces between Unity and the native frameworks.

◆ _trackingMethods

TrackingMethodBase [] Kudan.AR.KudanTracker._trackingMethods

Array of all tracking methods that can be used by the tracker.

◆ _useFrontFacingCameraOnMobile

bool Kudan.AR.KudanTracker._useFrontFacingCameraOnMobile

Setting this to true gets the front-facing camera instead of defaulting to the back-facing camera. NOTE: This only applies to mobile devices. In the Editor use the WebCamID instead.

Property Documentation

◆ CurrentTrackingMethod

TrackingMethodBase Kudan.AR.KudanTracker.CurrentTrackingMethod
get

Gets the current tracking method.

◆ Interface

TrackerBase Kudan.AR.KudanTracker.Interface
get

Gets the interface exposing the Kudan API for those that need scripting control.


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