This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) Microsoft Corporation. All rights reserved. | |
// Licensed under the MIT License. See LICENSE in the project root for license information. | |
#if (UNITY_WSA && DOTNETWINRT_PRESENT) || WINDOWS_UWP | |
using System; | |
using System.Runtime.InteropServices; | |
using UnityEngine.XR.WSA; | |
#if WINDOWS_UWP | |
using Windows.Perception.Spatial; | |
using UnityEngine; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Runtime.InteropServices; | |
using UnityEngine; | |
namespace MyApp | |
{ | |
public static class HoloLensCoordinateSystem// : MonoBehaviour | |
{ | |
public static HoloLensCoordinateSystem Instance; | |
public static Windows.Perception.Spatial.SpatialCoordinateSystem Current; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Temporarily overrides layers masks for all input sources and pointers | |
/// </summary> | |
public class RaycastOverride : MonoBehaviour | |
{ | |
public LayerMask[] RegularMasks; | |
public LayerMask[] OverrideMasks; | |
public void ApplyOverride() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Temporarily overrides layers masks for all input sources and pointers | |
/// </summary> | |
public class RaycastOverride : MonoBehaviour | |
{ | |
public LayerMask[] RegularMasks; | |
public LayerMask[] OverrideMasks; | |
public void ApplyOverride() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) Microsoft Corporation. All rights reserved. | |
// Licensed under the MIT License. See LICENSE in the project root for license information. | |
using UnityEngine; | |
namespace Microsoft.MixedReality.Toolkit.Utilities | |
{ | |
public static class PlatformUtility | |
{ | |
public static bool IsPlatformSupported(this RuntimePlatform runtimePlatform, SupportedPlatforms platforms) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UnityTouchDeviceManager.cs | |
=============================== | |
UnityTouchDeviceManager.RemoveTouchController(Touch touch) | |
Issue: Does not update touch data, so when Controller.EndTouch is called the last phase is always moved/stationary rather than ended, so the funciton returns early. | |
Resolution: Update TouchData before calling EndTouch. | |
UnityTouchController.cs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// https://stackoverflow.com/questions/56643325/how-can-i-simulate-hand-rays-on-hololens-1 | |
/// </summary> | |
public class HoloLens1ShellHandRayPointer : ShellHandRayPointer | |
{ | |
/// <summary> | |
/// Offset upwards to help with raycasting, so the user doesn't have to hold their hand quite as high. | |
/// </summary> | |
protected Vector3 HandOffset => new Vector3(0.00f, 0.2f, 0.00f); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<PropertyGroup> | |
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |
<ProjectGuid>{D2EC781E-7F4B-4FD8-9981-9FF150D3849D}</ProjectGuid> | |
<OutputType>Library</OutputType> | |
<RootNamespace>rhino_template</RootNamespace> | |
<AssemblyName>rhino_template</AssemblyName> | |
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void _OnCurrentStateChanged(MyManipulationHandler.State oldstate, MyManipulationHandler.State newstate) | |
{ | |
if (!oldstate.HasFlag(MyManipulationHandler.State.Scaling) && newstate.HasFlag(MyManipulationHandler.State.Scaling)) | |
{ | |
_meshCollider = this.GetComponent<MeshCollider>(); | |
if (_meshCollider != null && _meshCollider.enabled) | |
{ | |
_meshCollider.enabled = false; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'Rhino.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. | |
'Rhino.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Program Files\Rhino 6\System\RhinoWindows.dll'. | |
'Rhino.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Program Files\Rhino 6\System\RhinoCommon.dll'. | |
'Rhino.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Program Files\Rhino 6\System\Rhino.UI.dll'. | |
'Rhino.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Program Files\Rhino 6\System\Eto.dll'. Symbols loaded. | |
'Rhino.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll'. | |
'Rhino.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Program Files\Rhino 6\System\Eto.Wpf.dll'. Symbols loaded. | |
'Rhino.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\WindowsBase\v4.0_4.0.0.0__31bf3856ad364e35\WindowsBase.dll'. | |
'Rhino.exe' (CLR |