Skip to content

Commit

Permalink
Update NRSDK 1.8; Release of Version 1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixRoh committed Feb 10, 2022
1 parent 0af95a8 commit ef5da00
Show file tree
Hide file tree
Showing 96 changed files with 3,205 additions and 1,383 deletions.
2 changes: 1 addition & 1 deletion Nreal/Assets/NRSDK/Demos/Config/SessionConfig_Demo.asset
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ MonoBehaviour:
type: 3}
TrackingModeChangeTipPrefab: {fileID: 114429345346749554, guid: 03ffa16cba025c844b778902a3170680,
type: 3}
UseMultiThread: 1
ProjectConfig: {fileID: 11400000, guid: c66f5f1413c2e471aa0c410731aa0a78, type: 2}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class ChangeModeController : MonoBehaviour
{
public void ChangeTo0Dof()
{
var hmdPoseTracker = NRSessionManager.Instance.NRHMDPoseTracker;
NRSessionManager.Instance.NRHMDPoseTracker.ChangeTo0Dof((result) =>
{
NRDebugger.Info("[ChangeModeController] ChangeTo0Dof result:" + result.success);
Expand All @@ -28,10 +29,6 @@ public void ChangeTo3Dof()
NRSessionManager.Instance.NRHMDPoseTracker.ChangeTo3Dof((result) =>
{
NRDebugger.Info("[ChangeModeController] ChangeTo3Dof result:" + result.success);
if (result.success)
{
hmdPoseTracker.CacheWorldMatrix();
}
});
}

Expand All @@ -41,10 +38,6 @@ public void ChangeTo6Dof()
NRSessionManager.Instance.NRHMDPoseTracker.ChangeTo6Dof((result) =>
{
NRDebugger.Info("[ChangeModeController] ChangeTo6Dof result:" + result.success);
if (result.success)
{
hmdPoseTracker.CacheWorldMatrix();
}
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ public class GetSurportedFeatures : MonoBehaviour
{
void Start()
{
var deviceType = NRDevice.Subsystem.GetDeviceType();

bool tracking_six_dof = NRDevice.Subsystem.IsFeatureSupported(NRSupportedFeature.NR_FEATURE_TRACKING_6DOF);
bool tracking_three_dof = NRDevice.Subsystem.IsFeatureSupported(NRSupportedFeature.NR_FEATURE_TRACKING_3DOF);
bool tracking_plane_horizontal = NRDevice.Subsystem.IsFeatureSupported(NRSupportedFeature.NR_FEATURE_TRACKING_FINDING_HORIZONTAL_PLANE);
Expand All @@ -26,10 +28,10 @@ void Start()
bool handtracking = NRDevice.Subsystem.IsFeatureSupported(NRSupportedFeature.NR_FEATURE_HANDTRACKING);
bool rgbcamera = NRDevice.Subsystem.IsFeatureSupported(NRSupportedFeature.NR_FEATURE_RGB_CAMERA);

NRDebugger.Info("tracking_six_dof:{0} tracking_three_dof:{1} tracking_plane_horizontal:{2} tracking_plane_vertical:{3}" +
NRDebugger.Info("deviceType:{10}, tracking_six_dof:{0} tracking_three_dof:{1} tracking_plane_horizontal:{2} tracking_plane_vertical:{3}" +
"tracking_imagetracking:{4} controller_three_dof:{5} controller_six_dof:{6} glasses_wearing_status:{7} handtracking:{8} rgbcamera:{9}",
tracking_six_dof, tracking_three_dof, tracking_plane_horizontal, tracking_plane_vertical, tracking_imagetracking, controller_three_dof,
controller_six_dof, glasses_wearing_status, handtracking, rgbcamera);
controller_six_dof, glasses_wearing_status, handtracking, rgbcamera, deviceType);
}
}
}
37 changes: 37 additions & 0 deletions Nreal/Assets/NRSDK/Demos/Input/Scripts/NRInteractiveItem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/****************************************************************************
* Copyright 2019 Nreal Techonology Limited. All rights reserved.
*
* This file is part of NRSDK.
*
* https://www.nreal.ai/
*
*****************************************************************************/

namespace NRKernal.NRExamples
{
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.EventSystems;

public class NRInteractiveItem : MonoBehaviour, IPointerClickHandler, IPointerEnterHandler, IPointerExitHandler
{
public UnityEvent onPointerClick;
public UnityEvent onPointerEnter;
public UnityEvent onPointerOut;

public void OnPointerClick(PointerEventData eventData)
{
onPointerClick?.Invoke();
}

public void OnPointerEnter(PointerEventData eventData)
{
onPointerEnter?.Invoke();
}

public void OnPointerExit(PointerEventData eventData)
{
onPointerOut?.Invoke();
}
}
}
11 changes: 11 additions & 0 deletions Nreal/Assets/NRSDK/Demos/Input/Scripts/NRInteractiveItem.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ef5da00

Please sign in to comment.