documentation

VLModelTrackableBehaviour 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 VLClientData.

Public Member Functions

void SetUseModelForTracking (bool enable)
 Enables the model in the tracking system. If occluder is true, it will be used as an occlusion geometry. More...
 
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. More...
 
void UpdateModel (bool success=true)
 Add all (sub)meshes to the tracking system. If a sub mesh has its own VLModelTrackableBehaviour, it will not be added, but this behaviour should manage the relevant submeshes. More...
 
void UpdateTransformation (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

bool useForTracking = true
 Enable/Disable this property in order to use/not use all models in this object for tracking. More...
 
bool occluder = false
 Enable/Disable this property in order to use/not use all models in this object for occlusion tracking. More...
 
List< VLModelDeserializationResultmodelDescriptions
 List of model descriptions, which are currently used for tracking. More...
 

Protected Attributes

VLModelTrackerBehaviour_v1 modelTrackerBehaviour
 ModelTracker Behaviour used in this tracking scenario. This behaviour tries to find the corresponding VLModelTrackerBehaviour automatically if not defined. More...
 
VLHoloLensTrackerBehaviour holoLensTrackerBehaviour
 HoloLens Tracker Behaviour used in this tracking scenario. This behaviour tries to find the corresponding VLHoloLensTrackerBehaviour automatically if not defined. More...
 
- Protected Attributes inherited from VLWorkerReferenceBehaviour
VLWorkerBehaviour workerBehaviour
 Reference to used VLWorkerBehaviour. More...
 
VLWorker worker
 

Additional Inherited Members

- Static Public Member Functions inherited from VLClientData
static VLClientData ToVLClientData (IntPtr ptr)
 
- Protected Member Functions inherited from VLClientData
IntPtr ToIntPtr ()
 
- Protected Member Functions inherited from VLWorkerReferenceBehaviour
bool InitWorkerReference ()
 Initializes the workerBehaviour and worker member variables. More...
 

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

◆ SetUseAsOccluder()

void VLModelTrackableBehaviour.SetUseAsOccluder ( bool  enable)
inline

Defines, if this mesh should be used as an occlusion geometry in the tracking system. It is only active, if useForTracking is true.

◆ SetUseModelForTracking()

void VLModelTrackableBehaviour.SetUseModelForTracking ( bool  enable)
inline

Enables the model in the tracking system. If occluder is true, it will be used as an occlusion geometry.

◆ UpdateModel()

void VLModelTrackableBehaviour.UpdateModel ( bool  success = true)
inline

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

◆ UpdateTransformation()

void VLModelTrackableBehaviour.UpdateTransformation ( 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 VLModelTrackableBehaviour. It does not update the modelDescriptions of this behaviour.

Field Documentation

◆ holoLensTrackerBehaviour

VLHoloLensTrackerBehaviour VLModelTrackableBehaviour.holoLensTrackerBehaviour
protected

HoloLens Tracker Behaviour used in this tracking scenario. This behaviour tries to find the corresponding VLHoloLensTrackerBehaviour automatically if not defined.

◆ modelDescriptions

List<VLModelDeserializationResult> VLModelTrackableBehaviour.modelDescriptions

List of model descriptions, which are currently used for tracking.

◆ modelTrackerBehaviour

VLModelTrackerBehaviour_v1 VLModelTrackableBehaviour.modelTrackerBehaviour
protected

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

◆ occluder

bool VLModelTrackableBehaviour.occluder = false

Enable/Disable this property in order to use/not use all models in this object for occlusion tracking.

◆ useForTracking

bool VLModelTrackableBehaviour.useForTracking = true

Enable/Disable this property in order to use/not use all models in this object for tracking.