NRSDKApiForUnity
Classes
NRHMDPoseTracker

Inherits MonoBehaviour.

Public Types

enum  TrackingType { Tracking6Dof = 0 , Tracking3Dof = 1 , Tracking0Dof = 2 }
 

Public Member Functions

void AutoAdaptTrackingType ()
 
bool ChangeTo6Dof (OnTrackingModeChanged OnModeChanged, bool autoAdapt=false)
 
bool ChangeTo3Dof (OnTrackingModeChanged OnModeChanged, bool autoAdapt=false)
 
bool ChangeTo0Dof (OnTrackingModeChanged OnModeChanged, bool autoAdapt=false)
 
void CacheWorldMatrix ()
 
void ResetWorldMatrix ()
 
Matrix4x4 GetWorldOffsetMatrixFromNative ()
 

Static Public Member Functions

static TrackingType AdaptTrackingType (TrackingType mode)
 

Public Attributes

bool TrackingModeAutoAdapt = true
 
bool UseRelative = false
 
Camera leftCamera
 
Camera centerCamera
 
Camera rightCamera
 

Properties

TrackingType TrackingMode [get]
 

Events

static HMDPoseTrackerEvent OnHMDPoseReady
 
static HMDPoseTrackerEvent OnHMDLostTracking
 
static HMDPoseTrackerModeChangeEvent OnChangeTrackingMode
 

Detailed Description

HMDPoseTracker update the infomations of pose tracker. This component is used to initialize the camera parameter, update the device posture, In addition, application can change TrackingType through this component.

Member Enumeration Documentation

◆ TrackingType

HMD tracking type.

Enumerator
Tracking6Dof 

Track the position an rotation.

Tracking3Dof 

Track the rotation only.

Tracking0Dof 

Track nothing.

Member Function Documentation

◆ AdaptTrackingType()

static TrackingType NRKernal.NRHMDPoseTracker.AdaptTrackingType ( TrackingType  mode)
static

Auto adaption for trackingType based on supported feature on current device.

Returns
fallback trackingType.

◆ ChangeTo0Dof()

bool NRKernal.NRHMDPoseTracker.ChangeTo0Dof ( OnTrackingModeChanged  OnModeChanged,
bool  autoAdapt = false 
)

Change to 0 degree of freedom.

Parameters
OnModeChangedThe mode changed call back and return the result.
autoAdaptAuto trackingType adaption based on supported features on current device.

◆ ChangeTo3Dof()

bool NRKernal.NRHMDPoseTracker.ChangeTo3Dof ( OnTrackingModeChanged  OnModeChanged,
bool  autoAdapt = false 
)

Change to 3 degree of freedom.

Parameters
OnModeChangedThe mode changed call back and return the result.
autoAdaptAuto trackingType adaption based on supported features on current device.

◆ ChangeTo6Dof()

bool NRKernal.NRHMDPoseTracker.ChangeTo6Dof ( OnTrackingModeChanged  OnModeChanged,
bool  autoAdapt = false 
)

Change to 6 degree of freedom.

Parameters
OnModeChangedThe mode changed call back and return the result.
autoAdaptAuto trackingType adaption based on supported features on current device.

◆ GetWorldOffsetMatrixFromNative()

Matrix4x4 NRKernal.NRHMDPoseTracker.GetWorldOffsetMatrixFromNative ( )

Get the world offset matrix from native.

Returns

Property Documentation

◆ TrackingMode

TrackingType NRKernal.NRHMDPoseTracker.TrackingMode
get

Gets the tracking mode.

The tracking mode.