无码人妻丰满熟妇奶水区码,麻豆一区区三,亚洲日韩欧美精品综合,亚洲无码地址

醬學堂|Hololens 開發(fā)入門(hololens開發(fā)教程)

開發(fā)要求

Hololens 運行與Win10,應用程序是與UWP(通用windows開發(fā)平臺)構(gòu)建的,開發(fā)Hololens 這樣的全息體驗對電腦的配置要求也是相當高的。

硬件配置:

1.64位Windows 10專業(yè)版,企業(yè)版或教育版(家庭版不支持Hyper-V)

2.64位CPU

3.8GB以上的RAM

4.在BIOS中,必須具備以下功能:

  • 硬件輔助虛擬化

  • 二級地址轉(zhuǎn)換(SLAT)

  • 基于硬件的數(shù)據(jù)執(zhí)行保護(DEP)

5.對于GPU,需DirectX 11.0或更高版本,WDDM 1.2驅(qū)動程序或更高版本

關(guān)于Hyper-V,它是微軟的一款虛擬化產(chǎn)品,采用類似Vmware和Citrix開源Xen一樣的基于hypervisor的技術(shù)。

第二部分:安裝

1.啟用虛擬化,即在PC上啟用硬件虛擬化。

醬學堂|Hololens 開發(fā)入門(hololens開發(fā)教程)

詳細步驟請看:

https://msdn.microsoft.com/library/windows/apps/jj863509(v=vs.105).aspx

2.啟用Hyper-V

3.安裝Visual Studio 2017或Visual Studio 2015 Update3(https://developer.microsoft.com/en-us/windows/downloads)

醬學堂|Hololens 開發(fā)入門(hololens開發(fā)教程)

4.安裝HoloLens emulator(https://developer.microsoft.com/en-us/windows/mixed-reality/hololens_emulator_archive)

5.安裝Unity(https://unity3d.com/cn/get-unity/download)

關(guān)于詳細的安裝視頻,可以看看老外的這個教程:

不過不知道什么原因,視頻騰訊過不了所以大家可以在優(yōu)酷看,或者點擊閱讀原文

視頻:

http://v.youku.com/v_show/id_XMTUzMjQ2Nzk0MA==.html

第三部分:關(guān)于Hololens 模擬器

HoloLens模擬器允許你在沒有Hololens的情況下在PC上測試全息應用程序,并附帶Hololens開發(fā)工具集。仿真器使用Hyper-V虛擬機。

關(guān)于輸入:

醬學堂|Hololens 開發(fā)入門(hololens開發(fā)教程)

  1. 向前,向后,向左和向右走 – 使用鍵盤上的W,A,S和D鍵或Xbox控制器上的左鍵。

  2. 查找向上,向下,向左和向右 – 單擊并拖動鼠標,使用鍵盤上的箭頭鍵或Xbox控制器上的右鍵。

  3. 空氣敲擊手勢 – 右鍵單擊鼠標,按鍵盤上的Enter鍵,或使用Xbox控制器上的A按鈕。

  4. 綻放手勢 – 按鍵盤上的Windows鍵或F2鍵,或按Xbox控制器上的B按鈕。手動移動滾動 – 按住Alt鍵,按住鼠標右鍵,向上/向下拖動鼠標,或者在Xbox控制器中按住右側(cè)觸發(fā)器和A按鈕,向上和向下移動右側(cè)手柄。

關(guān)于工具欄:

在主窗口的右側(cè),您將找到仿真器工具欄。工具欄包含以下按鈕:

  • 關(guān)閉:關(guān)閉模擬器。

  • 最小化:最小化仿真器窗口。

  • 人工輸入:鼠標和鍵盤用于模擬模擬器的人工輸入。

  • 鍵盤和鼠標輸入:鍵盤和鼠標輸入直接傳遞到HoloLens操作系統(tǒng)作為鍵盤和鼠標事件,就像連接了藍牙鍵盤和鼠標一樣。

  • 適合屏幕:適合模擬器屏幕。

  • 縮放:使仿真器越來越大。

  • 幫助:打開模擬器幫助。

  • 打開設備門戶:在仿真器中打開HoloLens OS的Windows設備門戶。

  • 工具:打開“ 其他工具 ”窗格。

開發(fā)—-Hello,HoloLens!

首先我們在unity中新建一個項目,接著添加一個簡單的3D模型進行測試,比如:

醬學堂|Hololens 開發(fā)入門(hololens開發(fā)教程)

醬學堂|Hololens 開發(fā)入門(hololens開發(fā)教程)

接著部署Windows Store

醬學堂|Hololens 開發(fā)入門(hololens開發(fā)教程)

醬學堂|Hololens 開發(fā)入門(hololens開發(fā)教程)

接著,點擊Build,生成VS項目:

醬學堂|Hololens 開發(fā)入門(hololens開發(fā)教程)

啟動VS:

醬學堂|Hololens 開發(fā)入門(hololens開發(fā)教程)

醬學堂|Hololens 開發(fā)入門(hololens開發(fā)教程)

一般默認情況下,從Unity導出的UWP應用程序在任何Windows 10設備上運行。由于HoloLens是不同的,應用程序應該利用僅在HoloLens上可用的功能。為此,您需要在Visual Studio TargetDeviceFamily中的Package.appxmanifest文件中設置為“Windows.Holographic” ,如下:

醬學堂|Hololens 開發(fā)入門(hololens開發(fā)教程)

接下來,就可以運行啦:

醬學堂|Hololens 開發(fā)入門(hololens開發(fā)教程)

醬學堂|Hololens 開發(fā)入門(hololens開發(fā)教程)

第五部分:輸入事件總結(jié)

1

GAZE凝視操作

醬學堂|Hololens 開發(fā)入門(hololens開發(fā)教程)

在Hololens中,使用的是用戶的頭部位置與方向來gaze,而不是眼睛。

示例代碼(PS:核心在于RayCast):

using UnityEngine;

public class WorldCursor : MonoBehaviour

{

private MeshRenderer meshRenderer;

// Use this for initialization

void Start()

{

// Grab the mesh renderer that's on the same object as this script.

meshRenderer = this.gameObject.GetComponentInChildren();

}

// Update is called once per frame

void Update()

{

// Do a raycast into the world based on the user's

// head position and orientation.

var headPosition = Camera.main.transform.position;

var gazeDirection = Camera.main.transform.forward;

RaycastHit hitInfo;

if (Physics.Raycast(headPosition, gazeDirection, out hitInfo))

{

// If the raycast hit a hologram…

// Display the cursor mesh.

meshRenderer.enabled = true;

// Move the cursor to the point where the raycast hit.

this.transform.position = hitInfo.point;

// Rotate the cursor to hug the surface of the hologram.

this.transform.rotation = Quaternion.FromToRotation(Vector3.up, hitInfo.normal);

}

else

{

// If the raycast did not hit a hologram, hide the cursor mesh.

meshRenderer.enabled = false;

}

}

}

2

手勢輸入

醬學堂|Hololens 開發(fā)入門(hololens開發(fā)教程)

示例代碼:

using UnityEngine;

using UnityEngine.VR.WSA.Input;

public class GazeGestureManager : MonoBehaviour

{

public static GazeGestureManager Instance { get; private set; }

// Represents the hologram that is currently being gazed at.

public GameObject FocusedObject { get; private set; }

GestureRecognizer recognizer;

// Use this for initialization

void Start()

{

Instance = this;

// Set up a GestureRecognizer to detect Select gestures.

recognizer = new GestureRecognizer();

recognizer.TappedEvent = (source, tapCount, ray) =>

{

// Send an OnSelect message to the focused object and its ancestors.

if (FocusedObject != null)

{

FocusedObject.SendMessageUpwards(\”OnSelect\”);

}

};

recognizer.StartCapturingGestures();

}

// Update is called once per frame

void Update()

{

// Figure out which hologram is focused this frame.

GameObject oldFocusObject = FocusedObject;

// Do a raycast into the world based on the user's

// head position and orientation.

var headPosition = Camera.main.transform.position;

var gazeDirection = Camera.main.transform.forward;

RaycastHit hitInfo;

if (Physics.Raycast(headPosition, gazeDirection, out hitInfo))

{

// If the raycast hit a hologram, use that as the focused object.

FocusedObject = hitInfo.collider.gameObject;

}

else

{

// If the raycast did not hit a hologram, clear the focused object.

FocusedObject = null;

}

// If the focused object changed this frame,

// start detecting fresh gestures again.

if (FocusedObject != oldFocusObject)

{

recognizer.CancelGestures();

recognizer.StartCapturingGestures();

}

}

}

Update方法會持續(xù)檢查是否有任何對象被注視并將對象設置為焦點,以便在點擊時向?qū)ο蟀l(fā)送一個輕擊的事件。GestureRecognizer負責識別用戶的手勢。

3

語音輸入

醬學堂|Hololens 開發(fā)入門(hololens開發(fā)教程)

示例代碼:

using System.Collections.Generic;

using System.Linq;

using UnityEngine;

using UnityEngine.Windows.Speech;

public class SpeechManager : MonoBehaviour

{

KeywordRecognizer keywordRecognizer = null;

Dictionarykeywords = new Dictionary();

// Use this for initialization

void Start()

{

keywords.Add(\”Reset world\”, () =>

{

// Call the OnReset method on every descendant object.

this.BroadcastMessage(\”OnReset\”);

});

keywords.Add(\”Drop Object\”, () =>

{

var focusObject = GazeGestureManager.Instance.FocusedObject;

if (focusObject != null)

{

// Call the OnDrop method on just the focused object.

focusObject.SendMessage(\”OnDrop\”);

}

});

// Tell the KeywordRecognizer about our keywords.

keywordRecognizer = new KeywordRecognizer(keywords.Keys.ToArray());

// Register a callback for the KeywordRecognizer and start recognizing!

keywordRecognizer.OnPhraseRecognized = KeywordRecognizer_OnPhraseRecognized;

keywordRecognizer.Start();

}

private void KeywordRecognizer_OnPhraseRecognized(PhraseRecognizedEventArgs args)

{

System.Action keywordAction;

if (keywords.TryGetValue(args.text, out keywordAction))

{

keywordAction.Invoke();

}

}

}

4

.音頻輸入

醬學堂|Hololens 開發(fā)入門(hololens開發(fā)教程)

示例代碼:

using UnityEngine;

public class SphereSounds : MonoBehaviour

{

AudioSource audioSource = null;

AudioClip impactClip = null;

AudioClip rollingClip = null;

bool rolling = false;

void Start()

{

// Add an AudioSource component and set up some defaults

audioSource = gameObject.AddComponent();

audioSource.playOnAwake = false;

audioSource.spatialize = true;

audioSource.spatialBlend = 1.0f;

audioSource.dopplerLevel = 0.0f;

audioSource.rolloffMode = AudioRolloffMode.Custom;

// Load the Sphere sounds from the Resources folder

impactClip = Resources.Load(\”Impact\”);

rollingClip = Resources.Load(\”Rolling\”);

}

// Occurs when this object starts colliding with another object

void OnCollisionEnter(Collision collision)

{

// Play an impact sound if the sphere impacts strongly enough.

if (collision.relativeVelocity.magnitude >= 0.1f)

{

audioSource.clip = impactClip;

audioSource.Play();

}

}

// Occurs each frame that this object continues to collide with another object

void OnCollisionStay(Collision collision)

{

Rigidbody rigid = this.gameObject.GetComponent();

// Play a rolling sound if the sphere is rolling fast enough.

if (!rolling && rigid.velocity.magnitude >= 0.01f)

{

rolling = true;

audioSource.clip = rollingClip;

audioSource.Play();

}

// Stop the rolling sound if rolling slows down.

else if (rolling && rigid.velocity.magnitude < 0.01f)

{

rolling = false;

audioSource.Stop();

}

}

// Occurs when this object stops colliding with another object

void OnCollisionExit(Collision collision)

{

// Stop the rolling sound if the object falls off and stops colliding.

if (rolling)

{

rolling = false;

audioSource.Stop();

}

}

}

OnCollisionEnter,OnCollisionStay而OnCollisionExit事件確定何時開始播放音頻剪輯,是否繼續(xù)音頻剪輯以及何時停止播放音頻剪輯。

AR醬原創(chuàng),轉(zhuǎn)載務必注明

微信號AR醬(ARchan_TT)

AR醬官網(wǎng):www.arjiang.com

版權(quán)聲明:本文內(nèi)容由互聯(lián)網(wǎng)用戶自發(fā)貢獻,該文觀點僅代表作者本人。本站僅提供信息存儲空間服務,不擁有所有權(quán),不承擔相關(guān)法律責任。如發(fā)現(xiàn)本站有涉嫌抄襲侵權(quán)/違法違規(guī)的內(nèi)容, 請發(fā)送郵件至 舉報,一經(jīng)查實,本站將立刻刪除。

(0)
上一篇 2024年5月3日 上午8:05
下一篇 2024年5月3日 上午8:17

相關(guān)推薦

  • 科研項目申報網(wǎng)站有哪些

    科研項目申報網(wǎng)站有哪些 隨著科技的不斷進步,科研項目申報已經(jīng)成為了一項非常重要的工作。在申報科研項目時,需要在網(wǎng)上提交申報材料,因此選擇一個可靠的科研項目申報網(wǎng)站是非常重要的。本文…

    科研百科 2025年4月18日
    12
  • 營養(yǎng)學科科研項目申報

    營養(yǎng)學科科研項目申報 隨著經(jīng)濟的發(fā)展和人們生活水平的提高,營養(yǎng)學科越來越受到人們的關(guān)注和重視。在營養(yǎng)學科中,科研項目申報是非常重要的一部分,它可以幫助科學家們更好地研究營養(yǎng)學科領域…

    科研百科 2025年4月24日
    4
  • 什么是機械ERP?如何定義機械ERP(機械行業(yè)erp的基本流程)

    很多機械行業(yè)的從業(yè)人員不知道什么叫機械ERP系統(tǒng),大部分管理者只是認為機械ERP系統(tǒng)是一個簡單的管理軟件,只要買回來,安裝在各個部門里面去,使得企業(yè)能正常運轉(zhuǎn)就好了。這是很多人對機…

    2022年9月5日
    608
  • 主持過省級以上科研項目

    主持過省級以上科研項目,是科研領域中一份了不起的成就。作為一名研究人員,主持過省級以上科研項目,不僅可以提高自己的學術(shù)水平,還可以為學術(shù)界和社會做出更大的貢獻。 在主持省級科研項目…

    科研百科 2025年4月30日
    4
  • 江蘇農(nóng)信:勇毅前行 亮點紛呈(江蘇農(nóng)信最美奮斗者)

    單鵬 剛剛過去的2021年,面對百年變局和世紀疫情,江蘇省農(nóng)信聯(lián)社在江蘇省委、省政府的堅強領導下,組織指導全省農(nóng)商行貫徹新發(fā)展理念,落實高質(zhì)量發(fā)展要求,深入開展黨史學習教育,堅持穩(wěn)…

    2022年8月11日
    587
  • 科研項目評獎怎么那么難

    科研項目評獎怎么那么難為標題 科研項目評獎是一個非常主觀的過程,因為它涉及到許多因素,例如創(chuàng)新性,實用性,成果的質(zhì)量等等。因此,科研項目評獎常常被認為是一個非常難以評估的過程。 然…

    科研百科 2025年4月20日
    2
  • 四川啟動7個人工智能重大科技項目(四川啟動7個人工智能重大科技項目建設)

    項目名稱 1.國產(chǎn)高性能算力芯片研發(fā) 3.電子裝備制造工藝生成式設計工業(yè)大模型研究與應用示范 4.面向高原高寒的智能四足機器人系統(tǒng)關(guān)鍵技術(shù)研究及應用 5.人形機器人關(guān)鍵技術(shù)研發(fā)與應…

    科研百科 2024年4月7日
    122
  • web銀行管理系統(tǒng)項目

    Web銀行管理系統(tǒng)項目 隨著互聯(lián)網(wǎng)技術(shù)的發(fā)展,Web銀行管理系統(tǒng)成為了銀行業(yè)務的重要一環(huán)。Web銀行管理系統(tǒng)可以幫助銀行機構(gòu)實現(xiàn)對核心業(yè)務的集中管理,提高業(yè)務效率和安全性。本文將介…

    科研百科 2025年6月7日
    0
  • 科研項目延期申請理由

    科研項目延期申請理由 隨著科技的不斷發(fā)展,科研項目已經(jīng)成為了學術(shù)界和工業(yè)界的重要推動力量。然而,由于各種因素,一些科研項目可能會出現(xiàn)延期的情況。在這種情況下,項目組需要及時采取行動…

    科研百科 2024年10月3日
    19
  • 科研項目風險分析及對策(科研項目風險管理)

    識別到了風險,并且按照嚴重程度和發(fā)生概率對風險進行了排序,那么如何應對這些風險呢?共有四種風險應對措施:風險規(guī)避、風險減輕、風險轉(zhuǎn)移和風險接受,今天我們來分別介紹這幾種風險應對措施…

    2022年5月1日
    1.3K
少妇久久久被弄到高潮妓女| 日韩无码视频网站| 欧美精品久久久久8888| 国产亚洲欧洲在线视频播放| 島國AV线上| 淫乱日韩无码AAA| 国产精品日韩中文字幕一区二区| 国产成人在线观看网址| 日韩极品久久久久免费| 久久久久久伦理片| 欧美在线一区二区三区四区| av在线中文第一页| 91视频黄瓜视频青青草| 国产日邦韩欧美在线| 日韩精品在线观看手机| 97在线免| 日韩欧美a级黄片| 五月激情婷婷伊人久久| 国产精品19久久久久久不卡| 少妇娱乐综合网| 国产欧美在线刘玥| 亚洲熟女三级| 国产成人人综合亚洲欧美| 福利色播| 合肥少妇呻吟声| 欧美天堂精品| 杏色AV一区二区三区| 曰本乱码一区二区| lv噜噜久久精品| 一本色道久久综合色天天综合| 久久成人一区二区无码免费播放| 日本欧美一本| 九九色成人精品| 国产亚洲美国欧洲综合国一级二区| 久久国产精选第一页| 精品欧日韩| 盗摄视频一区二区三区| 淫色综合网-手机版| 久久噜一噜| 国产黄色影片| 收日韩美女操逼视频|