documentation

Visometry.VisionLib.SDK.Core.TrackingModel Class Reference

Behaviour, which enables the user to use the GameObjects mesh for tracking. NOTE: This behaviour is considered as BETA. Please do not alter this file unless you know what you are doing - it is considered to be changed and optimized in future versions. More...

Inherits Visometry.VisionLib.SDK.Core.TrackingManagerReference.

Public Member Functions

void AddModelData ()
 Add all (sub)meshes to the tracking system. If a sub mesh has its own TrackingModel, it will not be added, but this behaviour should manage the relevant submeshes. More...
 
async Task AddModelDataAsync ()
 Add all (sub)meshes to the tracking system. If a sub mesh has its own TrackingModel, it will not be added, but this behaviour should manage the relevant submeshes.
 
void SetUseAsOccluder (bool enable)
 Defines, if this mesh should be used as an occlusion geometry in the tracking system. It is only active, if useForTracking is true.
 
void SetUseModelForTracking (bool enable)
 Enables the model in the tracking system. If occluder is true, it will be used as an occlusion geometry.
 
void UpdateModelProperties (bool useAllChildNodes)
 Updates the transformation of all (sub)meshes in the tracking system. It has to be called after each update in a transform which is relevant for the location of a related mesh. More...
 
async Task UpdateModelPropertiesAsync (bool useAllChildNodes)
 Updates the transformation of all (sub)meshes in the tracking system. It has to be called after each update in a transform which is relevant for the location of a related mesh. More...
 

Data Fields

List< ModelDeserializationResultmodelDescriptions
 List of model descriptions, which are currently used for tracking.
 
bool occluder = false
 Enable/Disable this property in order to use/not use all models in this object for occlusion tracking.
 
Transform rootTransform
 Only needs to be set in ARFoundation or HoloLens scenes. "Root" node of the object that is moved by the tracker. On HoloLens, this is relevant for calculating the correct (relative) transform for models.
 
bool useForTracking = true
 Enable/Disable this property in order to use/not use all models in this object for tracking.
 

Protected Attributes

ModelTracker modelTracker
 ModelTracker used in this tracking scenario. This behaviour tries to find the corresponding ModelTracker automatically if not defined.
 

Additional Inherited Members

- Protected Member Functions inherited from Visometry.VisionLib.SDK.Core.TrackingManagerReference
virtual bool InitWorkerReference ()
 Initializes the trackingManager and Worker member variables. More...
 
virtual void ResetReference ()
 
- Properties inherited from Visometry.VisionLib.SDK.Core.TrackingManagerReference
TrackingManager trackingManager [get]
 Reference to used TrackingManager. More...
 
Worker worker [get]
 

Detailed Description

Behaviour, which enables the user to use the GameObjects mesh for tracking. NOTE: This behaviour is considered as BETA. Please do not alter this file unless you know what you are doing - it is considered to be changed and optimized in future versions.

USAGE: You can add this behaviour to an UnityObject which might contain a mesh. You can allow the transmission of the model inside your definition using the useForTracking flag. If you enable the occluder property, it will be rendered for occlusion of objects while tracking. If you want to disable the visibility of the object in Unity, disable the mesh.

Member Function Documentation

◆ AddModelData()

void Visometry.VisionLib.SDK.Core.TrackingModel.AddModelData ( )
inline

Add all (sub)meshes to the tracking system. If a sub mesh has its own TrackingModel, it will not be added, but this behaviour should manage the relevant submeshes.

This function will be performed asynchronously.

◆ UpdateModelProperties()

void Visometry.VisionLib.SDK.Core.TrackingModel.UpdateModelProperties ( bool  useAllChildNodes)
inline

Updates the transformation of all (sub)meshes in the tracking system. It has to be called after each update in a transform which is relevant for the location of a related mesh.

This function will be performed asynchronously.

Parameters
useAllChildNodesIf useAllChildNodes is true, this will update all locations of submeshes, even if they have their own TrackingModel. It does not update the modelDescriptions of this behaviour.

◆ UpdateModelPropertiesAsync()

async Task Visometry.VisionLib.SDK.Core.TrackingModel.UpdateModelPropertiesAsync ( bool  useAllChildNodes)
inline

Updates the transformation of all (sub)meshes in the tracking system. It has to be called after each update in a transform which is relevant for the location of a related mesh.

Parameters
useAllChildNodesIf useAllChildNodes is true, this will update all locations of submeshes, even if they have their own TrackingModel. It does not update the modelDescriptions of this behaviour.