documentation

AbstractApplicationWrapper

Functions for managing AbstractApplicationWrapper objects. More...

Functions

VL_SDK_API vlAbstractApplicationWrapper_t *VL_CALLINGCONVENTION vlNew_AbstractApplicationWrapper ()
 Creates an AbstractApplicationWrapper object. More...
 
VL_SDK_API void VL_CALLINGCONVENTION vlDelete_AbstractApplicationWrapper (vlAbstractApplicationWrapper_t *abstractApplicationWrapper)
 Deletes an AbstractApplicationWrapper object. More...
 
VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_FoundBlockedFeatures (vlAbstractApplicationWrapper_t *abstractApplicationWrapper)
 Returns whether any features are used, which are not licensed. More...
 
VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_ActivateFoundBlockedFeatures (vlAbstractApplicationWrapper_t *abstractApplicationWrapper)
 Simulates the usage of blocked features. More...
 
VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_GetHostID (vlAbstractApplicationWrapper_t *abstractApplicationWrapper, char hostID[], unsigned int maxSize)
 Copies the host ID of the current machine into the provided buffer as zero terminated string. More...
 
VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_GetBundleID (vlAbstractApplicationWrapper_t *abstractApplicationWrapper, char bundleID[], unsigned int maxSize)
 Copies the bundle ID of the current application into the provided buffer as zero terminated string. More...
 
VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_SetLicenseFilePath (vlAbstractApplicationWrapper_t *abstractApplicationWrapper, const char *licenseFilePath)
 Sets the path of the license file. More...
 
VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_SetLicenseFileData (vlAbstractApplicationWrapper_t *abstractApplicationWrapper, const char *licenseFileData)
 Allows to inject the license data from memory. More...
 
VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_GetLicenseInformation (vlAbstractApplicationWrapper_t *abstractApplicationWrapper, char licenseInfo[], unsigned int maxSize)
 Retrieves actual license information as a JSON encoded string. More...
 
VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_AutoLoadPlugins (vlAbstractApplicationWrapper_t *abstractApplicationWrapper, const char pluginPath[])
 Loads all VisionLib plugins from a specific directory. More...
 
VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_GetTrackerType (vlAbstractApplicationWrapper_t *abstractApplicationWrapper, char trackerType[], unsigned int maxSize)
 Returns the type of the loaded tracking pipeline. More...
 
VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_ClearProject (vlAbstractApplicationWrapper_t *abstractApplicationWrapper)
 Clears the ActionPipe and DataSet. More...
 
VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_LoadProjectData (vlAbstractApplicationWrapper_t *abstractApplicationWrapper, const char filename[])
 Loads the specified tracking configuration XML file. More...
 
VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_LoadProjectDataFromString (vlAbstractApplicationWrapper_t *abstractApplicationWrapper, const char str[], const char fakeFilename[])
 Loads the given string as tracking configuration. More...
 
VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_RegisterThread (vlAbstractApplicationWrapper_t *abstractApplicationWrapper)
 Registers the current thread for the AbstractApplication. More...
 
VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_GetDeviceInfo (vlAbstractApplicationWrapper_t *abstractApplicationWrapper, char buffer[], unsigned int maxSize)
 Copies a JSON string with information about the current device into the provided buffer. More...
 
VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_AddCameraCalibrationDB (vlAbstractApplicationWrapper_t *abstractApplicationWrapper, const char uri[])
 Adds a given URI pointing to a camera calibration database JSON file to the VisionLib. More...
 
VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_ResetCameraCalibrationDB (vlAbstractApplicationWrapper_t *abstractApplicationWrapper)
 Removes all references to all manually set calibration data bases. More...
 

Detailed Description

Functions for managing AbstractApplicationWrapper objects.

The AbstractApplicationWrapper is a wrapper for the AbstractApplication. The AbstractApplication represents the tracking context and it stores the global ActionPipe and DataSet.

Function Documentation

◆ vlAbstractApplicationWrapper_ActivateFoundBlockedFeatures()

VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_ActivateFoundBlockedFeatures ( vlAbstractApplicationWrapper_t abstractApplicationWrapper)

Simulates the usage of blocked features.

This can be used for testing unlicensed behaviour on machines with a valid license.

Parameters
abstractApplicationWrapperPointer to an AbstractApplicationWrapper object.
Returns
true, on success; false otherwise.

◆ vlAbstractApplicationWrapper_AddCameraCalibrationDB()

VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_AddCameraCalibrationDB ( vlAbstractApplicationWrapper_t abstractApplicationWrapper,
const char  uri[] 
)

Adds a given URI pointing to a camera calibration database JSON file to the VisionLib.

The VisionLib loads the added camera calibration database file before loading a new tracking configuration file.

This allows to provide a custom camera calibrations for devices for which the VisionLib doesn't provide a default calibration. If a default calibration with the same name already exists, then the default calibration will get overwritten with the custom calibration.

Please also have a look at this reference for more information about the camera calibration database format.

Parameters
abstractApplicationWrapperPointer to an AbstractApplicationWrapper object.
uriZero terminated string with an URI pointing to the camera calibration database file.
Returns
true, on success; false otherwise.

◆ vlAbstractApplicationWrapper_AutoLoadPlugins()

VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_AutoLoadPlugins ( vlAbstractApplicationWrapper_t abstractApplicationWrapper,
const char  pluginPath[] 
)

Loads all VisionLib plugins from a specific directory.

Many VisionLib features are implemented as plugins, which need to be loaded first.

Parameters
abstractApplicationWrapperPointer to an AbstractApplicationWrapper object.
pluginPathPlugin directory as zero terminated string. Can be an empty string in which case the plugins will be loaded from the directory stored inside the PM_PLUGIN_PATH environment variable. If this environment variable is not defined, then the plugins will be loaded from the directory of the current executable.
Returns
true, on success; false otherwise.

◆ vlAbstractApplicationWrapper_ClearProject()

VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_ClearProject ( vlAbstractApplicationWrapper_t abstractApplicationWrapper)

Clears the ActionPipe and DataSet.

Please notice, that all wrapper objects for DataBase objects and Actions will be left in an invalid state after calling this function.

Parameters
abstractApplicationWrapperPointer to an AbstractApplicationWrapper object.
Returns
true, on success; false otherwise.

◆ vlAbstractApplicationWrapper_FoundBlockedFeatures()

VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_FoundBlockedFeatures ( vlAbstractApplicationWrapper_t abstractApplicationWrapper)

Returns whether any features are used, which are not licensed.

The 'blocked features' status will be re-evaluated from time to time.

Parameters
abstractApplicationWrapperPointer to an AbstractApplicationWrapper object.
Returns
true, if unlicensed features are used; false otherwise.

◆ vlAbstractApplicationWrapper_GetBundleID()

VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_GetBundleID ( vlAbstractApplicationWrapper_t abstractApplicationWrapper,
char  bundleID[],
unsigned int  maxSize 
)

Copies the bundle ID of the current application into the provided buffer as zero terminated string.

The bundle ID is necessary for generating a license file.

Parameters
abstractApplicationWrapperPointer to an AbstractApplicationWrapper object.
bundleIDBuffer for storing the bundle ID as zero terminated string. The string will be empty if no bundle ID is available on the system.
maxSizeSize of the buffer.
Returns
true, on success; false otherwise or not available.

◆ vlAbstractApplicationWrapper_GetDeviceInfo()

VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_GetDeviceInfo ( vlAbstractApplicationWrapper_t abstractApplicationWrapper,
char  buffer[],
unsigned int  maxSize 
)

Copies a JSON string with information about the current device into the provided buffer.

It also contains information about the cameras currently connected to the system.

A typical device info might look like this:

{
"appID": "com.unity3d.UnityEditor5.x",
"availableCameras": [{
"cameraName": "HD Webcam C525",
"deviceID": "HDWebcamC525",
"internalID": "0x400000046d0826",
"position": "unknown",
"prefRes": "640x480"
}],
"cameraAllowed": false,
"currentDisplayOrientation": 0,
"hasWebServer": false,
"internalModelID": "x86_64",
"manufacture": "Apple",
"model": "Mac",
"modelVersion": "Mac",
"nativeResX": 242,
"nativeResY": 0,
"numberOfProcessors": 1,
"os": "macOS",
"unifiedID": "1467016391MY190",
"usingEventLogger": false,
"webServerURL": ""
}
Parameters
abstractApplicationWrapperPointer to an AbstractApplicationWrapper object.
bufferBuffer for storing the JSON string.
maxSizeThe size of the buffer.
Returns
true, on success; false otherwise.

◆ vlAbstractApplicationWrapper_GetHostID()

VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_GetHostID ( vlAbstractApplicationWrapper_t abstractApplicationWrapper,
char  hostID[],
unsigned int  maxSize 
)

Copies the host ID of the current machine into the provided buffer as zero terminated string.

The host ID is necessary for generating a license file.

Parameters
abstractApplicationWrapperPointer to an AbstractApplicationWrapper object.
hostIDBuffer for storing the host ID as zero terminated string. The string will be empty if no host ID is available on the system.
maxSizeSize of the buffer.
Returns
true, on success; false otherwise.

◆ vlAbstractApplicationWrapper_GetLicenseInformation()

VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_GetLicenseInformation ( vlAbstractApplicationWrapper_t abstractApplicationWrapper,
char  licenseInfo[],
unsigned int  maxSize 
)

Retrieves actual license information as a JSON encoded string.

The string is JSON encoded and can be used for examining available license features. It can only be valid after a license file has been set.

Parameters
abstractApplicationWrapperPointer to an AbstractApplicationWrapper object.
licenseInfoBuffer for storing the license information as zero terminated JSON string. The string will be empty if no license information is available on the system.
maxSizeSize of the buffer.
Returns
true, on success; false otherwise or not available.

◆ vlAbstractApplicationWrapper_GetTrackerType()

VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_GetTrackerType ( vlAbstractApplicationWrapper_t abstractApplicationWrapper,
char  trackerType[],
unsigned int  maxSize 
)

Returns the type of the loaded tracking pipeline.

This only works for tracking configurations loaded from a vl-file or vl-string.

Parameters
abstractApplicationWrapperPointer to an AbstractApplicationWrapper object.
trackerTypeBuffer for storing the tracker type as zero terminated string.
maxSizeSize of the buffer.
Returns
true, on success; false otherwise.

◆ vlAbstractApplicationWrapper_LoadProjectData()

VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_LoadProjectData ( vlAbstractApplicationWrapper_t abstractApplicationWrapper,
const char  filename[] 
)

Loads the specified tracking configuration XML file.

Please notice, that all wrapper objects for DataBase objects and Actions will be left in an invalid state after calling this function.

Parameters
abstractApplicationWrapperPointer to an AbstractApplicationWrapper object.
filenameFilename of the tracking configuration.
Returns
true, on success; false otherwise.

◆ vlAbstractApplicationWrapper_LoadProjectDataFromString()

VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_LoadProjectDataFromString ( vlAbstractApplicationWrapper_t abstractApplicationWrapper,
const char  str[],
const char  fakeFilename[] 
)

Loads the given string as tracking configuration.

Please notice, that all wrapper objects for DataBase objects and Actions will be left in an invalid state after calling this function.

Parameters
abstractApplicationWrapperPointer to an AbstractApplicationWrapper object.
strString with the tracking configuration.
fakeFilenameFilename which will be used to determine the type of the tracking configuration (vl / PM) and for resolving relative file paths and the type of the tracking configuration.
Returns
true, on success; false otherwise.

◆ vlAbstractApplicationWrapper_RegisterThread()

VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_RegisterThread ( vlAbstractApplicationWrapper_t abstractApplicationWrapper)

Registers the current thread for the AbstractApplication.

Parameters
abstractApplicationWrapperPointer to an AbstractApplicationWrapper object.
Returns
true, on success; false otherwise.

◆ vlAbstractApplicationWrapper_ResetCameraCalibrationDB()

VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_ResetCameraCalibrationDB ( vlAbstractApplicationWrapper_t abstractApplicationWrapper)

Removes all references to all manually set calibration data bases.

The VisionLib loads the added camera calibration database file before loading a new tracking configuration file. This command removes the queue of file to be loaded.

This allows to provide a custom camera calibrations for devices for which the VisionLib doesn't provide a default calibration. If a default calibration with the same name already exists, then the default calibration will get overwritten with the custom calibration.

Please also have a look at this reference for more information about the camera calibration database format.

Parameters
abstractApplicationWrapperPointer to an AbstractApplicationWrapper object.
Returns
true, on success; false otherwise.

◆ vlAbstractApplicationWrapper_SetLicenseFileData()

VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_SetLicenseFileData ( vlAbstractApplicationWrapper_t abstractApplicationWrapper,
const char *  licenseFileData 
)

Allows to inject the license data from memory.

This is mandatory for being able to run the tracking. Alternatively you can load the license data from a file using the vlAbstractApplicationWrapper_SetLicenseFilePath function. If the vlAbstractApplicationWrapper_SetLicenseFileData was previously used and now the license data should be read from a file, then please set the license file data to an empty string first.

Parameters
abstractApplicationWrapperPointer to an AbstractApplicationWrapper object.
licenseFileDataZero terminated string with the license data.
Returns
true, on success; false otherwise.

◆ vlAbstractApplicationWrapper_SetLicenseFilePath()

VL_SDK_API bool VL_CALLINGCONVENTION vlAbstractApplicationWrapper_SetLicenseFilePath ( vlAbstractApplicationWrapper_t abstractApplicationWrapper,
const char *  licenseFilePath 
)

Sets the path of the license file.

This is mandatory for being able to run the tracking. Alternatively you can inject the license file from memory using the vlAbstractApplicationWrapper_SetLicenseFileData function.

Parameters
abstractApplicationWrapperPointer to an AbstractApplicationWrapper object.
licenseFilePathZero terminated string with a path to the license file.
Returns
true, on success; false otherwise.

◆ vlDelete_AbstractApplicationWrapper()

VL_SDK_API void VL_CALLINGCONVENTION vlDelete_AbstractApplicationWrapper ( vlAbstractApplicationWrapper_t abstractApplicationWrapper)

Deletes an AbstractApplicationWrapper object.

Call this function after you are done using your AbstractApplicationWrapper object to avoid memory leaks.

◆ vlNew_AbstractApplicationWrapper()

VL_SDK_API vlAbstractApplicationWrapper_t* VL_CALLINGCONVENTION vlNew_AbstractApplicationWrapper ( )

Creates an AbstractApplicationWrapper object.

Use vlDelete_AbstractApplicationWrapper after usage to avoid memory leaks.

Returns
Pointer to an AbstractApplicationWrapper object.