资源简介
KinectWrapperPackage替换文件,替换KinectInterop.cs和KinectSensor.cs这两个文件,使unity3d支持Kinect SDK1.7,(1.6测试正常使用,1.8未测试)
本资源与Blog《Kinect开发之结合Unity3D进行游戏应用开发》配套。
如果您下载到了本资源。请去blog上看原文,方便一起学习交流。
http://yacare.iteye.com/blog/1950164
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using UnityEngine;
namespace Kinect {
public interface KinectInterface {
float getSensorHeight();
Vector3 getKinectCenter();
Vector4 getLookAt();
bool pollSkeleton();
NuiSkeletonframe getSkeleton();
bool pollColor();
Color32[] getColor();
bool pollDepth();
short[] getDepth();
}
public static class Constants
{
public static int NuiSkeletonCount = 6;
public static int NuiSkeletonMaxTracked = 2;
public static int NuiSkeletonInvalidTrackingID = 0;
public static float NuiDepthHorizontalFOV = 58.5f;
public static float NuiDepthVerticalFOV = 45.6f;
}
///
///Structs and constants for interfacing c# with the c++ kinect dll
///
[Flags]
public enum NuiInitializeFlags : uint
{
UsesDepthAndPlayerIndex = 0x00000001
UsesColor = 0x00000002
UsesSkeleton = 0x00000008
UsesDepth = 0x00000020
}
public enum NuiSkeletonPositionIndex : int
{
HipCenter = 0
Spine
ShoulderCenter
Head
ShoulderLeft
ElbowLeft
WristLeft
HandLeft
ShoulderRight
ElbowRight
WristRight
HandRight
HipLeft
KneeLeft
AnkleLeft
FootLeft
HipRight
KneeRight
AnkleRight
FootRight
Count
}
public enum NuiSkeletonPositionTrackingState
{
NotTracked = 0
Inferred
Tracked
}
public enum NuiSkeletonTrackingState
{
NotTracked = 0
PositionOnly
SkeletonTracked
}
public enum NuiImageType
{
DepthAndPlayerIndex = 0 // USHORT
Color // RGB32 data
ColorYUV // YUY2 stream from camera h/w but converted to RGB32 before user getting it.
ColorRawYUV // YUY2 stream from camera h/w.
Depth // USHORT
}
public enum NuiImageResolution
{
resolutionInvalid = -1
resolution80x60 = 0
resolution320x240
resolution640x480
resolution1280x1024 // for hires color only
}
/*[StructLayoutAttribute(LayoutKind.Sequential)]
public struct Vector4
{
public float x;
public float y;
public float z;
public float w;
}*/
[StructLayoutAttribute(LayoutKind.Sequential)]
publ
相关资源
- Unity3D登录界面工程
- unity3d反编译工具
-
UnityWebPla
yer及UnityWebPla yerFull -
UnityWebPla
yerFull - unity4.0官方正式版
- Behavior Designer 1.6.3(u2018.3.0).unitypa
- Unity纪念碑谷.rar
- A Pathfinding Project Pro v4.2.2.rar
- Unity 声音播放插件,支持将字符串转
- Gaia 1.7.2
- Unity3d实现扭动挤压浏览效果
- Cocos2d-x开发游戏的坐标系知识介绍
- UnityShader卷轴效果
- 爱酱(绊爱Kizuna)模型
- 遗传算法越野小车unity5.5
- unity 3D 百度语音合成 并播放
- unity案例入门坦克大战源码
- 《游戏中的数学与物理学 第2版》高清
- Graph And Chart 1.91.unitypackage
- Animated Steel Coaster 1.51.rar
- 3D数学基础:图形与游戏开发(习题答
- Unity3D游戏开发.pdf 宣雨松著完整高清
- Unity3D版水果忍者
- unity3d爆炸特效包
- unity3d_见缝插针源码及报告.zip
- Unity3d车库场景模型
- unity3d 警察动画模型
- Kinect手势代替鼠标控制PC
- unity20多种烟雾以及爆炸特效
- unity博物馆.zip
评论
共有 条评论