C API Unity API
Unity API Reference
ObserverFactory Class Reference

Provides methods to create Vuforia tracked targets More...

Public Member Functions

AnchorBehaviour CreateAnchorBehaviour (string name, Vector3 position, Quaternion rotation)
 Creates an Anchor Behaviour in mid air using the transform of the pose (position/rotation) where it should be anchored. More...
 
AnchorBehaviour CreateAnchorBehaviour (string name, HitTestResult hitTestResult)
 Creates an Anchor Behaviour on a plane using the location (position/rotation) of a HitTestResult from a previous World.HitTest(). More...
 
AreaTargetBehaviour CreateAreaTarget (string databasePath, string targetName)
 Creates an Area Target Behaviour from a target stored in a Vuforia database. More...
 
IEnumerable< ObserverBehaviourCreateBehavioursFromDatabase (string databasePath)
 Creates Behaviours from all observers in a database. More...
 
CloudRecoBehaviour CreateCloudRecoBehaviour (string accessKey, string secretKey)
 Creates a Cloud Recognition using auth keys. Then initializes the reco. More...
 
CylinderTargetBehaviour CreateCylinderTarget (string databasePath, string targetName)
 Creates a Cylinder Target Behaviour from a target stored in a Vuforia database. More...
 
ImageTargetBehaviour CreateImageTarget (string databasePath, string targetName)
 Creates an Image Target Behaviour from a target stored in a Vuforia database. More...
 
ImageTargetBehaviour CreateImageTarget (string filePath, float widthInMeters, string targetName)
 Creates an Image Target from a path to a Unity Texture file. More...
 
ImageTargetBehaviour CreateImageTarget (Texture2D texture, float widthInMeters, string targetName)
 Creates an Image Target from a Unity Texture2D. More...
 
ImageTargetBehaviour CreateImageTarget (IntPtr texturePointer, int textureWidth, int textureHeight, TextureFormat format, float widthInMeters, string targetName)
 Create an Image Target using raw image data loaded by functions independent from Vuforia Engine. More...
 
ModelTargetBehaviour CreateModelTarget (string databasePath, string targetName, ModelTargetBehaviour.ModelTargetTrackingMode?trackingMode=null, ModelTargetBehaviour.TargetMotionHint?motionHint=null)
 Creates a Model Target Behaviour from a target stored in a Vuforia database. More...
 
MultiTargetBehaviour CreateMultiTarget (string databasePath, string targetName)
 Creates a Multi Target Behaviour from a target stored in a Vuforia database. More...
 
ObjectTargetBehaviour CreateObjectTargetBehaviour (string databasePath, string targetName)
 Creates a Object Target Behaviour from a target stored in a Vuforia database. More...
 
VuMarkBehaviour CreateVuMarkBehaviour (string databasePath, string targetName)
 Creates a VuMark Behaviour from a target stored in a Vuforia database. More...
 

Detailed Description

Provides methods to create Vuforia tracked targets

Member Function Documentation

AnchorBehaviour CreateAnchorBehaviour ( string  name,
Vector3  position,
Quaternion  rotation 
)
inline

Creates an Anchor Behaviour in mid air using the transform of the pose (position/rotation) where it should be anchored.

Parameters
nameThe logical name of the anchor. This must be unique among all created anchors.
positionThe position at which the anchor will be created.
rotationThe rotation of the anchor that will be created.
Returns
The Anchor Behaviour at the specified position and rotation.
AnchorBehaviour CreateAnchorBehaviour ( string  name,
HitTestResult  hitTestResult 
)
inline

Creates an Anchor Behaviour on a plane using the location (position/rotation) of a HitTestResult from a previous World.HitTest().

Parameters
nameThe logical name of the anchor. This must be unique among all created anchors.
hitTestResultThe HitTestResult containing the pose at which the anchor will be created on a plane.
Returns
The Anchor Behaviour on the plane at the location of the hit test.
AreaTargetBehaviour CreateAreaTarget ( string  databasePath,
string  targetName 
)
inline

Creates an Area Target Behaviour from a target stored in a Vuforia database.

Parameters
databasePathThe path to the XML file of the database that contains the target. Must be either an absolute path or relative to "StreamingAssets".
targetNameThe name of the target in the database.
Returns
The Area Target Behaviour created from the specified target.
IEnumerable<ObserverBehaviour> CreateBehavioursFromDatabase ( string  databasePath)
inline

Creates Behaviours from all observers in a database.

Parameters
databasePathThe path to the XML file of the database for which to load observer Behaviours. Must be either an absolute path or relative to "StreamingAssets".
Returns
A list of Behaviours extracted from the targets in the database.
CloudRecoBehaviour CreateCloudRecoBehaviour ( string  accessKey,
string  secretKey 
)
inline

Creates a Cloud Recognition using auth keys. Then initializes the reco.

Returns
The CloudReco Behaviour from the provided auth keys.
CylinderTargetBehaviour CreateCylinderTarget ( string  databasePath,
string  targetName 
)
inline

Creates a Cylinder Target Behaviour from a target stored in a Vuforia database.

Parameters
databasePathThe path to the XML file of the database that contains the target. Must be either an absolute path or relative to "StreamingAssets".
targetNameThe name of the target in the database.
Returns
The Cylinder Target Behaviour created from the specified target.
ImageTargetBehaviour CreateImageTarget ( string  databasePath,
string  targetName 
)
inline

Creates an Image Target Behaviour from a target stored in a Vuforia database.

Parameters
databasePathThe path to the XML file of the database that contains the target. Must be either an absolute path or relative to "StreamingAssets".
targetNameThe name of the target in the database.
Returns
The Image Target Behaviour created from the specified target.
ImageTargetBehaviour CreateImageTarget ( string  filePath,
float  widthInMeters,
string  targetName 
)
inline

Creates an Image Target from a path to a Unity Texture file.

Parameters
filePathThe file path of the image to be used as target. Must be either an absolute path or relative to "StreamingAssets".
widthInMetersThe real world width of the target in meters.
targetNameThe name of the resulting target.
Returns
The Image Target Behaviour from the specified file.
ImageTargetBehaviour CreateImageTarget ( Texture2D  texture,
float  widthInMeters,
string  targetName 
)
inline

Creates an Image Target from a Unity Texture2D.

Parameters
textureThe texture from which the new Image Target is created.
widthInMetersThe real world width of the target in meters.
targetNameThe name of the resulting target.
Returns
The Image Target Behaviour from the specified Unity Texture2D.
ImageTargetBehaviour CreateImageTarget ( IntPtr  texturePointer,
int  textureWidth,
int  textureHeight,
TextureFormat  format,
float  widthInMeters,
string  targetName 
)
inline

Create an Image Target using raw image data loaded by functions independent from Vuforia Engine.

Currently only unpadded image sources are correctly supported.

Parameters
texturePointerPointer to the memory location of the image buffer.
textureWidthThe width of the image in pixels.
textureHeightThe height of the image in pixels.
formatThe texture format of the image.
widthInMetersThe real world width of the target in meters.
targetNameThe name of the resulting target.
Returns
The Image Target Behaviour from the specified image buffer.
ModelTargetBehaviour CreateModelTarget ( string  databasePath,
string  targetName,
ModelTargetBehaviour.ModelTargetTrackingMode trackingMode = null,
ModelTargetBehaviour.TargetMotionHint motionHint = null 
)
inline

Creates a Model Target Behaviour from a target stored in a Vuforia database.

Parameters
databasePathThe path to the XML file of the database that contains the target. Must be either an absolute path or relative to "StreamingAssets".
targetNameThe name of the target in the database.
trackingModeOptionally specify the tracking mode for the target.
motionHintOptionally specify the motion hint for the target.
Returns
The Model Target Behaviour created from the specified target.
MultiTargetBehaviour CreateMultiTarget ( string  databasePath,
string  targetName 
)
inline

Creates a Multi Target Behaviour from a target stored in a Vuforia database.

Parameters
databasePathThe path to the XML file of the database that contains the target. Must be either an absolute path or relative to "StreamingAssets".
targetNameThe name of the target in the database.
Returns
The Multi Target Behaviour created from the specified target.
ObjectTargetBehaviour CreateObjectTargetBehaviour ( string  databasePath,
string  targetName 
)
inline

Creates a Object Target Behaviour from a target stored in a Vuforia database.

Parameters
databasePathThe path to the XML file of the database that contains the target. Must be either an absolute path or relative to "StreamingAssets".
targetNameThe name of the target in the database.
Returns
The Object Target Behaviour created from the specified target.
VuMarkBehaviour CreateVuMarkBehaviour ( string  databasePath,
string  targetName 
)
inline

Creates a VuMark Behaviour from a target stored in a Vuforia database.

Parameters
databasePathThe path to the XML file of the database that contains the target. Must be either an absolute path or relative to "StreamingAssets".
targetNameThe name of the target in the database.
Returns
The VuMark Behaviour created from the specified target.