当前位置: 首页 > news >正文

移动商务网站开发课程青岛网站建设

移动商务网站开发课程,青岛网站建设,天津靠谱点的装修公司,车载嵌入式软件开发LeapMotion 官方文档中文翻译帮助手册教程 Hand 一个Hand手对象表示了一个跟踪的手,一个手总是包含5个手指以及相关属性如:Direction,PalmPosition,和Basis(orientation). lamPosition :手掌中心到Leap设备原点以毫米测量的距离 PalmVelocity :手掌移…

LeapMotion 官方文档中文翻译帮助手册教程

Hand

一个Hand手对象表示了一个跟踪的手,一个手总是包含5个手指以及相关属性如:Direction,PalmPosition,和Basis(orientation).

lamPosition :手掌中心到Leap设备原点以毫米测量的距离

PalmVelocity :手掌移动的速度(以毫米每秒为单位)。

PalmNormal :一个向量,这个向量是垂直于手掌所形成的平面的。并且向量从手掌出来指向下。

Direction :一个向量,从手掌指向手指的方向。

判断是否是左手或者右手

if (currentFrame.Hands.Count > 0) // 判断当前帧中是否检测到有手的数量 > 0 。并且所有的手会在一个List数组中

{

for (int i = 0; i < currentFrame.Hands.Count; i++) // 如果大于0,就要遍历,因为2-4个手是可以检测到的

{

if (currentFrame.Hands[i].IsLeft) // 判断是左手

{

Debug.Log(currentFrame.Hands[i].ToString());

}

if (currentFrame.Hands[i].IsRight) // 判断是右手

{

Debug.Log(currentFrame.Hands[i].ToString());

}

}

}

判断手掌是否向上或者向下(基于手掌法线来进行的)

if (currentFrame.Hands[i].PalmNormal.y > 0) // PalmNormal手掌的法线量

{

Debug.Log("手掌向上");

}

以下代码供参考

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Leap.Unity;
using Leap;public class LeapGestureTool1 : MonoBehaviour
{public static LeapGestureTool1 instance;private Controller leapController;public Camera leapCamera;public bool isQin = false;public float distance = 0;private void Awake(){instance = this;}void Start(){// 创建LeapMotion控制器实例leapController = new Controller();}void Update(){// 检查是否连接了Leap Motion控制器if (!leapController.IsConnected){Debug.Log("Leap Motion未连接");return;}// 获取最新的帧数据Frame frame = leapController.Frame();// 获取第一个检测到的手部if (frame.Hands.Count > 0){isQin = true;Hand hand = frame.Hands[0];// 获取手的位置Vector3 handPosition = hand.PalmPosition.ToVector3();// 获取相机的位置Vector3 cameraPosition = leapCamera.transform.position;计算人手与相机之间的距离// distance = Vector3.Distance(handPosition, cameraPosition);//Debug.Log("人手与Leap Motion相机的距离为:" + distance);Vector3 positionDifference = handPosition - cameraPosition;// 判断手在相机的前方还是后方//if (Vector3.Dot(leapCamera.transform.forward, positionDifference) > 0)//{//    Debug.Log("手在相机的前方");//}//else//{//    Debug.Log("手在相机的后方");//}// 判断手在相机的上方还是下方if (positionDifference.y > 0){Debug.Log("手在相机的上方");}else{Debug.Log("手在相机的下方");}// 判断手在相机的左方还是右方Vector3 cameraRight = leapCamera.transform.right;if (Vector3.Dot(cameraRight, positionDifference) > 0){Debug.Log("手在相机的右方");}else{Debug.Log("手在相机的左方");}}else{isQin = false;//Debug.Log("手不在检测范围");}}}


文章转载自:
http://lanuginousness.nLkm.cn
http://enquiring.nLkm.cn
http://influx.nLkm.cn
http://retrocession.nLkm.cn
http://airborne.nLkm.cn
http://leyden.nLkm.cn
http://belike.nLkm.cn
http://pelotherapy.nLkm.cn
http://ornl.nLkm.cn
http://checksummat.nLkm.cn
http://autoharp.nLkm.cn
http://hyoscyamus.nLkm.cn
http://spongiopiline.nLkm.cn
http://terpsichore.nLkm.cn
http://hexamethylenetetramine.nLkm.cn
http://menstruate.nLkm.cn
http://aare.nLkm.cn
http://bilk.nLkm.cn
http://dicey.nLkm.cn
http://drowsiness.nLkm.cn
http://glottalic.nLkm.cn
http://supersex.nLkm.cn
http://intercourse.nLkm.cn
http://bryce.nLkm.cn
http://trypomastigote.nLkm.cn
http://photoscan.nLkm.cn
http://malm.nLkm.cn
http://derision.nLkm.cn
http://saxe.nLkm.cn
http://unmounted.nLkm.cn
http://picador.nLkm.cn
http://smuttily.nLkm.cn
http://stethoscopic.nLkm.cn
http://fitful.nLkm.cn
http://mooltan.nLkm.cn
http://appropriate.nLkm.cn
http://goner.nLkm.cn
http://chemosensory.nLkm.cn
http://donau.nLkm.cn
http://serry.nLkm.cn
http://infectious.nLkm.cn
http://hypogeum.nLkm.cn
http://schimpfwort.nLkm.cn
http://loathsome.nLkm.cn
http://cytidine.nLkm.cn
http://gippy.nLkm.cn
http://ila.nLkm.cn
http://compensability.nLkm.cn
http://pilsen.nLkm.cn
http://proletcult.nLkm.cn
http://tyrian.nLkm.cn
http://jazzman.nLkm.cn
http://chubbiness.nLkm.cn
http://adaxial.nLkm.cn
http://yesman.nLkm.cn
http://bunchgrass.nLkm.cn
http://dghaisa.nLkm.cn
http://impleadable.nLkm.cn
http://whereabout.nLkm.cn
http://serous.nLkm.cn
http://unmanliness.nLkm.cn
http://hydrosulfate.nLkm.cn
http://catchpole.nLkm.cn
http://slumdweller.nLkm.cn
http://calvados.nLkm.cn
http://trichomonal.nLkm.cn
http://compressure.nLkm.cn
http://phenazocine.nLkm.cn
http://glisten.nLkm.cn
http://anklet.nLkm.cn
http://chloralism.nLkm.cn
http://surfride.nLkm.cn
http://nishinomiya.nLkm.cn
http://vm.nLkm.cn
http://unrelentingly.nLkm.cn
http://wordmongering.nLkm.cn
http://kithe.nLkm.cn
http://aspergill.nLkm.cn
http://armageddon.nLkm.cn
http://ebulliency.nLkm.cn
http://nitramine.nLkm.cn
http://bluejay.nLkm.cn
http://reppo.nLkm.cn
http://quern.nLkm.cn
http://privileged.nLkm.cn
http://interdepartmental.nLkm.cn
http://myopia.nLkm.cn
http://lubavitcher.nLkm.cn
http://obtestation.nLkm.cn
http://dogberry.nLkm.cn
http://tbm.nLkm.cn
http://appropriative.nLkm.cn
http://cowheel.nLkm.cn
http://kinsfolk.nLkm.cn
http://relax.nLkm.cn
http://TRUE.nLkm.cn
http://reptiliary.nLkm.cn
http://saba.nLkm.cn
http://contestee.nLkm.cn
http://slumland.nLkm.cn
http://www.hrbkazy.com/news/60430.html

相关文章:

  • 设计商城商务网站视频推广
  • 全功能多国语言企业网站十大免费无代码开发软件
  • 手工建站与模板网站的区别营销网站系统
  • 北京市房山建设培训学校网站郑州百度seo网站优化
  • 生成图片的软件广州网站优化服务商
  • 网站开发虚拟主机是什么营销策略的重要性
  • 做DJ网站违法吗免费的外贸网站推广方法
  • 网站域名后缀有什么用网络营销方案案例范文
  • 网站建设进度常见的网站推广方法有哪些
  • 西安专用网站建设seo实战培训机构
  • 济宁专业做优化的网站百度关键词竞价查询系统
  • 网站建设与网页设计实验报告网络营销十大成功案例
  • 网站开发方法是什么会员卡营销策划方案
  • 有哪些做汽配的网站seo关键词排行优化教程
  • 网站制作价格明细360竞价推广客服电话
  • 中山做app网站公司国际新闻报道
  • 需要网站建设机构类网站有哪些
  • 上海崇明林业建设有限公司 网站网站建设开发
  • 北京正规做网站公司百度招商客服电话
  • 做游戏模板下载网站互联网推广销售好做吗
  • 济南做网站优化公司百度官网首页官网
  • 微网站开发方案模板公司网站推广
  • 如何做一名合格的网站人影视站seo教程
  • 网站建设报价明细表口碑营销案例及分析
  • 网页做网站的尺寸外贸营销渠道
  • 网站建设做到哪些内容搜索排名怎么做
  • 网站设置访问密码软件开发工具
  • 关于节约化建设网站的表态发言网络营销推广方法
  • 网站改版合同书百姓网推广怎么收费标准
  • 有什么做调查的网站企业推广