NRSDKApiForUnity
Classes
NRFrame

Static Public Member Functions

static bool GetHeadPoseRecommend (ref Pose pose)
 
static bool GetHeadPoseByTime (ref Pose pose, UInt64 timestamp)
 
static bool GetFramePresentHeadPose (ref Pose pose, ref LostTrackingReason lostReason, ref UInt64 timestamp)
 
static Pose GetDevicePoseFromHead (NativeDevice device)
 
static EyeProjectMatrixData GetEyeProjectMatrix (out bool result, float znear, float zfar)
 
static NativeMat3f GetDeviceIntrinsicMatrix (NativeDevice device)
 
static NRDistortionParams GetDeviceDistortion (NativeDevice device)
 
static NativeMat3f GetRGBCameraIntrinsicMatrix ()
 
static NRDistortionParams GetRGBCameraDistortion ()
 
static NativeResolution GetDeviceResolution (NativeDevice device)
 
static void GetEyeFov (NativeDevice eye, ref NativeFov4f fov)
 
static void GetTrackables< T > (List< T > trackables, NRTrackableQueryFilter filter)
 
static void SetFocusPlane (Vector3 point, Vector3 normal, NRReferenceSpaceType spaceType=NRReferenceSpaceType.NR_REFERENCE_SPACE_VIEW)
 
static void SetFocusDistance (float distance)
 

Properties

static SessionState SessionStatus [get]
 
static LostTrackingReason LostTrackingReason [get]
 
static NRRenderer NRRenderer [get]
 
static bool IsXR [get]
 
static bool MonoMode [get]
 
static Pose HeadPose [get]
 
static EyePoseData EyePoseFromHead [get]
 
static bool isLinearColorSpace [get]
 

Detailed Description

Holds information about NR Device's pose in the world coordinate, trackables, etc.. Through this class, application can get the information of current frame. It contains session status, lost tracking reason, device pose, trackables, etc.

Member Function Documentation

◆ GetDeviceDistortion()

static NRDistortionParams NRKernal.NRFrame.GetDeviceDistortion ( NativeDevice  device)
static

Get the distortion param of device.

Returns
The device intrinsic matrix.

◆ GetDeviceIntrinsicMatrix()

static NativeMat3f NRKernal.NRFrame.GetDeviceIntrinsicMatrix ( NativeDevice  device)
static

Get the intrinsic matrix of device.

Returns
The device intrinsic matrix.

◆ GetDevicePoseFromHead()

static Pose NRKernal.NRFrame.GetDevicePoseFromHead ( NativeDevice  device)
static

Get the offset position between device and head.

The device pose from head.

◆ GetDeviceResolution()

static NativeResolution NRKernal.NRFrame.GetDeviceResolution ( NativeDevice  device)
static

Gets the resolution of device.

Parameters
eyedevice index.
Returns
The device resolution.

◆ GetEyeFov()

static void NRKernal.NRFrame.GetEyeFov ( NativeDevice  eye,
ref NativeFov4f  fov 
)
static

Gets device fov.

Parameters
eyeThe display index.
fov[in,out] The out device fov.
Returns
A NativeResult.

◆ GetEyeProjectMatrix()

static EyeProjectMatrixData NRKernal.NRFrame.GetEyeProjectMatrix ( out bool  result,
float  znear,
float  zfar 
)
static

Get the project matrix of camera in unity.

Parameters
result[out] True to result.
znearThe znear.
zfarThe zfar.
Returns
project matrix of camera.

◆ GetFramePresentHeadPose()

static bool NRKernal.NRFrame.GetFramePresentHeadPose ( ref Pose  pose,
ref LostTrackingReason  lostReason,
ref UInt64  timestamp 
)
static

Get the pose information when the current frame display on the screen.

Parameters
pose
timestampcurrent timestamp to the pose.
Returns

◆ GetHeadPoseByTime()

static bool NRKernal.NRFrame.GetHeadPoseByTime ( ref Pose  pose,
UInt64  timestamp 
)
static

Gets head pose by timestamp.

Parameters
pose[in,out] The pose.
timestampThe timestamp.
Returns
True if it succeeds, false if it fails.

◆ GetHeadPoseRecommend()

static bool NRKernal.NRFrame.GetHeadPoseRecommend ( ref Pose  pose)
static

Gets head pose by recommend timestamp.

Parameters
pose[in,out] The pose.
Returns
True if it succeeds, false if it fails.

◆ GetRGBCameraDistortion()

static NRDistortionParams NRKernal.NRFrame.GetRGBCameraDistortion ( )
static

Get the Distortion of rgbcamera.

Returns
The RGB camera distortion.

◆ GetRGBCameraIntrinsicMatrix()

static NativeMat3f NRKernal.NRFrame.GetRGBCameraIntrinsicMatrix ( )
static

Get the intrinsic matrix of rgb camera.

Returns
The RGB camera intrinsic matrix.

◆ GetTrackables< T >()

static void NRKernal.NRFrame.GetTrackables< T > ( List< T >  trackables,
NRTrackableQueryFilter  filter 
)
static

Get the list of trackables with specified filter.

Template Parameters
TGeneric type parameter.
Parameters
trackablesA list where the returned trackable is stored. The previous values will be cleared.
filterQuery filter.
Type Constraints
T :NRTrackable 

◆ SetFocusDistance()

static void NRKernal.NRFrame.SetFocusDistance ( float  distance)
static

Set a focus point in camera space that acts as the focal point of the Scene for this frame.

Parameters
distanceThe distance of the focal point relative to camera.

◆ SetFocusPlane()

static void NRKernal.NRFrame.SetFocusPlane ( Vector3  point,
Vector3  normal,
NRReferenceSpaceType  spaceType = NRReferenceSpaceType.NR_REFERENCE_SPACE_VIEW 
)
static

Set a plane in camera or global space that acts as the focal plane of the Scene for this frame.

Parameters
pointThe position of the focal point.
normalThe normal of the plane being viewed at the focal point.
spaceTypeSpace type of the plane. While NR_REFERENCE_SPACE_VIEW means that the plane is relative to the Camera, NR_REFERENCE_SPACE_GLOBAL means that the plane is in world space.

Property Documentation

◆ EyePoseFromHead

EyePoseData NRKernal.NRFrame.EyePoseFromHead
staticget

Get the offset position between eye and head.

The eye pose from head.

◆ HeadPose

Pose NRKernal.NRFrame.HeadPose
staticget

Get the pose of device in unity world coordinate.

Pose of device.

◆ isLinearColorSpace

bool NRKernal.NRFrame.isLinearColorSpace
staticget

Gets a value indicating whether this object is linear color space.

True if this object is linear color space, false if not.

◆ IsXR

bool NRKernal.NRFrame.IsXR
staticget

If sdk is running on xrplugin framework.

The value.

◆ LostTrackingReason

LostTrackingReason NRKernal.NRFrame.LostTrackingReason
staticget

Get the lost tracking reason of HMD.

The lost tracking reason.

◆ MonoMode

bool NRKernal.NRFrame.MonoMode
staticget

If sdk is running in mono mode.

If sdk is running in mono mode.

◆ NRRenderer

NRRenderer NRKernal.NRFrame.NRRenderer
staticget

Gets the nr renderer.

The nr renderer.

◆ SessionStatus

SessionState NRKernal.NRFrame.SessionStatus
staticget

Get the tracking state of HMD.

The session status.