documentation

Visometry.VisionLib.SDK.Core.InitCamera Class Reference

Camera used to define the initial pose. More...

Inherits Visometry.VisionLib.SDK.Core.TrackingManagerReference.

Public Member Functions

string GetInitPoseAsString ()
 Get the init pose values which are calculated using the init camera set in the InitCamera. More...
 
void Reset ()
 
void ResetToOriginalPose ()
 Restores the original transformation of the InitCamera. More...
 

Data Fields

int backgroundLayer = 8
 Layer with the camera image background. More...
 
bool useLastValidPose
 Use the last valid camera pose as initialization pose. More...
 
bool usePoseFromTrackingConfig
 Overwrite init camera transformation with values from tracking configuration on tracking start. More...
 

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

Camera used to define the initial pose.

It's possible to change the camera position and orientation at runtime. The new initial pose will then be used while the tracking is lost.

If there is no InitCamera in the scene or the InitCamera is disabled, then the initial pose from the tracking configuration file will be used.

Please make sure, that there is only one active InitCamera in the scene. Otherwise both components will try to set the initial pose, which will lead to unexpected behaviour.

Right now this behaviour does not work with the HoloLens model-based tracking. In that case please use the HoloLensInitCamera or VLHoloLensInitCamera prefab instead.

Member Function Documentation

◆ GetInitPoseAsString()

string Visometry.VisionLib.SDK.Core.InitCamera.GetInitPoseAsString ( )
inline

Get the init pose values which are calculated using the init camera set in the InitCamera.

This way the init pose can be re-used e.g. in the tracking configuration.

Returns
Init pose values as string in json format

◆ ResetToOriginalPose()

void Visometry.VisionLib.SDK.Core.InitCamera.ResetToOriginalPose ( )
inline

Restores the original transformation of the InitCamera.

This might be useful if the InitCamera was transformed in some awkward way for some reason (e.g. because useLastValidPose is set to true and the tracking failed) and we quickly want to restore the original state.

If usePoseFromTrackingConfig is set to false, then this will restore the transformation during the initialization of the InitCamera. If usePoseFromTrackingConfig is set to true, then this will restore the transformation from the tracking configuration.

Field Documentation

◆ backgroundLayer

int Visometry.VisionLib.SDK.Core.InitCamera.backgroundLayer = 8

Layer with the camera image background.

This layer will not be rendered.

◆ useLastValidPose

bool Visometry.VisionLib.SDK.Core.InitCamera.useLastValidPose

Use the last valid camera pose as initialization pose.

Since this might results in an awkward InitCamera transformation, it's recommended to give the user the option to restore the original pose using the ResetToOriginalPose function.

◆ usePoseFromTrackingConfig

bool Visometry.VisionLib.SDK.Core.InitCamera.usePoseFromTrackingConfig

Overwrite init camera transformation with values from tracking configuration on tracking start.

The InitCamera can then be transformed afterwards, but will get overwritten again after loading a new tracking configuration.