-
大小: 5.97MB文件类型: .rar金币: 1下载: 0 次发布日期: 2023-10-01
- 语言: C#
- 标签: c# leapmotion
资源简介
leapmotion的官方例程,由于官方提供的例程需要自己建立项目,并且建立项目的过程麻烦,大家可以参考一下我的建立项目的方式
代码片段和文件信息
/******************************************************************************\
* Copyright (C) 2012-2016 Leap Motion Inc. All rights reserved. *
* Leap Motion proprietary and confidential. Not for distribution. *
* Use subject to the terms of the Leap Motion SDK Agreement available at *
* https://developer.leapmotion.com/sdk_agreement or another agreement *
* between Leap Motion and you your company or other organization. *
\******************************************************************************/
using System;
using System.Threading;
using Leap;
class SampleListener
{
public void OnInit(Controller controller)
{
Console.WriteLine(“Initialized“);
}
public void OnConnect(object sender DeviceEventArgs args)
{
Console.WriteLine(“Connected“);
}
public void OnDisconnect(object sender DeviceEventArgs args)
{
Console.WriteLine(“Disconnected“);
}
public void Onframe(object sender frameEventArgs args)
{
// Get the most recent frame and report some basic information
frame frame = args.frame;
Console.WriteLine(
“frame id: {0} timestamp: {1} hands: {2}“
frame.Id frame.Timestamp frame.Hands.Count
);
foreach (Hand hand in frame.Hands)
{
Console.WriteLine(“ Hand id: {0} palm position: {1} fingers: {2}“
hand.Id hand.PalmPosition hand.Fingers.Count);
// Get the hand‘s normal vector and direction
Vector normal = hand.PalmNormal;
Vector direction = hand.Direction;
// Calculate the hand‘s pitch roll and yaw angles
Console.WriteLine(
“ Hand pitch: {0} degrees roll: {1} degrees yaw: {2} degrees“
direction.Pitch * 180.0f / (float)Math.PI
normal.Roll * 180.0f / (float)Math.PI
direction.Yaw * 180.0f / (float)Math.PI
);
// Get the Arm bone
Arm arm = hand.Arm; //手臂
Console.WriteLine(
“ Arm direction: {0} wrist position: {1} elbow position: {2}“
arm.Direction arm.WristPosition arm.ElbowPosition
);
// Get fingers
foreach (Finger finger in hand.Fingers)
{
Console.WriteLine(
“ Finger id: {0} {1} length: {2}mm width: {3}mm“
finger.Id
finger.Type.ToString()
finger.Length
finger.Width
);
// Get finger bones
Bone bone; //骨骼
for (int b = 0; b < 4; b++)
{
bone = finger.Bone ((Bone.BoneType)b);
Console.WriteLine (
“ Bone: {0} start: {1} end: {2} direction: {3}“
bone.Type bone.PrevJoint bone.NextJoint bone.Direction
);
}
}
}
if (frame.Hands.Count != 0)
{
Console.WriteLine(““);
}
}
public void OnServiceConnect(object sender ConnectionEventArgs args)
{
Console.WriteLine
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
..A..H. 44544 2017-09-18 16:56 leadproject\.vs\Sample\v14\.suo
文件 189 2017-09-09 16:48 leadproject\Sample\App.config
文件 2687448 2016-12-14 08:33 leadproject\Sample\bin\Debug\LeapC.dll
文件 90584 2016-12-14 08:33 leadproject\Sample\bin\Debug\LeapCSharp.NET4.5.dll
文件 9216 2017-09-12 11:12 leadproject\Sample\bin\Debug\Sample.exe
文件 189 2017-09-09 16:48 leadproject\Sample\bin\Debug\Sample.exe.config
文件 15872 2017-09-12 11:12 leadproject\Sample\bin\Debug\Sample.pdb
文件 22696 2017-09-18 16:54 leadproject\Sample\bin\Debug\Sample.vshost.exe
文件 189 2017-09-09 16:48 leadproject\Sample\bin\Debug\Sample.vshost.exe.config
文件 490 2017-03-19 05:00 leadproject\Sample\bin\Debug\Sample.vshost.exe.manifest
文件 179415 2016-06-14 03:48 leadproject\Sample\leap sdk\include\Leap.h
文件 41659 2016-06-14 03:48 leadproject\Sample\leap sdk\include\Leap.i
文件 38609 2016-06-14 03:48 leadproject\Sample\leap sdk\include\LeapC.h
文件 29541 2016-06-14 03:48 leadproject\Sample\leap sdk\include\LeapMath.h
文件 85324 2016-12-14 08:33 leadproject\Sample\leap sdk\lib\Leap.py
文件 90584 2016-12-14 08:33 leadproject\Sample\leap sdk\lib\LeapCSharp.NET3.5.dll
文件 90584 2016-12-14 08:33 leadproject\Sample\leap sdk\lib\LeapCSharp.NET4.0.dll
文件 90584 2016-12-14 08:33 leadproject\Sample\leap sdk\lib\LeapCSharp.NET4.5.dll
文件 84203 2016-12-14 08:33 leadproject\Sample\leap sdk\lib\LeapJava.jar
文件 90584 2016-12-14 08:33 leadproject\Sample\leap sdk\lib\UnityAssets\Plugins\LeapCSharp.NET3.5.dll
文件 2687448 2016-12-14 08:33 leadproject\Sample\leap sdk\lib\UnityAssets\Plugins\x86\LeapC.dll
文件 3121112 2016-12-14 08:33 leadproject\Sample\leap sdk\lib\UnityAssets\Plugins\x86_64\LeapC.dll
文件 3867096 2016-12-14 08:33 leadproject\Sample\leap sdk\lib\x64\Leap.dll
文件 128848 2016-12-14 08:33 leadproject\Sample\leap sdk\lib\x64\Leap.lib
文件 3121112 2016-12-14 08:33 leadproject\Sample\leap sdk\lib\x64\LeapC.dll
文件 8502 2016-12-14 08:33 leadproject\Sample\leap sdk\lib\x64\LeapC.lib
文件 206296 2016-12-14 08:33 leadproject\Sample\leap sdk\lib\x64\LeapJava.dll
文件 441304 2016-12-14 08:33 leadproject\Sample\leap sdk\lib\x64\LeapPython.pyd
文件 660128 2016-12-14 08:33 leadproject\Sample\leap sdk\lib\x64\msvcp120.dll
文件 963232 2016-12-14 08:33 leadproject\Sample\leap sdk\lib\x64\msvcr120.dll
............此处省略81个文件信息
相关资源
- C#制作PDF文件
- C#实现决策树
- C#基于BouncyCastle.Crypto的SM2_3实现导入即
- C#网络对战五子棋c/s源程序
- 酒店管理系统源码(ASP C# .NET C 毕业设
- c#写的非常完整的网络爬虫程序
- 工资管理系统C#+SQL
- c#收银系统源码修正bug
- DISCUZ论坛顶贴器C#源码
- c#编写的物资管理信息系统
- 网上选课系统源代码c#
- 个人简历c#写的
- C#编程词典个人版
- c#源码进销存管理系统
- C#TIPTOP电子看板
- ASP.NETC#网上书店系统 毕业设计整一套
- C#FlappyBird完整项目包
- 基于asp.net的飞机场订票网站
- C#Json文件读写修改类附带操作程序.
- C#点名系统应用SQL server 数据库
- SuperSocket(服务端winform+客户端winfor
- C#在线考试系统119750
- C#控制音频输出设备
- asp(C#+sql)网上购物系统
- C#完整的通信代码(点对点点对多同步
- 图书馆管理系统 租书 图书借阅管理软
- c#图书销售管理系统
- c#数据库汽车销售课程设计
- 制造型企业生产管理系统源码C#
- c#课程设计蓝山人事管理
评论
共有 条评论