资源简介
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
相关资源
- Unity屏幕特效之Bloom
- unity玻璃双面透明显示材质shader
- UGUI ScrollView 优化重复利用
- ConnectionLine.unitypackage
- Unity人物移动与视角跟随脚本
- vlc插件 for unity 5x以上版本
- unity3d通透材质shader
- 手势控制鼠标
- Unity相机画面渲染序列帧插件
-
iap-subsc
ription_extension.unitypackage - kinect 鼠标移动及确认
- Kinect2.0鼠标控制体验
- Unity 沙土,雪效果
- UGUI 动态加载内容的 dropdown 控件
- 大富豪游戏源码 可编译运行,服务端
- unity网格地形地图框架源码.txt
- Unity DialogUI制作模板
- Unity3d脚本控制动画开关门代码
- Unity3D ArchVizPRO Interior Vol.01 - Vol.06 合集
- 基于TCP协议的客户端demo,内涵服务端
- Unity中国古风仙侠场景模型、人物模型
- 基于Unity3D的三维数字校园漫游系统
- unity 数据结构树的深度遍历
- 优秀毕业论文J2ME手机游戏开发.rar
- Unity 5.6 -2017 新版NavMesh案例资源,支持
- Kinect获取点云数据+点云读取显示代码
- Unity超好用的剪贴板插件-UniPasteBoard
- unity视觉范围视觉迷雾插件Fog Of War
- 麦克风音频可视化Demo
- unity游戏开发教程.txt
评论
共有 条评论