C API Unity API
Unity API Reference (Version 10.14.4)
ModelTargetBehaviour Class Reference

This class serves both as an augmentation definition for a ModelTarget in the editor as well as a tracked ModelTarget result at runtime More...

Inheritance diagram for ModelTargetBehaviour:
ScalableDataSetTrackableBehaviour DataSetTrackableBehaviour ObserverBehaviour VuforiaMonoBehaviour

Public Types

enum  GuideViewDisplayMode {
  NoGuideView,
  GuideView2D,
  GuideView3D
}
 The different modes how Vuforia will provide guide view rendering: More...
 

Public Member Functions

int GetActiveGuideViewIndex ()
 Return the active Guide View index More...
 
string GetActiveStateName ()
 Get the active state name More...
 
IEnumerable< string > GetAvailableStateNames ()
 Get a collection of all available state names More...
 
Bounds GetBoundingBox ()
 Return the bounding box of the target (in 3D scene units). More...
 
GuideView GetGuideView (int guideViewIndex)
 Return a Guide View with a given index More...
 
int GetNumGuideViews ()
 Query native for the number of guide views for the model target More...
 
Vector3 GetSize ()
 Return the size of this target in scene units More...
 
TrackingOptimization GetTrackingOptimization ()
 Get the tracking optimization More...
 
void Reset ()
 Reset tracking of this Model Target observer This will stop any ongoing tracking of this Model Target including extended tracking. The tracking will automatically restart if the target is recognized again. Only an activated target can be reset. More...
 
bool SetActiveGuideViewIndex (int index)
 Set the index for an active GuideView for this ModelTarget More...
 
bool SetActiveGuideViewName (string guideViewName)
 
bool SetActiveStateName (string stateName)
 Set the active state name More...
 
void SetBoundingBox (Vector3 minBBox, Vector3 maxBBox)
 Set the Bounding Box (only in editor mode). More...
 
void SetHeight (float height)
 Set the height (z-dimension) of the target in scene units. This will scale the target uniformly. More...
 
void SetLength (float length)
 Set the length (x-dimension) of the target in scene units. This will scale the target uniformly. More...
 
bool SetTrackingOptimization (TrackingOptimization mode)
 Set tracking optimization More...
 
void SetWidth (float width)
 Set the width (y-dimension) of the target in scene units. This will scale the target uniformly. More...
 

Public Attributes

Texture2D m2DGuideViewImage
 
Material m2DGuideViewMaterial
 
Material m3DGuideViewMaterial
 
GameObject m3DGuideViewModel
 
- Public Attributes inherited from ObserverBehaviour
int ID => mObserver?.Id
 The runtime Id of the Observer More...
 
string TargetName => mTrackableName
 Name of the target of the Observer More...
 

Properties

GuideViewDisplayMode GuideViewMode [get, set]
 
TrackingOptimization TrackingOptimization [get, set]
 
- Properties inherited from ObserverBehaviour
TargetStatus TargetStatus [get]
 Current status information of the target More...
 

Additional Inherited Members

- Events inherited from ObserverBehaviour
Action< ObserverBehaviourOnBehaviourDestroyed
 Triggered when this behaviour is destroyed. Can be used for script cleanup More...
 
Action< ObserverBehaviour, TargetStatusOnTargetStatusChanged
 Triggered when the TargetStatus changes More...
 

Detailed Description

This class serves both as an augmentation definition for a ModelTarget in the editor as well as a tracked ModelTarget result at runtime

Member Enumeration Documentation

◆ GuideViewDisplayMode

enum GuideViewDisplayMode
strong

The different modes how Vuforia will provide guide view rendering:

  • No guide view rendering (in case there is custom application logic to display some form of snapping view)
  • 2D guide view using the integrated or overwritten texture
  • 3D guide view using the integrated or overwritten 3D model
Enumerator
NoGuideView 

Using camel-case for enum here, so that Unity automatically creates nice strings for in editor display e.g. "NoGuideView" becomes "No Guide View"

GuideView2D 
GuideView3D 

Member Function Documentation

◆ GetActiveGuideViewIndex()

int GetActiveGuideViewIndex ( )
inline

Return the active Guide View index

◆ GetActiveStateName()

string GetActiveStateName ( )
inline

Get the active state name

◆ GetAvailableStateNames()

IEnumerable<string> GetAvailableStateNames ( )
inline

Get a collection of all available state names

◆ GetBoundingBox()

Bounds GetBoundingBox ( )
inline

Return the bounding box of the target (in 3D scene units).

◆ GetGuideView()

GuideView GetGuideView ( int  guideViewIndex)
inline

Return a Guide View with a given index

◆ GetNumGuideViews()

int GetNumGuideViews ( )
inline

Query native for the number of guide views for the model target

◆ GetSize()

Vector3 GetSize ( )
inline

Return the size of this target in scene units

◆ GetTrackingOptimization()

TrackingOptimization GetTrackingOptimization ( )
inline

Get the tracking optimization

◆ Reset()

void Reset ( )
inline

Reset tracking of this Model Target observer This will stop any ongoing tracking of this Model Target including extended tracking. The tracking will automatically restart if the target is recognized again. Only an activated target can be reset.

◆ SetActiveGuideViewIndex()

bool SetActiveGuideViewIndex ( int  index)
inline

Set the index for an active GuideView for this ModelTarget

◆ SetActiveGuideViewName()

bool SetActiveGuideViewName ( string  guideViewName)
inline

◆ SetActiveStateName()

bool SetActiveStateName ( string  stateName)
inline

Set the active state name

◆ SetBoundingBox()

void SetBoundingBox ( Vector3  minBBox,
Vector3  maxBBox 
)
inline

Set the Bounding Box (only in editor mode).

Parameters
minBBoxbounding box min position
maxBBoxbounding box max position

◆ SetHeight()

void SetHeight ( float  height)
inline

Set the height (z-dimension) of the target in scene units. This will scale the target uniformly.

Parameters
heightheight value

◆ SetLength()

void SetLength ( float  length)
inline

Set the length (x-dimension) of the target in scene units. This will scale the target uniformly.

Parameters
lengthlength value

◆ SetTrackingOptimization()

bool SetTrackingOptimization ( TrackingOptimization  mode)
inline

Set tracking optimization

◆ SetWidth()

void SetWidth ( float  width)
inline

Set the width (y-dimension) of the target in scene units. This will scale the target uniformly.

Parameters
widthwidth value

Member Data Documentation

◆ m2DGuideViewImage

Texture2D m2DGuideViewImage

◆ m2DGuideViewMaterial

Material m2DGuideViewMaterial

◆ m3DGuideViewMaterial

Material m3DGuideViewMaterial

◆ m3DGuideViewModel

GameObject m3DGuideViewModel

Property Documentation

◆ GuideViewMode

GuideViewDisplayMode GuideViewMode
getset

◆ TrackingOptimization