This is the main behaviour class that encapsulates cloud recognition behaviour. More...
Classes | |
class | CloudRecoSearchResult |
CloudReco search result that contains all known data of a specific search result. More... | |
Public Types | |
enum | InitError { NONE = 0x0 , INTERNAL = 0x1 , AUTOACTIVATION_FAILED = 0x2 , FEATURE_NOT_SUPPORTED = 0x3 , SERVICE_MISSING_AUTHENTICATION = 0x4 , NO_NETWORK_CONNECTION = 0x5 , SERVICE_NOT_AVAILABLE = 0x6 } |
enum | QueryError { NONE = 0x0 , AUTHORIZATION_FAILED = 0x01 , PROJECT_SUSPENDED = 0x02 , NO_NETWORK_CONNECTION = 0x03 , SERVICE_NOT_AVAILABLE = 0x04 , BAD_FRAME_QUALITY = 0x05 , UPDATE_SDK = 0x06 , TIMESTAMP_OUT_OF_RANGE = 0x07 , REQUEST_TIMEOUT = 0x08 } |
Status codes for the Cloud Reco query errors. More... | |
Public Member Functions | |
void | ClearObservers (bool destroyGameObjects=true) |
Clears all targets enabled for observers. | |
ObserverBehaviour | EnableObservers (CloudRecoSearchResult result, GameObject gameObject) |
Enable this search result for tracking. | |
ObserverBehaviour | EnableObservers (CloudRecoSearchResult result, string gameObjectName) |
Enable this search result for tracking. | |
IEnumerable< CloudRecoSearchResult > | GetResults () |
Returns new search results. | |
void | InitializeReco (string userAuth, string secretAuth) |
Starts initialization of the cloud-based recognition system. | |
void | RegisterOnInitErrorEventHandler (Action< InitError > handler) |
Register for event that's called when an error is reported during initialization. | |
void | RegisterOnInitializedEventHandler (Action< CloudRecoBehaviour > handler) |
Register for event that's called when the CloudRecoBehaviour has finished initializing. | |
void | RegisterOnNewSearchResultEventHandler (Action< CloudRecoSearchResult > handler) |
Register for event that's called when a new search result is found. | |
void | RegisterOnStateChangedEventHandler (Action< bool > handler) |
Register for event that's called when the RecoBehaviour starts or stops scanning. | |
void | RegisterOnUpdateErrorEventHandler (Action< QueryError > handler) |
Register for event that's called when an error is reported while updating. | |
bool | UnregisterOnInitErrorEventHandler (Action< InitError > handler) |
Unregister from event that's called when an error is reported during initialization. | |
bool | UnregisterOnInitializedEventHandler (Action< CloudRecoBehaviour > handler) |
Unregister from event that's called when the CloudRecoBehaviour has finished initializing. | |
bool | UnregisterOnNewSearchResultEventHandler (Action< CloudRecoSearchResult > handler) |
Unregister from event that's called when a new search result is found. | |
bool | UnregisterOnStateChangedEventHandler (Action< bool > handler) |
Unregister from event that's called when the RecoBehaviour starts or stops scanning. | |
bool | UnregisterOnUpdateErrorEventHandler (Action< QueryError > handler) |
Unregister from event that's called when an error is reported while updating. | |
Public Attributes | |
string | AccessKey = "" |
The user's Cloud Recognition Client Access Key. | |
string | SecretKey = "" |
The user's Cloud Recognition Client Secret Key. | |
Properties | |
bool | CloudRecoInitialized [get] |
Whether cloud reco has been initialized yet. | |
bool | RecoStarted [get] |
Whether cloud reco has started. | |
bool | Requesting [get] |
Whether cloud reco is currently performing a request. | |
Properties inherited from ObserverBehaviour | |
int? | ID [get] |
The runtime Id of the Observer. | |
string | TargetName [get] |
Name of the target of the Observer. | |
TargetStatus | TargetStatus = TargetStatus.NotObserved [get] |
Current status information of the target. | |
Additional Inherited Members | |
Events inherited from ObserverBehaviour | |
Action< ObserverBehaviour > | OnBehaviourDestroyed |
Triggered when this behaviour is destroyed. Can be used for script cleanup. | |
Action< ObserverBehaviour, TargetStatus > | OnTargetStatusChanged |
Triggered when the TargetStatus changes. | |
This is the main behaviour class that encapsulates cloud recognition behaviour.
enum InitError |
Status codes returned by the CloudRecoObserver creation
enum QueryError |
Status codes for the Cloud Reco query errors.
|
inline |
Clears all targets enabled for observers.
Destroys all Observers that have been created via EnableObserving().
|
inline |
Enable this search result for tracking.
Activates an Observer for local detection and tracking of this target. If the given game object has no ImageTargetBehaviour, a new one will be created. Note that this call may result in an earlier Observer that was enabled for tracking to be destroyed, including its ObserverBehaviour. Thus it is not advised to hold a reference to an earlier created Observer after calling EnableTracking again.
|
inline |
Enable this search result for tracking.
Activates an Observer for local detection and tracking of this target. returns a new ImageTargetBehaviour attached to a new game object with the given name. Note that this call may result in an earlier Observer that was enabled for tracking to be destroyed, including its ObserverBehaviour. Thus it is not advised to hold a reference to an earlier created Observer after calling EnableTracking again.
|
inline |
Returns new search results.
Earlier search result instances are destroyed
|
inline |
Starts initialization of the cloud-based recognition system.
Pass in the user/password for authenticating with the cloud reco server.
|
inline |
Register for event that's called when an error is reported during initialization.
|
inline |
Register for event that's called when the CloudRecoBehaviour has finished initializing.
|
inline |
Register for event that's called when a new search result is found.
|
inline |
Register for event that's called when the RecoBehaviour starts or stops scanning.
|
inline |
Register for event that's called when an error is reported while updating.
|
inline |
Unregister from event that's called when an error is reported during initialization.
|
inline |
Unregister from event that's called when the CloudRecoBehaviour has finished initializing.
|
inline |
Unregister from event that's called when a new search result is found.
|
inline |
Unregister from event that's called when the RecoBehaviour starts or stops scanning.
|
inline |
Unregister from event that's called when an error is reported while updating.
string AccessKey = "" |
The user's Cloud Recognition Client Access Key.
string SecretKey = "" |
The user's Cloud Recognition Client Secret Key.
|
get |
Whether cloud reco has been initialized yet.
|
get |
Whether cloud reco has started.
|
get |
Whether cloud reco is currently performing a request.