C++ Java Unity
Unity Reference
RuntimeImageSource Class Reference

A handle for creating a new Trackable from an image file in a DataSet. More...

Inheritance diagram for RuntimeImageSource:
TrackableSource

Public Member Functions

bool SetFile (VuforiaUnity.StorageType storageType, string filePath, float widthInMeters, string targetName)
 Set the RuntimeImageSource to the image found at the path provided. When using VuforiaUnity.StorageType.STORAGE_APPRESOURCE as storage type on iOS, the used images must be located in the StreamingAssets/Vuforia folder. More...
 
bool SetImage (Texture2D texture, float widthInMeters, string targetName)
 Set the RuntimeImageSource to the contents of a Unity Texture. Note: The texture must be readable. More...
 
bool SetImage (IntPtr texturePointer, int pixelWidthOfTexture, int pixelHeightOfTexture, TextureFormat textureFormat, float widthInMeters, string targetName)
 Set the RuntimeImageSource to raw image data loaded by functions independent from Vuforia Engine. Note: Currently only unpadded image sources are correctly supported More...
 

Detailed Description

A handle for creating a new Trackable from an image file in a DataSet.

The RuntimeImageSource class is used to add a Trackable object to a DataSet instance from existing data. Either images loaded from files or raw data created by other sources are supported.

Member Function Documentation

bool SetFile ( VuforiaUnity.StorageType  storageType,
string  filePath,
float  widthInMeters,
string  targetName 
)

Set the RuntimeImageSource to the image found at the path provided. When using VuforiaUnity.StorageType.STORAGE_APPRESOURCE as storage type on iOS, the used images must be located in the StreamingAssets/Vuforia folder.

Parameters
storageTypeThe type of the path provided
filePathFile the location of the image to be used as target
widthInMetersThe real world size of the target in meters
targetNameThe name of the resulting trackable
bool SetImage ( Texture2D  texture,
float  widthInMeters,
string  targetName 
)

Set the RuntimeImageSource to the contents of a Unity Texture. Note: The texture must be readable.

Parameters
textureA texture that the new Image Target is created from
widthInMetersThe real world size of the target in meters
targetNameThe name of the resulting trackable
bool SetImage ( IntPtr  texturePointer,
int  pixelWidthOfTexture,
int  pixelHeightOfTexture,
TextureFormat  textureFormat,
float  widthInMeters,
string  targetName 
)

Set the RuntimeImageSource to raw image data loaded by functions independent from Vuforia Engine. Note: Currently only unpadded image sources are correctly supported

Parameters
texturePointerPointer to the memory location of the image buffer
pixelWidthOfTextureThe width of the image in pixels
pixelHeightOfTextureThe height of the image in pixels
textureFormatThe texture format of the image
widthInMetersThe real world size of the target in meters
targetNameThe name of the resulting trackable