CraftAR Unity Pro SDK  1.0
Classes | Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | List of all members
CraftARSDK Class Reference

The CraftARSDK class is the entry point to the CraftAR Unity3D plugin and will give access to the CraftAR SDK functionalities. More...

Inheritance diagram for CraftARSDK:
CraftARSingleton< CraftARSDK >

Classes

interface  CraftARFrameDrawer
 The CraftARFrameDrawer interface offers callbacks to override the default camera preview. More...
 
interface  CraftARItemEvents
 The CraftARItemEvents interface defines the callbacks used by the CraftARSDK to notify the app about CraftARItem related events. More...
 
interface  CraftARItemEventsWithContentDownload
 The CraftARItemEventsWithContentDownload interface defines the callbacks used by the CraftARSDK to notify the app about CraftARItem related events and item contents download More...
 
interface  CraftARSDKCallbacks
 The CraftARSDKCallbacks interface defines the callbacks for receiving global events from the CrarftAR plugin related to initialisation and cloud recognition. More...
 

Public Types

enum  FrameSize : int {
  HD_WIDTH = 1280,
  HD_HEIGHT = 720,
  VGA_WIDTH = 640,
  VGA_HEIGHT = 480,
  QVGA_WIDTH = 320,
  QVGA_HEIGHT = 240,
  DEFAULT_WIDTH = -1,
  DEFAULT_HEIGHT = -1
}
 

Public Member Functions

void InstantiateItemContent (CraftARItemAR item)
 Adds the item contents to the AR scene. More...
 
void DownloadItemContents (CraftARItemAR item, bool instantiateContent)
 Downloads the item contents. This method will trigger callbacks from the CraftARItemEvents handler on item download events.

See also
CraftARSDK.setCraftARItemEventsHandler
More...
 
void setCraftARCollectionManagerInterface (CraftARCollectionManagerInterface collectionManagerInterface)
 Sets the craft AR manager callbacks handler. More...
 
void setCraftARItemEventsHandler (CraftARItemEvents itemEventsHandler)
 Sets the craft AR item events handler. More...
 
void setCraftARFrameHandler (CraftARFrameDrawer frameHandler, bool keepDrawing)
 Sets the craft AR frame handler. More...
 
VideoFrameSettings GetVideoFrameSettings ()
 Gets the video frame settings. More...
 
void setSearchPeriod (int periodMilliseconds)
 Modify the rate at which the Cloud Recognition performs searches in Finder mode. More...
 
Texture2D getFrameTexture ()
 
void triggerAutoFocus ()
 Triggers the auto focus. More...
 
void stopCapture ()
 Stops the capture. More...
 
void restartCapture ()
 Restarts the capture. More...
 
void takePicture ()
 Takes a picture. More...
 
void searchWithImage (Texture2D image)
 
void setSearchController (SearchInterface serarchInterface)
 Set the controller that will receive messages to perform visual search based on the SDK commands (singleShotSearch, startFinder, stopFinder). More...
 
void startFinderMode ()
 Starts searching the current collection in Finder Mode (continuous search). More...
 
void stopFinderMode ()
 Stops searching the current collection in Finder Mode (continuous search). More...
 
void singleShotSearch ()
 Takes a picture from the camera and performs a Cloud Image Recognition search on the current collection. More...
 
void startTracking ()
 Starts the tracking. More...
 
void stopTracking ()
 Stops the tracking. More...
 
void AddSceneARItem (CraftARItemAR item)
 Add an AR item to the scene. More...
 
CraftARError addARItemInternal (CraftARItemAR item)
 
void addItemCallback (CraftARItemAR item, CraftARError error)
 
void RemoveALLARItems ()
 
void RemoveARItem (CraftARItemAR item)
 Removes the AR item. More...
 
void setCraftARSDKCallbacksHandler (CraftARSDKCallbacks callbacksHandler)
 
void PreviewStarted (string message)
 
void NewFrame (string message)
 
- Public Member Functions inherited from CraftARSingleton< CraftARSDK >
virtual void OnSingletonDestroy ()
 
void OnDestroy ()
 

Public Attributes

List< CraftARItemARitems = new List<CraftARItemAR>()
 
bool interpolateTracking = false
 

Static Public Attributes

static string isProSDK = "false"
 
static int REQUESTED_FRAME_WIDTH = (int)FrameSize.DEFAULT_WIDTH
 
static int REQUESTED_FRAME_HEIGHT = (int)FrameSize.DEFAULT_HEIGHT
 

Protected Member Functions

override void Awake ()
 
void SDKInitialized (string message)
 
void SearchResults (string message)
 
void SearchError (string message)
 
void TokenValidated (string message)
 
void TokenValidationError ()
 
void TrackingStarted (string itemUUID)
 
void TrackingLost (string itemUUID)
 
void AddItemSuccess (string itemUUID)
 
void AddItemFail (string itemUUID)
 
void PictureTaken (string message)
 
void TakePictureFailed (string message)
 
void AddCollectionFailed (string message)
 
void CollectionAdded (string colUUID)
 
void CollectionDeleted (string message)
 
void DeleteCollectionFailed (string message)
 
void AddCollectionProgress (string message)
 
void SyncFinished (string colUUID)
 
void SyncProgress (string colUUID)
 
void SyncFailed (string colUUID)
 

Additional Inherited Members

- Static Protected Attributes inherited from CraftARSingleton< CraftARSDK >
static T m_Instance
 
- Properties inherited from CraftARSingleton< CraftARSDK >
static T instance [get]
 

Detailed Description

The CraftARSDK class is the entry point to the CraftAR Unity3D plugin and will give access to the CraftAR SDK functionalities.

The CraftARSDK class is a singleton class and it should be accessed through the CraftARSDK.instance attribute.

Member Function Documentation

◆ AddSceneARItem()

void CraftARSDK.AddSceneARItem ( CraftARItemAR  item)
inline

Add an AR item to the scene.

Parameters
itemItem.

◆ DownloadItemContents()

void CraftARSDK.DownloadItemContents ( CraftARItemAR  item,
bool  instantiateContent 
)
inline

Downloads the item contents. This method will trigger callbacks from the CraftARItemEvents handler on item download events.

See also
CraftARSDK.setCraftARItemEventsHandler

Parameters
itemItem.
instantiateContentIf set to true instantiate content.

◆ GetVideoFrameSettings()

VideoFrameSettings CraftARSDK.GetVideoFrameSettings ( )
inline

Gets the video frame settings.

Returns
The video frame settings.

◆ InstantiateItemContent()

void CraftARSDK.InstantiateItemContent ( CraftARItemAR  item)
inline

Adds the item contents to the AR scene.

Parameters
itemItem.

◆ RemoveARItem()

void CraftARSDK.RemoveARItem ( CraftARItemAR  item)
inline

Removes the AR item.

Parameters
itemItem.

◆ restartCapture()

void CraftARSDK.restartCapture ( )
inline

Restarts the capture.

◆ setCraftARCollectionManagerInterface()

void CraftARSDK.setCraftARCollectionManagerInterface ( CraftARCollectionManagerInterface  collectionManagerInterface)
inline

Sets the craft AR manager callbacks handler.

Parameters
callbacksHandlerCallbacks handler.

◆ setCraftARFrameHandler()

void CraftARSDK.setCraftARFrameHandler ( CraftARFrameDrawer  frameHandler,
bool  keepDrawing 
)
inline

Sets the craft AR frame handler.

Parameters
frameHandlerFrame handler.
keepDrawingIf set to true keep drawing.

◆ setCraftARItemEventsHandler()

void CraftARSDK.setCraftARItemEventsHandler ( CraftARItemEvents  itemEventsHandler)
inline

Sets the craft AR item events handler.

Parameters
itemEventsHandlerItem events handler.

◆ setSearchController()

void CraftARSDK.setSearchController ( SearchInterface  serarchInterface)
inline

Set the controller that will receive messages to perform visual search based on the SDK commands (singleShotSearch, startFinder, stopFinder).

◆ setSearchPeriod()

void CraftARSDK.setSearchPeriod ( int  periodMilliseconds)
inline

Modify the rate at which the Cloud Recognition performs searches in Finder mode.

This SearchController will search only when there are no previous petitions pending.

Parameters
periodMillisecondsrequested period in ms (must be >= 500ms , which means a maximum of 2 requests/second).

◆ singleShotSearch()

void CraftARSDK.singleShotSearch ( )
inline

Takes a picture from the camera and performs a Cloud Image Recognition search on the current collection.

◆ startFinderMode()

void CraftARSDK.startFinderMode ( )
inline

Starts searching the current collection in Finder Mode (continuous search).

◆ startTracking()

void CraftARSDK.startTracking ( )
inline

Starts the tracking.

◆ stopCapture()

void CraftARSDK.stopCapture ( )
inline

Stops the capture.

◆ stopFinderMode()

void CraftARSDK.stopFinderMode ( )
inline

Stops searching the current collection in Finder Mode (continuous search).

◆ stopTracking()

void CraftARSDK.stopTracking ( )
inline

Stops the tracking.

◆ takePicture()

void CraftARSDK.takePicture ( )
inline

Takes a picture.

◆ triggerAutoFocus()

void CraftARSDK.triggerAutoFocus ( )
inline

Triggers the auto focus.


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