├── .gitignore ├── Assets ├── .DS_Store ├── Plugins.meta ├── Plugins │ ├── Metro.meta │ ├── Metro │ │ ├── KinectUnityAddin.dll │ │ └── KinectUnityAddin.dll.meta │ ├── x86.meta │ ├── x86 │ │ ├── KinectUnityAddin.dll │ │ └── KinectUnityAddin.dll.meta │ ├── x86_64.meta │ └── x86_64 │ │ ├── KinectUnityAddin.dll │ │ └── KinectUnityAddin.dll.meta ├── ProjectionMapping.meta ├── ProjectionMapping │ ├── CameraSetup.meta │ ├── CameraSetup │ │ ├── Parsing.meta │ │ ├── Parsing │ │ │ ├── CameraCalibration.cs │ │ │ ├── CameraCalibration.cs.meta │ │ │ ├── CameraData.cs │ │ │ ├── CameraData.cs.meta │ │ │ ├── EnsembleData.cs │ │ │ ├── EnsembleData.cs.meta │ │ │ ├── EnsembleManager.cs │ │ │ ├── EnsembleManager.cs.meta │ │ │ ├── EnsembleManager.prefab │ │ │ ├── EnsembleManager.prefab.meta │ │ │ ├── ProjectorData.cs │ │ │ └── ProjectorData.cs.meta │ │ ├── Projection.meta │ │ └── Projection │ │ │ ├── ProjectionRect.cs │ │ │ ├── ProjectionRect.cs.meta │ │ │ ├── ProjectorCamera.cs │ │ │ ├── ProjectorCamera.cs.meta │ │ │ ├── ProjectorManager.cs │ │ │ ├── ProjectorManager.cs.meta │ │ │ ├── ProjectorManager.prefab │ │ │ └── ProjectorManager.prefab.meta │ ├── Demos.meta │ ├── Demos │ │ ├── DrawingWithKinect.meta │ │ ├── DrawingWithKinect │ │ │ ├── DrawingWithKinect.unity │ │ │ ├── DrawingWithKinect.unity.meta │ │ │ ├── Materials.meta │ │ │ ├── Materials │ │ │ │ ├── BoneMaterial.mat │ │ │ │ ├── BoneMaterial.mat.meta │ │ │ │ ├── target-red.mat │ │ │ │ └── target-red.mat.meta │ │ │ ├── Prefabs.meta │ │ │ ├── Prefabs │ │ │ │ ├── Paintbrush.prefab │ │ │ │ ├── Paintbrush.prefab.meta │ │ │ │ ├── TargetMarker.prefab │ │ │ │ └── TargetMarker.prefab.meta │ │ │ ├── Scripts.meta │ │ │ ├── Scripts │ │ │ │ ├── BodySourceManager_Drawing.cs │ │ │ │ ├── BodySourceManager_Drawing.cs.meta │ │ │ │ ├── BodySourceView_Drawing.cs │ │ │ │ ├── BodySourceView_Drawing.cs.meta │ │ │ │ ├── SpinObject.cs │ │ │ │ └── SpinObject.cs.meta │ │ │ ├── Textures.meta │ │ │ └── Textures │ │ │ │ ├── target-red.png │ │ │ │ └── target-red.png.meta │ │ ├── RoomFeatureAlignment.meta │ │ └── RoomFeatureAlignment │ │ │ ├── RoomFeatureAlignment.unity │ │ │ └── RoomFeatureAlignment.unity.meta │ ├── Editor.meta │ ├── Editor │ │ ├── MenuItems.meta │ │ ├── MenuItems │ │ │ ├── CustomEditorMenuItems.cs │ │ │ ├── CustomEditorMenuItems.cs.meta │ │ │ ├── RoomAliveMenuItem.cs │ │ │ └── RoomAliveMenuItem.cs.meta │ │ ├── Parser.meta │ │ ├── Parser │ │ │ ├── ParseWindow.cs │ │ │ └── ParseWindow.cs.meta │ │ ├── Settings.meta │ │ ├── Settings │ │ │ ├── SettingsWindow.cs │ │ │ └── SettingsWindow.cs.meta │ │ ├── ToolkitWrapper.meta │ │ └── ToolkitWrapper │ │ │ ├── ITKWrapper.cs │ │ │ ├── ITKWrapper.cs.meta │ │ │ ├── RoomAliveWrapper.cs │ │ │ └── RoomAliveWrapper.cs.meta │ ├── HeadTracking.meta │ ├── HeadTracking │ │ ├── HeadTrackProjector.shader │ │ ├── HeadTrackProjector.shader.meta │ │ ├── HeadTracker.cs │ │ ├── HeadTracker.cs.meta │ │ ├── HeadTracker.prefab │ │ ├── HeadTracker.prefab.meta │ │ ├── RoomTexture.renderTexture │ │ └── RoomTexture.renderTexture.meta │ ├── Libraries.meta │ └── Libraries │ │ ├── Interop.meta │ │ ├── Interop │ │ ├── CalibrationMatrix.cs │ │ ├── CalibrationMatrix.cs.meta │ │ ├── ConvertCameraSpacePoint.cs │ │ └── ConvertCameraSpacePoint.cs.meta │ │ ├── Math.meta │ │ └── Math │ │ ├── Math.cs │ │ └── Math.cs.meta ├── Standard Assets.meta ├── Standard Assets │ ├── CameraIntrinsics.cs │ ├── CameraIntrinsics.cs.meta │ ├── CollectionMap.cs │ ├── CollectionMap.cs.meta │ ├── Editor.meta │ ├── Editor │ │ ├── KinectCopyPluginDataHelper.cs │ │ └── KinectCopyPluginDataHelper.cs.meta │ ├── EventPump.cs │ ├── EventPump.cs.meta │ ├── ExceptionHelper.cs │ ├── ExceptionHelper.cs.meta │ ├── INativeWrapper.cs │ ├── INativeWrapper.cs.meta │ ├── KinectBuffer.cs │ ├── KinectBuffer.cs.meta │ ├── KinectSpecialCases.cs │ ├── KinectSpecialCases.cs.meta │ ├── NativeObjectCache.cs │ ├── NativeObjectCache.cs.meta │ ├── NativeWrapper.cs │ ├── NativeWrapper.cs.meta │ ├── SmartGCHandle.cs │ ├── SmartGCHandle.cs.meta │ ├── ThreadSafeDictionary.cs │ ├── ThreadSafeDictionary.cs.meta │ ├── Windows.meta │ └── Windows │ │ ├── Data.meta │ │ ├── Data │ │ ├── PropertyChangedEventArgs.cs │ │ └── PropertyChangedEventArgs.cs.meta │ │ ├── Kinect.meta │ │ └── Kinect │ │ ├── Activity.cs │ │ ├── Activity.cs.meta │ │ ├── Appearance.cs │ │ ├── Appearance.cs.meta │ │ ├── AudioBeam.cs │ │ ├── AudioBeam.cs.meta │ │ ├── AudioBeamFrame.cs │ │ ├── AudioBeamFrame.cs.meta │ │ ├── AudioBeamFrameArrivedEventArgs.cs │ │ ├── AudioBeamFrameArrivedEventArgs.cs.meta │ │ ├── AudioBeamFrameList.cs │ │ ├── AudioBeamFrameList.cs.meta │ │ ├── AudioBeamFrameReader.cs │ │ ├── AudioBeamFrameReader.cs.meta │ │ ├── AudioBeamFrameReference.cs │ │ ├── AudioBeamFrameReference.cs.meta │ │ ├── AudioBeamMode.cs │ │ ├── AudioBeamMode.cs.meta │ │ ├── AudioBeamSubFrame.cs │ │ ├── AudioBeamSubFrame.cs.meta │ │ ├── AudioBodyCorrelation.cs │ │ ├── AudioBodyCorrelation.cs.meta │ │ ├── AudioSource.cs │ │ ├── AudioSource.cs.meta │ │ ├── Body.cs │ │ ├── Body.cs.meta │ │ ├── BodyFrame.cs │ │ ├── BodyFrame.cs.meta │ │ ├── BodyFrameArrivedEventArgs.cs │ │ ├── BodyFrameArrivedEventArgs.cs.meta │ │ ├── BodyFrameReader.cs │ │ ├── BodyFrameReader.cs.meta │ │ ├── BodyFrameReference.cs │ │ ├── BodyFrameReference.cs.meta │ │ ├── BodyFrameSource.cs │ │ ├── BodyFrameSource.cs.meta │ │ ├── BodyIndexFrame.cs │ │ ├── BodyIndexFrame.cs.meta │ │ ├── BodyIndexFrameArrivedEventArgs.cs │ │ ├── BodyIndexFrameArrivedEventArgs.cs.meta │ │ ├── BodyIndexFrameReader.cs │ │ ├── BodyIndexFrameReader.cs.meta │ │ ├── BodyIndexFrameReference.cs │ │ ├── BodyIndexFrameReference.cs.meta │ │ ├── BodyIndexFrameSource.cs │ │ ├── BodyIndexFrameSource.cs.meta │ │ ├── CameraSpacePoint.cs │ │ ├── CameraSpacePoint.cs.meta │ │ ├── ColorCameraSettings.cs │ │ ├── ColorCameraSettings.cs.meta │ │ ├── ColorFrame.cs │ │ ├── ColorFrame.cs.meta │ │ ├── ColorFrameArrivedEventArgs.cs │ │ ├── ColorFrameArrivedEventArgs.cs.meta │ │ ├── ColorFrameReader.cs │ │ ├── ColorFrameReader.cs.meta │ │ ├── ColorFrameReference.cs │ │ ├── ColorFrameReference.cs.meta │ │ ├── ColorFrameSource.cs │ │ ├── ColorFrameSource.cs.meta │ │ ├── ColorImageFormat.cs │ │ ├── ColorImageFormat.cs.meta │ │ ├── ColorSpacePoint.cs │ │ ├── ColorSpacePoint.cs.meta │ │ ├── CoordinateMapper.cs │ │ ├── CoordinateMapper.cs.meta │ │ ├── CoordinateMappingChangedEventArgs.cs │ │ ├── CoordinateMappingChangedEventArgs.cs.meta │ │ ├── DepthFrame.cs │ │ ├── DepthFrame.cs.meta │ │ ├── DepthFrameArrivedEventArgs.cs │ │ ├── DepthFrameArrivedEventArgs.cs.meta │ │ ├── DepthFrameReader.cs │ │ ├── DepthFrameReader.cs.meta │ │ ├── DepthFrameReference.cs │ │ ├── DepthFrameReference.cs.meta │ │ ├── DepthFrameSource.cs │ │ ├── DepthFrameSource.cs.meta │ │ ├── DepthSpacePoint.cs │ │ ├── DepthSpacePoint.cs.meta │ │ ├── DetectionResult.cs │ │ ├── DetectionResult.cs.meta │ │ ├── Expression.cs │ │ ├── Expression.cs.meta │ │ ├── FrameCapturedEventArgs.cs │ │ ├── FrameCapturedEventArgs.cs.meta │ │ ├── FrameCapturedStatus.cs │ │ ├── FrameCapturedStatus.cs.meta │ │ ├── FrameDescription.cs │ │ ├── FrameDescription.cs.meta │ │ ├── FrameEdges.cs │ │ ├── FrameEdges.cs.meta │ │ ├── FrameSourceTypes.cs │ │ ├── FrameSourceTypes.cs.meta │ │ ├── HandState.cs │ │ ├── HandState.cs.meta │ │ ├── InfraredFrame.cs │ │ ├── InfraredFrame.cs.meta │ │ ├── InfraredFrameArrivedEventArgs.cs │ │ ├── InfraredFrameArrivedEventArgs.cs.meta │ │ ├── InfraredFrameReader.cs │ │ ├── InfraredFrameReader.cs.meta │ │ ├── InfraredFrameReference.cs │ │ ├── InfraredFrameReference.cs.meta │ │ ├── InfraredFrameSource.cs │ │ ├── InfraredFrameSource.cs.meta │ │ ├── IsAvailableChangedEventArgs.cs │ │ ├── IsAvailableChangedEventArgs.cs.meta │ │ ├── Joint.cs │ │ ├── Joint.cs.meta │ │ ├── JointOrientation.cs │ │ ├── JointOrientation.cs.meta │ │ ├── JointType.cs │ │ ├── JointType.cs.meta │ │ ├── KinectAudioCalibrationState.cs │ │ ├── KinectAudioCalibrationState.cs.meta │ │ ├── KinectCapabilities.cs │ │ ├── KinectCapabilities.cs.meta │ │ ├── KinectSensor.cs │ │ ├── KinectSensor.cs.meta │ │ ├── KinectUnityAddinUtils.cs │ │ ├── KinectUnityAddinUtils.cs.meta │ │ ├── LongExposureInfraredFrame.cs │ │ ├── LongExposureInfraredFrame.cs.meta │ │ ├── LongExposureInfraredFrameArrivedEventArgs.cs │ │ ├── LongExposureInfraredFrameArrivedEventArgs.cs.meta │ │ ├── LongExposureInfraredFrameReader.cs │ │ ├── LongExposureInfraredFrameReader.cs.meta │ │ ├── LongExposureInfraredFrameReference.cs │ │ ├── LongExposureInfraredFrameReference.cs.meta │ │ ├── LongExposureInfraredFrameSource.cs │ │ ├── LongExposureInfraredFrameSource.cs.meta │ │ ├── MultiSourceFrame.cs │ │ ├── MultiSourceFrame.cs.meta │ │ ├── MultiSourceFrameArrivedEventArgs.cs │ │ ├── MultiSourceFrameArrivedEventArgs.cs.meta │ │ ├── MultiSourceFrameReader.cs │ │ ├── MultiSourceFrameReader.cs.meta │ │ ├── MultiSourceFrameReference.cs │ │ ├── MultiSourceFrameReference.cs.meta │ │ ├── TrackingConfidence.cs │ │ ├── TrackingConfidence.cs.meta │ │ ├── TrackingState.cs │ │ ├── TrackingState.cs.meta │ │ ├── Vector4.cs │ │ └── Vector4.cs.meta ├── UnityKinect.meta └── UnityKinect │ ├── BodySourceManager.cs │ ├── BodySourceManager.cs.meta │ ├── BodySourceManager.prefab │ └── BodySourceManager.prefab.meta ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityAdsSettings.asset └── UnityConnectSettings.asset └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Project stuff 2 | Assets/Calibrations/**/*.bin* 3 | Assets/Calibrations/**/*.jpg* 4 | Assets/Calibrations/**/*.mat* 5 | Assets/Calibrations/**/*.mtl* 6 | Assets/Calibrations/**/*.obj* 7 | Assets/Calibrations/**/*.ply* 8 | Assets/Calibrations/**/*.tiff* 9 | Assets/Calibrations/**/camera*.meta 10 | Assets/Calibrations/**/projector*.meta 11 | Assets/Calibrations/**/Materials.meta 12 | /Assets/settings.xml.meta 13 | /Assets/settings.xml 14 | *.obj 15 | 16 | # Unity stuff 17 | [Ll]ibrary/ 18 | [Tt]emp/ 19 | [Bb]uild/ 20 | [Cc]alibrations/ 21 | 22 | # Visual Studio Stuff 23 | .vs/ 24 | *.csproj 25 | *.sln 26 | *.suo 27 | -------------------------------------------------------------------------------- /Assets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Superdroidz/UnityRoomAlive/21f2ea61f87a2fb5fb0a7299876285ef830caafe/Assets/.DS_Store -------------------------------------------------------------------------------- /Assets/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7915258ae74c02c44970b06fdf92f72a 3 | folderAsset: yes 4 | timeCreated: 1452435806 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Plugins/Metro.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7945447fc5099254999727f6849fd5bb 3 | folderAsset: yes 4 | timeCreated: 1452435806 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Plugins/Metro/KinectUnityAddin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Superdroidz/UnityRoomAlive/21f2ea61f87a2fb5fb0a7299876285ef830caafe/Assets/Plugins/Metro/KinectUnityAddin.dll -------------------------------------------------------------------------------- /Assets/Plugins/Metro/KinectUnityAddin.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 85bafbe9b14b18b45b445b304b1f3efc 3 | DefaultImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Plugins/x86.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9f02a415013ff5f4bb8fca1daad1b0d0 3 | folderAsset: yes 4 | timeCreated: 1452435806 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Plugins/x86/KinectUnityAddin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Superdroidz/UnityRoomAlive/21f2ea61f87a2fb5fb0a7299876285ef830caafe/Assets/Plugins/x86/KinectUnityAddin.dll -------------------------------------------------------------------------------- /Assets/Plugins/x86/KinectUnityAddin.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b65facb0c9c68b647b8ca7435b5f35c4 3 | DefaultImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/Plugins/x86_64.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f9c617d3a1e6ead4da7dd27a317624a9 3 | folderAsset: yes 4 | timeCreated: 1452435806 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Plugins/x86_64/KinectUnityAddin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Superdroidz/UnityRoomAlive/21f2ea61f87a2fb5fb0a7299876285ef830caafe/Assets/Plugins/x86_64/KinectUnityAddin.dll -------------------------------------------------------------------------------- /Assets/Plugins/x86_64/KinectUnityAddin.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 82e143d16729051459ae6a54b37e9eab 3 | DefaultImporter: 4 | userData: 5 | assetBundleName: 6 | assetBundleVariant: 7 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b35ec765d3487494e90edfe6a3f61a13 3 | folderAsset: yes 4 | timeCreated: 1453291751 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/CameraSetup.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 78bfea96744e0b54f972850a5a15b139 3 | folderAsset: yes 4 | timeCreated: 1453241958 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/CameraSetup/Parsing.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dc811e7e51a0e6346b24fb7ac3b3f7a3 3 | folderAsset: yes 4 | timeCreated: 1452014675 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/CameraSetup/Parsing/CameraCalibration.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace Assets.Parsing { 5 | [Serializable] 6 | public struct CameraCalibration { 7 | public Matrix4x4 colorCameraMatrix; 8 | public Matrix4x4 colorLensDistortion; 9 | public Matrix4x4 depthCameraMatrix; 10 | public Matrix4x4 depthLensDistortion; 11 | public Matrix4x4 depthToColorTransform; 12 | 13 | public CameraCalibration(Matrix4x4 colorCameraMatrix, 14 | Matrix4x4 colorLensDistortion, 15 | Matrix4x4 depthCameraMatrix, 16 | Matrix4x4 depthLensDistortion, 17 | Matrix4x4 depthToColorTransform) { 18 | this.colorCameraMatrix = colorCameraMatrix; 19 | this.colorLensDistortion = colorLensDistortion; 20 | this.depthCameraMatrix = depthCameraMatrix; 21 | this.depthLensDistortion = depthLensDistortion; 22 | this.depthToColorTransform = depthToColorTransform; 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /Assets/ProjectionMapping/CameraSetup/Parsing/CameraCalibration.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 09eea0cab7c551b43a9be14bf84e756c 3 | timeCreated: 1452014676 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/CameraSetup/Parsing/CameraData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace Assets.Parsing { 5 | [Serializable] 6 | public struct CameraData { 7 | public CameraCalibration calibration; 8 | public string hostNameOrAddress; 9 | public string name; 10 | public Matrix4x4 pose; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/CameraSetup/Parsing/CameraData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 02472985919bd4846802081b645fa168 3 | timeCreated: 1452014676 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/CameraSetup/Parsing/EnsembleData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Xml.Linq; 5 | using Assets.Interop; 6 | 7 | namespace Assets.Parsing { 8 | 9 | [Serializable] 10 | public class EnsembleData { 11 | 12 | public string name; 13 | public List cameras; 14 | public List projectors; 15 | 16 | public EnsembleData(string ensembleFile) { 17 | XElement root = XElement.Load(ensembleFile); 18 | 19 | // Deserialize ensemble file 20 | try { 21 | XNamespace ns = root.Name.Namespace; 22 | name = root.Element(ns + "name").Value; 23 | cameras = 24 | (from camera in root.Descendants(ns + "ProjectorCameraEnsemble.Camera") 25 | select new CameraData { 26 | calibration = MakeCalibration(camera, ns), 27 | hostNameOrAddress = camera.Element(ns + "hostNameOrAddress").Value, 28 | name = camera.Element(ns + "name").Value, 29 | pose = CalibrationMatrix.ToMatrix4x4(camera.Element(ns + "pose")) 30 | }).ToList(); 31 | projectors = 32 | (from projector in root.Descendants(ns + "ProjectorCameraEnsemble.Projector") 33 | select new ProjectorData { 34 | cameraMatrix = CalibrationMatrix.ToMatrix4x4(projector.Element(ns + "cameraMatrix")), 35 | displayIndex = Convert.ToInt32(projector.Element(ns + "displayIndex").Value), 36 | width = Convert.ToInt32(projector.Element(ns + "width").Value), 37 | height = Convert.ToInt32(projector.Element(ns + "height").Value), 38 | hostNameOrAddress = projector.Element(ns + "hostNameOrAddress").Value, 39 | lensDistortion = CalibrationMatrix.ToMatrix4x4(projector.Element(ns + "lensDistortion")), 40 | lockIntrinsics = Convert.ToBoolean(projector.Element(ns + "lockIntrinsics").Value), 41 | name = projector.Element(ns + "name").Value, 42 | pose = CalibrationMatrix.ToMatrix4x4(projector.Element(ns + "pose")) 43 | }).ToList(); 44 | } catch (NullReferenceException) { 45 | throw new NullReferenceException("File incorrect format."); 46 | } 47 | } 48 | 49 | CameraCalibration MakeCalibration(XElement cameraNode, XNamespace ns) { 50 | XElement calibration = cameraNode.Element(ns + "calibration"); 51 | return new CameraCalibration(CalibrationMatrix.ToMatrix4x4(calibration.Element(ns + "colorCameraMatrix")), 52 | CalibrationMatrix.ToMatrix4x4(calibration.Element(ns + "colorLensDistortion")), 53 | CalibrationMatrix.ToMatrix4x4(calibration.Element(ns + "depthCameraMatrix")), 54 | CalibrationMatrix.ToMatrix4x4(calibration.Element(ns + "depthLensDistortion")), 55 | CalibrationMatrix.ToMatrix4x4(calibration.Element(ns + "depthToColorTransform"))); 56 | } 57 | 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/CameraSetup/Parsing/EnsembleData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1b4002fab24646543aa13256ab5a26e1 3 | timeCreated: 1452014676 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/CameraSetup/Parsing/EnsembleManager.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Assets.Parsing { 4 | public class EnsembleManager : MonoBehaviour { 5 | 6 | public static EnsembleManager Manager { get; private set; } 7 | 8 | public EnsembleData data; 9 | 10 | void Start() { 11 | Manager = this; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/CameraSetup/Parsing/EnsembleManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9851d4e7271cf224f83d9f649f6f065f 3 | timeCreated: 1452633656 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/CameraSetup/Parsing/EnsembleManager.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 32a562cb14d94d245b362ea34ee3e9ac 3 | timeCreated: 1452014679 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/CameraSetup/Parsing/ProjectorData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace Assets.Parsing { 5 | [Serializable] 6 | public struct ProjectorData { 7 | public Matrix4x4 cameraMatrix; 8 | public int displayIndex; 9 | public int width; 10 | public int height; 11 | public string hostNameOrAddress; 12 | public Matrix4x4 lensDistortion; 13 | public bool lockIntrinsics; 14 | public string name; 15 | public Matrix4x4 pose; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/CameraSetup/Parsing/ProjectorData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5c8ca75fd62984649915156a8e6c52c9 3 | timeCreated: 1452014676 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/CameraSetup/Projection.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0ce8a1af0624c274a90a002caa14e08e 3 | folderAsset: yes 4 | timeCreated: 1452620814 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/CameraSetup/Projection/ProjectionRect.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Assets.Math; 3 | using UnityEngine; 4 | 5 | namespace Assets.Projection { 6 | public class ProjectionRect { 7 | 8 | public Vector3 Centre { 9 | get { return VectorMath.Midpoint(ProjectedPoints[0], ProjectedPoints[2]); } 10 | } 11 | 12 | private Vector3 Normal { get; set; } 13 | private List ProjectedPoints { get; set; } 14 | 15 | public ProjectionRect(List projectedPoints) { 16 | ProjectedPoints = projectedPoints; 17 | var v1 = projectedPoints[1] - projectedPoints[0]; 18 | var v2 = projectedPoints[2] - projectedPoints[0]; 19 | Normal = Vector3.Cross(v1, v2).normalized; 20 | } 21 | 22 | public void DrawGizmoRect() { 23 | for (int i = 0; i < ProjectedPoints.Count; i++) { 24 | Gizmos.color = Color.red; 25 | Vector3 from = ProjectedPoints[i]; 26 | Vector3 to = i + 1 != ProjectedPoints.Count ? 27 | ProjectedPoints[i + 1] : 28 | ProjectedPoints[0]; 29 | Gizmos.DrawLine(from, to); 30 | } 31 | } 32 | 33 | public override string ToString() { 34 | string pointStr = ""; 35 | foreach (var point in ProjectedPoints) { 36 | pointStr += point.ToString() + "\n"; 37 | } 38 | return pointStr; 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/CameraSetup/Projection/ProjectionRect.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bf3df8a530bdc5e44a95eadbfa0c4c05 3 | timeCreated: 1452626380 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/CameraSetup/Projection/ProjectorCamera.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Assets.Math; 3 | using Assets.Parsing; 4 | using UnityEngine; 5 | 6 | namespace Assets.Projection { 7 | public class ProjectorCamera { 8 | 9 | public ProjectionRect ProjectedRect { get; private set; } 10 | 11 | public ProjectorCamera(ProjectorData projectorData) { 12 | // Take the inverse because we need to map projector's center to origin. 13 | Matrix4x4 worldToCameraMatrix = projectorData.pose.inverse; 14 | // Reflect in z axis because worldToCameraMatrix is OpenGL convention. 15 | // It uses negative z axis as the direction the camera looks in. 16 | worldToCameraMatrix = Matrix4x4.Scale(new Vector3(1, 1, -1)) * worldToCameraMatrix; 17 | // Flip x translation, and y, z rotations to account for left-handedness 18 | worldToCameraMatrix[0, 3] = -worldToCameraMatrix[0, 3]; 19 | worldToCameraMatrix[0, 1] = -worldToCameraMatrix[0, 1]; 20 | worldToCameraMatrix[1, 0] = -worldToCameraMatrix[1, 0]; 21 | worldToCameraMatrix[0, 2] = -worldToCameraMatrix[0, 2]; 22 | worldToCameraMatrix[2, 0] = -worldToCameraMatrix[2, 0]; 23 | Camera.main.worldToCameraMatrix = worldToCameraMatrix; 24 | 25 | Matrix4x4 projectionMatrix = GraphicsTransforms.ProjectionFromIntrinsicCamera( 26 | projectorData.cameraMatrix, projectorData.width, projectorData.height); 27 | Camera.main.projectionMatrix = projectionMatrix; 28 | 29 | ProjectedRect = new ProjectionRect(GetProjectedPoints()); 30 | } 31 | 32 | private List GetProjectedPoints() { 33 | List rays = new List { 34 | Camera.main.ViewportPointToRay(new Vector3(0, 0, 0)), 35 | Camera.main.ViewportPointToRay(new Vector3(0, 1, 0)), 36 | Camera.main.ViewportPointToRay(new Vector3(1, 1, 0)), 37 | Camera.main.ViewportPointToRay(new Vector3(1, 0, 0)) 38 | }; 39 | 40 | var projectedPoints = new List(); 41 | foreach (Ray ray in rays) { 42 | RaycastHit hit; 43 | if (Physics.Raycast(ray, out hit, Camera.main.farClipPlane, LayerMask.GetMask("Room"))) { 44 | projectedPoints.Add(hit.point); 45 | } else { 46 | projectedPoints.Add(Vector3.zero); 47 | } 48 | } 49 | return projectedPoints; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/CameraSetup/Projection/ProjectorCamera.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f9c371700f53ae6418efaf9d6bffa54b 3 | timeCreated: 1452620817 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/CameraSetup/Projection/ProjectorManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Linq; 3 | using Assets.Parsing; 4 | using UnityEngine; 5 | 6 | namespace Assets.Projection { 7 | public class ProjectorManager : MonoBehaviour { 8 | 9 | public static ProjectorCamera Projector { get; private set; } 10 | 11 | void Start() { 12 | StartCoroutine(FindProjectorData(0)); 13 | } 14 | 15 | void OnDrawGizmos() { 16 | if (Projector == null || Projector.ProjectedRect == null) return; 17 | Projector.ProjectedRect.DrawGizmoRect(); 18 | } 19 | 20 | IEnumerator FindProjectorData(int projectorNumber) { 21 | yield return new WaitUntil(() => EnsembleManager.Manager != null); 22 | ProjectorData projectorData = EnsembleManager.Manager.data.projectors.ElementAt(projectorNumber); 23 | Projector = new ProjectorCamera(projectorData); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/CameraSetup/Projection/ProjectorManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 14b07e54c3f1f1a458ee891217bc339b 3 | timeCreated: 1452620814 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/CameraSetup/Projection/ProjectorManager.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &188394 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 100100000} 8 | serializedVersion: 4 9 | m_Component: 10 | - 4: {fileID: 405464} 11 | - 114: {fileID: 11449356} 12 | m_Layer: 0 13 | m_Name: ProjectorManager 14 | m_TagString: Untagged 15 | m_Icon: {fileID: 0} 16 | m_NavMeshLayer: 0 17 | m_StaticEditorFlags: 0 18 | m_IsActive: 1 19 | --- !u!4 &405464 20 | Transform: 21 | m_ObjectHideFlags: 1 22 | m_PrefabParentObject: {fileID: 0} 23 | m_PrefabInternal: {fileID: 100100000} 24 | m_GameObject: {fileID: 188394} 25 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 26 | m_LocalPosition: {x: 0, y: 0, z: 0} 27 | m_LocalScale: {x: 1, y: 1, z: 1} 28 | m_Children: [] 29 | m_Father: {fileID: 0} 30 | m_RootOrder: 0 31 | --- !u!114 &11449356 32 | MonoBehaviour: 33 | m_ObjectHideFlags: 1 34 | m_PrefabParentObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | m_GameObject: {fileID: 188394} 37 | m_Enabled: 1 38 | m_EditorHideFlags: 0 39 | m_Script: {fileID: 11500000, guid: 14b07e54c3f1f1a458ee891217bc339b, type: 3} 40 | m_Name: 41 | m_EditorClassIdentifier: 42 | --- !u!1001 &100100000 43 | Prefab: 44 | m_ObjectHideFlags: 1 45 | serializedVersion: 2 46 | m_Modification: 47 | m_TransformParent: {fileID: 0} 48 | m_Modifications: [] 49 | m_RemovedComponents: [] 50 | m_ParentPrefab: {fileID: 0} 51 | m_RootGameObject: {fileID: 188394} 52 | m_IsPrefabParent: 1 53 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/CameraSetup/Projection/ProjectorManager.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a28c2be8fd3622741be56bb59c3e0622 3 | timeCreated: 1452468148 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Demos.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fb4992a67852a5544a42dbf245206048 3 | folderAsset: yes 4 | timeCreated: 1453291808 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Demos/DrawingWithKinect.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 09a2decfd721c2d4786b6120722e2ce0 3 | folderAsset: yes 4 | timeCreated: 1453291866 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Demos/DrawingWithKinect/DrawingWithKinect.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f71cddf2ef0e2e44795ead18fd4b965c 3 | timeCreated: 1452704230 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Demos/DrawingWithKinect/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f7435f4a009c3c1468e877dfd5bdbf63 3 | folderAsset: yes 4 | timeCreated: 1452692652 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Demos/DrawingWithKinect/Materials/BoneMaterial.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: BoneMaterial 10 | m_Shader: {fileID: 200, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 5 13 | m_CustomRenderQueue: -1 14 | stringTagMap: {} 15 | m_SavedProperties: 16 | serializedVersion: 2 17 | m_TexEnvs: 18 | data: 19 | first: 20 | name: _MainTex 21 | second: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | m_Floats: 26 | data: 27 | first: 28 | name: _InvFade 29 | second: 1 30 | m_Colors: 31 | data: 32 | first: 33 | name: _Color 34 | second: {r: 1, g: 1, b: 1, a: 1} 35 | data: 36 | first: 37 | name: _TintColor 38 | second: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} 39 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Demos/DrawingWithKinect/Materials/BoneMaterial.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5b9570724c09f07429a773f49be3fe01 3 | timeCreated: 1452692421 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Demos/DrawingWithKinect/Materials/target-red.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: target-red 10 | m_Shader: {fileID: 10753, guid: 0000000000000000e000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 5 13 | m_CustomRenderQueue: -1 14 | stringTagMap: {} 15 | m_SavedProperties: 16 | serializedVersion: 2 17 | m_TexEnvs: 18 | data: 19 | first: 20 | name: _MainTex 21 | second: 22 | m_Texture: {fileID: 2800000, guid: d7c46143e7114b04ea7409003f7d779e, type: 3} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | m_Floats: 26 | data: 27 | first: 28 | name: PixelSnap 29 | second: 0 30 | m_Colors: 31 | data: 32 | first: 33 | name: _Color 34 | second: {r: 1, g: 1, b: 1, a: 1} 35 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Demos/DrawingWithKinect/Materials/target-red.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 11990db6efaa8164db92f4c9828b6431 3 | timeCreated: 1452692652 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Demos/DrawingWithKinect/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 21df098a42e701b4a8fff8de543a2062 3 | folderAsset: yes 4 | timeCreated: 1453292207 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Demos/DrawingWithKinect/Prefabs/Paintbrush.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f86b409659a26c4aaf504cc0cfb17de 3 | timeCreated: 1452692427 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Demos/DrawingWithKinect/Prefabs/TargetMarker.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &152726 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 100100000} 8 | serializedVersion: 4 9 | m_Component: 10 | - 4: {fileID: 448122} 11 | - 33: {fileID: 3335692} 12 | - 23: {fileID: 2355036} 13 | - 114: {fileID: 11411068} 14 | m_Layer: 0 15 | m_Name: TargetMarker 16 | m_TagString: Untagged 17 | m_Icon: {fileID: 0} 18 | m_NavMeshLayer: 0 19 | m_StaticEditorFlags: 0 20 | m_IsActive: 1 21 | --- !u!4 &448122 22 | Transform: 23 | m_ObjectHideFlags: 1 24 | m_PrefabParentObject: {fileID: 0} 25 | m_PrefabInternal: {fileID: 100100000} 26 | m_GameObject: {fileID: 152726} 27 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 28 | m_LocalPosition: {x: 0, y: 0, z: 0} 29 | m_LocalScale: {x: 0.03, y: 1, z: 0.03} 30 | m_Children: [] 31 | m_Father: {fileID: 0} 32 | m_RootOrder: 0 33 | --- !u!23 &2355036 34 | MeshRenderer: 35 | m_ObjectHideFlags: 1 36 | m_PrefabParentObject: {fileID: 0} 37 | m_PrefabInternal: {fileID: 100100000} 38 | m_GameObject: {fileID: 152726} 39 | m_Enabled: 1 40 | m_CastShadows: 0 41 | m_ReceiveShadows: 0 42 | m_Materials: 43 | - {fileID: 2100000, guid: 11990db6efaa8164db92f4c9828b6431, type: 2} 44 | m_SubsetIndices: 45 | m_StaticBatchRoot: {fileID: 0} 46 | m_UseLightProbes: 0 47 | m_ReflectionProbeUsage: 0 48 | m_ProbeAnchor: {fileID: 0} 49 | m_ScaleInLightmap: 1 50 | m_PreserveUVs: 1 51 | m_IgnoreNormalsForChartDetection: 0 52 | m_ImportantGI: 0 53 | m_MinimumChartSize: 4 54 | m_AutoUVMaxDistance: 0.5 55 | m_AutoUVMaxAngle: 89 56 | m_LightmapParameters: {fileID: 0} 57 | m_SortingLayerID: 0 58 | m_SortingOrder: 0 59 | --- !u!33 &3335692 60 | MeshFilter: 61 | m_ObjectHideFlags: 1 62 | m_PrefabParentObject: {fileID: 0} 63 | m_PrefabInternal: {fileID: 100100000} 64 | m_GameObject: {fileID: 152726} 65 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 66 | --- !u!114 &11411068 67 | MonoBehaviour: 68 | m_ObjectHideFlags: 1 69 | m_PrefabParentObject: {fileID: 0} 70 | m_PrefabInternal: {fileID: 100100000} 71 | m_GameObject: {fileID: 152726} 72 | m_Enabled: 1 73 | m_EditorHideFlags: 0 74 | m_Script: {fileID: 11500000, guid: 1dab80b126c71744da2295c80f0987df, type: 3} 75 | m_Name: 76 | m_EditorClassIdentifier: 77 | speed: 1 78 | currentAngle: 0 79 | --- !u!1001 &100100000 80 | Prefab: 81 | m_ObjectHideFlags: 1 82 | serializedVersion: 2 83 | m_Modification: 84 | m_TransformParent: {fileID: 0} 85 | m_Modifications: 86 | - target: {fileID: 0} 87 | propertyPath: m_Materials.Array.data[0] 88 | value: 89 | objectReference: {fileID: 2100000, guid: b212512236e40af409432eec1c3bf785, type: 2} 90 | m_RemovedComponents: [] 91 | m_ParentPrefab: {fileID: 0} 92 | m_RootGameObject: {fileID: 152726} 93 | m_IsPrefabParent: 1 94 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Demos/DrawingWithKinect/Prefabs/TargetMarker.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 25c2dc35b68bad64c9c077c14c8d1894 3 | timeCreated: 1452692427 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Demos/DrawingWithKinect/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8484f7dcac78ee7448951e8955568322 3 | folderAsset: yes 4 | timeCreated: 1453292132 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Demos/DrawingWithKinect/Scripts/BodySourceManager_Drawing.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using Windows.Kinect; 4 | 5 | public class BodySourceManager_Drawing : MonoBehaviour 6 | { 7 | private KinectSensor _Sensor; 8 | private BodyFrameReader _Reader; 9 | private Body[] _Data = null; 10 | 11 | public Body[] GetData() 12 | { 13 | return _Data; 14 | } 15 | 16 | 17 | void Start () 18 | { 19 | _Sensor = KinectSensor.GetDefault(); 20 | 21 | if (_Sensor != null) 22 | { 23 | _Reader = _Sensor.BodyFrameSource.OpenReader(); 24 | 25 | if (!_Sensor.IsOpen) 26 | { 27 | _Sensor.Open(); 28 | } 29 | } 30 | } 31 | 32 | void Update () 33 | { 34 | if (_Reader != null) 35 | { 36 | var frame = _Reader.AcquireLatestFrame(); 37 | if (frame != null) 38 | { 39 | if (_Data == null) 40 | { 41 | _Data = new Body[_Sensor.BodyFrameSource.BodyCount]; 42 | } 43 | 44 | frame.GetAndRefreshBodyData(_Data); 45 | 46 | frame.Dispose(); 47 | frame = null; 48 | } 49 | } 50 | } 51 | 52 | void OnApplicationQuit() 53 | { 54 | if (_Reader != null) 55 | { 56 | _Reader.Dispose(); 57 | _Reader = null; 58 | } 59 | 60 | if (_Sensor != null) 61 | { 62 | if (_Sensor.IsOpen) 63 | { 64 | _Sensor.Close(); 65 | } 66 | 67 | _Sensor = null; 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Demos/DrawingWithKinect/Scripts/BodySourceManager_Drawing.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bb7dac924ed26ae4b9b92c9c7e01731d 3 | timeCreated: 1452692407 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Demos/DrawingWithKinect/Scripts/BodySourceView_Drawing.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b0ed72931d291004d918f384dad90755 3 | timeCreated: 1452692407 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Demos/DrawingWithKinect/Scripts/SpinObject.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class SpinObject : MonoBehaviour { 5 | 6 | public float speed = 1f; 7 | 8 | public float currentAngle = 0f; 9 | 10 | void Update () { 11 | currentAngle += speed; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Demos/DrawingWithKinect/Scripts/SpinObject.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1dab80b126c71744da2295c80f0987df 3 | timeCreated: 1452692535 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Demos/DrawingWithKinect/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 76af68de49d51fb4d9ab20c164050051 3 | folderAsset: yes 4 | timeCreated: 1453292218 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Demos/DrawingWithKinect/Textures/target-red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Superdroidz/UnityRoomAlive/21f2ea61f87a2fb5fb0a7299876285ef830caafe/Assets/ProjectionMapping/Demos/DrawingWithKinect/Textures/target-red.png -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Demos/DrawingWithKinect/Textures/target-red.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d7c46143e7114b04ea7409003f7d779e 3 | timeCreated: 1452692439 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | textureType: -1 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | outline: [] 54 | spritePackingTag: 55 | userData: 56 | assetBundleName: 57 | assetBundleVariant: 58 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Demos/RoomFeatureAlignment.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b3e80bed31de11741b61e36b5528d4ed 3 | folderAsset: yes 4 | timeCreated: 1453291848 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Demos/RoomFeatureAlignment/RoomFeatureAlignment.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eeb3cd3cd3f561141afc13605e27b001 3 | timeCreated: 1452629521 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1de295dce49283549bd1297aefef8aba 3 | folderAsset: yes 4 | timeCreated: 1448457877 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Editor/MenuItems.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fcd9e73174718f948b119698f4a1603a 3 | folderAsset: yes 4 | timeCreated: 1452180738 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Editor/MenuItems/CustomEditorMenuItems.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | 4 | public class CustomEditorMenuItems : EditorWindow{ 5 | 6 | [MenuItem("Custom Editor/Add Mesh Colliders %m")] 7 | private static void PopulateMeshColliders() 8 | { 9 | GameObject selection = Selection.activeGameObject; 10 | AddMeshToObjectOrChildren(selection); 11 | } 12 | 13 | private static void AddMeshToObjectOrChildren(GameObject selection) 14 | { 15 | if (selection.GetComponent() != null && 16 | selection.GetComponent() == null) 17 | { 18 | var filter = selection.GetComponent().sharedMesh; 19 | MeshCollider collider = selection.AddComponent(); 20 | collider.sharedMesh = filter; 21 | UnityEngine.Debug.Log("Added MeshCollider to object " + selection.name); 22 | } 23 | else 24 | { 25 | foreach (Transform child in selection.transform) 26 | { 27 | AddMeshToObjectOrChildren(child.gameObject); 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Editor/MenuItems/CustomEditorMenuItems.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6039c7ef76dc3284abec7f855f4551be 3 | timeCreated: 1452181452 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Editor/MenuItems/RoomAliveMenuItem.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 49fa53c417abc95458e10467cb1a55c3 3 | timeCreated: 1452014676 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Editor/Parser.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 904b19ac2d7792c45a9c324b3ac2e650 3 | folderAsset: yes 4 | timeCreated: 1452098739 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Editor/Parser/ParseWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 567c83f14eb090c499eeeb8b09c06ba1 3 | timeCreated: 1452098766 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Editor/Settings.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 98a6ae80d0f25f84c8a20136800d328d 3 | folderAsset: yes 4 | timeCreated: 1452435197 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Editor/Settings/SettingsWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 034624601a808284a918e5562102c1b3 3 | timeCreated: 1452435197 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Editor/ToolkitWrapper.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f64c53182a238b04ebc8ac0cf7cf0fa8 3 | folderAsset: yes 4 | timeCreated: 1453150440 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Editor/ToolkitWrapper/ITKWrapper.cs: -------------------------------------------------------------------------------- 1 | interface ITKWrapper { 2 | /* 3 | * Starts camera server if it is not running already. 4 | */ 5 | void StartCameraServer(); 6 | 7 | /* 8 | * Starts projector server if it is not running already. 9 | */ 10 | void StartProjectorServer(); 11 | 12 | /* 13 | * Stops all currently running camera and projector servers. 14 | */ 15 | void StopServers(); 16 | 17 | /* 18 | * Returns true if either a projector or a camera server is running. 19 | */ 20 | bool ServersAreRunning(); 21 | 22 | /* 23 | * Creates a new toolkit setup. 24 | * 25 | * 'Filepath' indicates location of where the setup should be saved. 26 | */ 27 | void CreateNewSetup(string filepath); 28 | 29 | /* 30 | * Runs toolkit calibration operations. 31 | * 32 | * Results should be saved to root of the 'filepath' folder. 33 | */ 34 | void RunCalibration(string filepath); 35 | } 36 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Editor/ToolkitWrapper/ITKWrapper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5dc04da2e3a1e7e44bf603341be3e463 3 | timeCreated: 1453150452 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Editor/ToolkitWrapper/RoomAliveWrapper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d176063199d7fdc4b9f55466219de210 3 | timeCreated: 1453152294 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/HeadTracking.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 71bf28afce4012542ad341a7456cd17d 3 | folderAsset: yes 4 | timeCreated: 1452365298 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/HeadTracking/HeadTrackProjector.shader: -------------------------------------------------------------------------------- 1 | Shader "HeadTrack/Projector" { 2 | Properties { 3 | _MainTex ("Texture", 2D) = "white" {} 4 | _Color ("Main Color", Color) = (1,1,1,0.5) 5 | _ShadowTex ("Cookie", 2D) = "" {} 6 | _FalloffTex ("FallOff", 2D) = "" {} 7 | } 8 | 9 | Subshader { 10 | Tags {"Queue"="Transparent"} 11 | Pass { 12 | //Blend DstColor One 13 | //Offset -1, -1 14 | 15 | CGPROGRAM 16 | #pragma vertex vert 17 | #pragma fragment frag 18 | //#pragma multi_compile_fog 19 | #include "UnityCG.cginc" 20 | 21 | struct v2f { 22 | float4 uvShadow : TEXCOORD0; 23 | float4 uvFalloff : TEXCOORD1; 24 | UNITY_FOG_COORDS(2) 25 | float4 pos : SV_POSITION; 26 | }; 27 | 28 | float4x4 _Projector; 29 | float4x4 _ProjectorClip; 30 | 31 | v2f vert (float4 vertex : POSITION) 32 | { 33 | v2f o; 34 | o.pos = mul (UNITY_MATRIX_MVP, vertex); 35 | o.uvShadow = mul (_Projector, vertex); 36 | o.uvFalloff = mul (_ProjectorClip, vertex); 37 | UNITY_TRANSFER_FOG(o,o.pos); 38 | return o; 39 | } 40 | 41 | sampler2D _MainTex; 42 | fixed4 _Color; 43 | sampler2D _ShadowTex; 44 | sampler2D _FalloffTex; 45 | 46 | fixed4 frag (v2f i) : SV_Target 47 | { 48 | fixed4 texcol = tex2Dproj(_MainTex, UNITY_PROJ_COORD(i.uvShadow)); 49 | return texcol; 50 | } 51 | ENDCG 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/HeadTracking/HeadTrackProjector.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c0ace1ca4bc0718448acf798c93d52d9 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | assetBundleName: 7 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/HeadTracking/HeadTracker.cs: -------------------------------------------------------------------------------- 1 | using Windows.Kinect; 2 | using Assets.Interop; 3 | using Assets.Projection; 4 | using Assets.UnityKinect; 5 | using UnityEngine; 6 | 7 | namespace Assets.HeadTrack { 8 | 9 | [RequireComponent(typeof(Camera))] 10 | public class HeadTracker : MonoBehaviour { 11 | 12 | private bool debugMode = false; 13 | 14 | private Camera user; 15 | private Camera debugCamera; 16 | private Vector3 headPosition; 17 | 18 | // A default position for the head, which corresponds roughly to 19 | // someone standing behind the Kinect, when it's placed on a table. 20 | private Vector3 defaultHeadPosition = new Vector3(0f, 1.1f, -1.4f); 21 | 22 | void Start() { 23 | headPosition = defaultHeadPosition; 24 | user = GetComponent(); 25 | } 26 | 27 | void Update() { 28 | if (!debugMode) { 29 | if (BodySourceManager.Bodies != null) { 30 | TrackHead(BodySourceManager.Bodies); 31 | } 32 | 33 | user.transform.position = headPosition; 34 | if (ProjectorManager.Projector != null) { 35 | user.transform.LookAt(ProjectorManager.Projector.ProjectedRect.Centre); 36 | } else { 37 | user.transform.rotation = Quaternion.LookRotation(Vector3.forward); 38 | } 39 | } else { 40 | int movementDelta = 1; 41 | user.transform.Translate(Vector3.right * Input.GetAxis("Horizontal") * movementDelta); 42 | user.transform.Translate(Vector3.forward * Input.GetAxis("Vertical") * movementDelta); 43 | user.transform.Translate(Vector3.up * Input.GetAxis("Up") * movementDelta); 44 | 45 | int sensitivity = 1; 46 | user.transform.Rotate(Vector3.up, Input.GetAxis("Mouse X") * sensitivity, Space.World); 47 | user.transform.Rotate(Vector3.right, Input.GetAxis("Mouse Y") * sensitivity, Space.World); 48 | } 49 | } 50 | 51 | public void TrackHead(Body[] bodies) { 52 | bool foundTrackedBody = false; 53 | float distanceToNearest = float.MaxValue; 54 | 55 | foreach (Body body in bodies) { 56 | if (body.IsTracked) { 57 | var cameraSpacePoint = body.Joints[JointType.Head].Position; 58 | if (cameraSpacePoint.Z < distanceToNearest) { 59 | distanceToNearest = cameraSpacePoint.Z; 60 | headPosition = ConvertCameraSpacePoint.ToVector3(cameraSpacePoint); 61 | foundTrackedBody = true; 62 | } 63 | } 64 | } 65 | 66 | if (!foundTrackedBody) { 67 | headPosition = defaultHeadPosition; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/HeadTracking/HeadTracker.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 56dcdb5dc81942f49b94eb923750027a 3 | timeCreated: 1452365302 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/HeadTracking/HeadTracker.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &124878 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 100100000} 8 | serializedVersion: 4 9 | m_Component: 10 | - 4: {fileID: 407638} 11 | - 20: {fileID: 2011746} 12 | - 124: {fileID: 12424830} 13 | - 114: {fileID: 11404890} 14 | - 119: {fileID: 11943180} 15 | m_Layer: 0 16 | m_Name: HeadTracker 17 | m_TagString: Untagged 18 | m_Icon: {fileID: 0} 19 | m_NavMeshLayer: 0 20 | m_StaticEditorFlags: 0 21 | m_IsActive: 1 22 | --- !u!4 &407638 23 | Transform: 24 | m_ObjectHideFlags: 1 25 | m_PrefabParentObject: {fileID: 0} 26 | m_PrefabInternal: {fileID: 100100000} 27 | m_GameObject: {fileID: 124878} 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: 0, y: 0, z: 0} 30 | m_LocalScale: {x: 1, y: 1, z: 1} 31 | m_Children: [] 32 | m_Father: {fileID: 0} 33 | m_RootOrder: 0 34 | --- !u!20 &2011746 35 | Camera: 36 | m_ObjectHideFlags: 1 37 | m_PrefabParentObject: {fileID: 0} 38 | m_PrefabInternal: {fileID: 100100000} 39 | m_GameObject: {fileID: 124878} 40 | m_Enabled: 1 41 | serializedVersion: 2 42 | m_ClearFlags: 1 43 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} 44 | m_NormalizedViewPortRect: 45 | serializedVersion: 2 46 | x: 0 47 | y: 0 48 | width: 1 49 | height: 1 50 | near clip plane: 0.3 51 | far clip plane: 1000 52 | field of view: 120 53 | orthographic: 0 54 | orthographic size: 5 55 | m_Depth: 0 56 | m_CullingMask: 57 | serializedVersion: 2 58 | m_Bits: 4294967039 59 | m_RenderingPath: -1 60 | m_TargetTexture: {fileID: 8400000, guid: 4b3214f3973e9ab4c944d9cdf429231d, type: 2} 61 | m_TargetDisplay: 1 62 | m_TargetEye: 3 63 | m_HDR: 0 64 | m_OcclusionCulling: 1 65 | m_StereoConvergence: 10 66 | m_StereoSeparation: 0.022 67 | m_StereoMirrorMode: 0 68 | --- !u!114 &11404890 69 | MonoBehaviour: 70 | m_ObjectHideFlags: 1 71 | m_PrefabParentObject: {fileID: 0} 72 | m_PrefabInternal: {fileID: 100100000} 73 | m_GameObject: {fileID: 124878} 74 | m_Enabled: 1 75 | m_EditorHideFlags: 0 76 | m_Script: {fileID: 11500000, guid: 56dcdb5dc81942f49b94eb923750027a, type: 3} 77 | m_Name: 78 | m_EditorClassIdentifier: 79 | --- !u!119 &11943180 80 | Projector: 81 | m_ObjectHideFlags: 1 82 | m_PrefabParentObject: {fileID: 0} 83 | m_PrefabInternal: {fileID: 100100000} 84 | m_GameObject: {fileID: 124878} 85 | m_Enabled: 1 86 | serializedVersion: 2 87 | m_NearClipPlane: 0.3 88 | m_FarClipPlane: 1000 89 | m_FieldOfView: 120 90 | m_AspectRatio: 1 91 | m_Orthographic: 0 92 | m_OrthographicSize: 10 93 | m_Material: {fileID: 2100000, guid: 5bc3c4d577dafdd428f0db8ea5f89106, type: 2} 94 | m_IgnoreLayers: 95 | serializedVersion: 2 96 | m_Bits: 4294967039 97 | --- !u!124 &12424830 98 | Behaviour: 99 | m_ObjectHideFlags: 1 100 | m_PrefabParentObject: {fileID: 0} 101 | m_PrefabInternal: {fileID: 100100000} 102 | m_GameObject: {fileID: 124878} 103 | m_Enabled: 1 104 | --- !u!1001 &100100000 105 | Prefab: 106 | m_ObjectHideFlags: 1 107 | serializedVersion: 2 108 | m_Modification: 109 | m_TransformParent: {fileID: 0} 110 | m_Modifications: [] 111 | m_RemovedComponents: [] 112 | m_ParentPrefab: {fileID: 0} 113 | m_RootGameObject: {fileID: 124878} 114 | m_IsPrefabParent: 1 115 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/HeadTracking/HeadTracker.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6188f7abcd021a44ca8def9215276505 3 | timeCreated: 1452467333 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/HeadTracking/RoomTexture.renderTexture: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!84 &8400000 4 | RenderTexture: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: RoomTexture 9 | m_ImageContentsHash: 10 | serializedVersion: 2 11 | Hash: 00000000000000000000000000000000 12 | m_Width: 1500 13 | m_Height: 1500 14 | m_AntiAliasing: 1 15 | m_DepthFormat: 1 16 | m_ColorFormat: 0 17 | m_MipMap: 0 18 | m_GenerateMips: 1 19 | m_SRGB: 0 20 | m_TextureSettings: 21 | m_FilterMode: 0 22 | m_Aniso: 0 23 | m_MipBias: 0 24 | m_WrapMode: 1 25 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/HeadTracking/RoomTexture.renderTexture.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b3214f3973e9ab4c944d9cdf429231d 3 | timeCreated: 1452457266 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Libraries.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5a755c7593ca2084eb65e9a431560d2e 3 | folderAsset: yes 4 | timeCreated: 1453251779 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Libraries/Interop.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 17e44f1a630a2304d9cb64e87b5ce56e 3 | folderAsset: yes 4 | timeCreated: 1452441729 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Libraries/Interop/CalibrationMatrix.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Xml.Linq; 5 | using UnityEngine; 6 | 7 | namespace Assets.Interop { 8 | class CalibrationMatrix { 9 | public static Matrix4x4 ToMatrix4x4(XElement matrixNode) { 10 | // parse the columns using LINQ to XML 11 | IEnumerable columns = 12 | from column in matrixNode.Elements().ElementAt(0).Elements() 13 | select ParseColumn(column); 14 | 15 | 16 | // copy the columns over into Unity's matrix data structure 17 | Matrix4x4 matrix = Matrix4x4.zero; 18 | for (int index = 0; index < 4; index++) { 19 | if (index >= columns.Count()) { 20 | break; 21 | } 22 | matrix.SetColumn(index, columns.ElementAt(index)); 23 | } 24 | 25 | return matrix; 26 | } 27 | 28 | public static Vector4 ParseColumn(XElement columnNode) { 29 | // Parse the values of columnNode as a sequence of floats 30 | IEnumerable parsedColumn = 31 | from element in columnNode.Elements() 32 | select Convert.ToSingle(element.Value); 33 | 34 | // copy into Unity's Vector4 data structure 35 | Vector4 column = Vector4.zero; 36 | for (int index = 0; index < 4; index++) { 37 | if (index >= parsedColumn.Count()) { 38 | break; 39 | } 40 | column[index] = parsedColumn.ElementAt(index); 41 | } 42 | 43 | return column; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Libraries/Interop/CalibrationMatrix.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cd4aed85f68c934478aeab01d3028cd4 3 | timeCreated: 1452441730 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Libraries/Interop/ConvertCameraSpacePoint.cs: -------------------------------------------------------------------------------- 1 | using Windows.Kinect; 2 | using UnityEngine; 3 | 4 | namespace Assets.Interop { 5 | class ConvertCameraSpacePoint { 6 | public static Vector3 ToVector3(CameraSpacePoint cameraSpacePoint) { 7 | return new Vector3(-cameraSpacePoint.X, cameraSpacePoint.Y, cameraSpacePoint.Z); 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Libraries/Interop/ConvertCameraSpacePoint.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f473d6a45a9f7c842bdb4da62f008df5 3 | timeCreated: 1452441730 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Libraries/Math.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 530969bba46878840bb5ddca21414eb9 3 | folderAsset: yes 4 | timeCreated: 1452448039 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Libraries/Math/Math.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Assets.Math { 4 | class GraphicsTransforms { 5 | public static Matrix4x4 ProjectionFromIntrinsicCamera(Matrix4x4 cameraMatrix, 6 | float projectorWidth, float projectorHeight) { 7 | float fx = cameraMatrix[0, 0]; 8 | float fy = cameraMatrix[1, 1]; 9 | float cx = cameraMatrix[0, 2]; 10 | float cy = cameraMatrix[1, 2]; 11 | 12 | float near = 0.1f; 13 | float far = 100.0f; 14 | 15 | float w = projectorWidth; 16 | float h = projectorHeight; 17 | 18 | // fx, fy, cx, cy are in pixels 19 | // input coordinate system is x left, y up, z forward (right handed) 20 | // project to view volume where x, y in [-1, 1], z in [0, 1], x right, y up, z forward 21 | // pre-multiply matrix 22 | 23 | // -(2 * fx / w), 0, -(2 * cx / w - 1), 0, 24 | // 0, 2 * fy / h, 2 * cy / h - 1, 0, 25 | // 0, 0, far / (far - near), -near * far / (far - near), 26 | // 0, 0, -1, 0 27 | Matrix4x4 projectionRightHanded = new Matrix4x4() { 28 | m00 = 2 * fx / w, m01 = 0, m02 = 1 - 2 * cx / w, m03 = 0, 29 | m10 = 0, m11 = 2 * fy / h, m12 = 1 - 2 * cy / h, m13 = 0, 30 | m20 = 0, m21 = 0, m22 = -(far + near) / (far - near), m23 = -2 * far * near / (far - near), 31 | m30 = 0, m31 = 0, m32 = -1, m33 = 0 32 | }; 33 | return Matrix4x4.Scale(new Vector3(-1, 1, 1)) * projectionRightHanded * 34 | Matrix4x4.Scale(new Vector3(-1, 1, 1)); 35 | } 36 | } 37 | 38 | public static class VectorMath { 39 | public static Vector3 Midpoint(Vector3 v1, Vector3 v2) { 40 | return v1 + 0.5f * (v2 - v1); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Assets/ProjectionMapping/Libraries/Math/Math.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 83b71859e1bb1644098b8b7d8df5fc7f 3 | timeCreated: 1452448039 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Standard Assets.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e85b9dec07431194380990bbdad1d947 3 | folderAsset: yes 4 | timeCreated: 1452435806 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CameraIntrinsics.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.CameraIntrinsics 8 | // 9 | [RootSystem.Runtime.InteropServices.StructLayout(RootSystem.Runtime.InteropServices.LayoutKind.Sequential)] 10 | public struct CameraIntrinsics 11 | { 12 | public float FocalLengthX { get; set; } 13 | public float FocalLengthY { get; set; } 14 | public float PrincipalPointX { get; set; } 15 | public float PrincipalPointY { get; set; } 16 | public float RadialDistortionSecondOrder { get; set; } 17 | public float RadialDistortionFourthOrder { get; set; } 18 | public float RadialDistortionSixthOrder { get; set; } 19 | 20 | public override int GetHashCode() 21 | { 22 | return FocalLengthX.GetHashCode() ^ FocalLengthY.GetHashCode() ^ 23 | PrincipalPointX.GetHashCode() ^ PrincipalPointY.GetHashCode() ^ 24 | RadialDistortionSecondOrder.GetHashCode() ^ RadialDistortionFourthOrder.GetHashCode() ^ 25 | RadialDistortionSixthOrder.GetHashCode(); 26 | } 27 | 28 | public override bool Equals(object obj) 29 | { 30 | if (!(obj is CameraIntrinsics)) 31 | { 32 | return false; 33 | } 34 | 35 | return this.Equals((CameraIntrinsics)obj); 36 | } 37 | 38 | public bool Equals(CameraIntrinsics obj) 39 | { 40 | return FocalLengthX.Equals(obj.FocalLengthX) && FocalLengthY.Equals(obj.FocalLengthY) && 41 | PrincipalPointX.Equals(obj.PrincipalPointX) && PrincipalPointY.Equals(obj.PrincipalPointY) && 42 | RadialDistortionSecondOrder.Equals(obj.RadialDistortionSecondOrder) && 43 | RadialDistortionFourthOrder.Equals(obj.RadialDistortionFourthOrder) && 44 | RadialDistortionSixthOrder.Equals(obj.RadialDistortionSixthOrder); 45 | } 46 | 47 | public static bool operator ==(CameraIntrinsics a, CameraIntrinsics b) 48 | { 49 | return a.Equals(b); 50 | } 51 | 52 | public static bool operator !=(CameraIntrinsics a, CameraIntrinsics b) 53 | { 54 | return !(a.Equals(b)); 55 | } 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CameraIntrinsics.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: df25a3cb14d1e5348932c50f0d9e4135 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CollectionMap.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Helper 7 | { 8 | class CollectionMap : Helper.ThreadSafeDictionary where TValue : new() 9 | { 10 | public bool TryAddDefault(TKey key) 11 | { 12 | lock (_impl) 13 | { 14 | if (!_impl.ContainsKey(key)) 15 | { 16 | _impl.Add(key, new TValue()); 17 | return true; 18 | } 19 | else 20 | { 21 | return false; 22 | } 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Assets/Standard Assets/CollectionMap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a8ce70913a08c09488543580b791b597 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7ec172cf06391c443ad1de74762b42d5 3 | folderAsset: yes 4 | timeCreated: 1452435806 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Editor/KinectCopyPluginDataHelper.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.IO; 6 | 7 | public static class KinectCopyPluginDataHelper 8 | { 9 | private const string DataDirSuffix = "_Data"; 10 | private const string PluginsDirName = "Plugins"; 11 | 12 | private static Dictionary TargetToDirName = new Dictionary() 13 | { 14 | {BuildTarget.StandaloneWindows, "x86"}, 15 | {BuildTarget.StandaloneWindows64, "x86_64"} 16 | }; 17 | 18 | public static void CopyPluginData(BuildTarget target, string buildTargetPath, string subDirToCopy) 19 | { 20 | string subDirName; 21 | if (!TargetToDirName.TryGetValue (target, out subDirName)) 22 | { 23 | // No work to do 24 | return; 25 | } 26 | 27 | // Get Required Paths 28 | var buildName = Path.GetFileNameWithoutExtension(buildTargetPath); 29 | var targetDir = Directory.GetParent(buildTargetPath); 30 | var separator = Path.DirectorySeparatorChar; 31 | 32 | var buildDataDir = targetDir.FullName + separator + buildName + DataDirSuffix + separator; 33 | var tgtPluginsDir = buildDataDir + separator + PluginsDirName + separator + subDirToCopy + separator; 34 | var srcPluginsDir = Application.dataPath + separator + PluginsDirName + separator + subDirName + separator + subDirToCopy + separator; 35 | 36 | CopyAll (new DirectoryInfo (srcPluginsDir), new DirectoryInfo(tgtPluginsDir)); 37 | } 38 | 39 | /// 40 | /// Recursive Copy Directory Method 41 | /// 42 | private static void CopyAll(DirectoryInfo source, DirectoryInfo target) 43 | { 44 | // Check if the source directory exists, if not, don't do any work. 45 | if (!Directory.Exists(source.FullName)) 46 | { 47 | return; 48 | } 49 | 50 | // Check if the target directory exists, if not, create it. 51 | if (!Directory.Exists(target.FullName)) 52 | { 53 | Directory.CreateDirectory(target.FullName); 54 | } 55 | 56 | // Copy each file into it’s new directory. 57 | foreach (var fileInfo in source.GetFiles()) 58 | { 59 | fileInfo.CopyTo (Path.Combine (target.ToString (), fileInfo.Name), true); 60 | } 61 | 62 | // Copy each subdirectory using recursion. 63 | foreach (var subDirInfo in source.GetDirectories()) 64 | { 65 | DirectoryInfo nextTargetSubDir = target.CreateSubdirectory(subDirInfo.Name); 66 | CopyAll(subDirInfo, nextTargetSubDir); 67 | } 68 | } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Editor/KinectCopyPluginDataHelper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f9ee29984fc08464c8fab8499b2cc1ea 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/EventPump.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Runtime.InteropServices; 4 | using System.Linq; 5 | 6 | namespace Helper 7 | { 8 | internal class EventPump : UnityEngine.MonoBehaviour 9 | { 10 | private static object s_Lock = new object(); 11 | private Queue m_Queue = new Queue(); 12 | 13 | public static EventPump Instance 14 | { 15 | get; 16 | private set; 17 | } 18 | 19 | public static void EnsureInitialized() 20 | { 21 | try 22 | { 23 | if (EventPump.Instance == null) 24 | { 25 | lock (s_Lock) 26 | { 27 | if (EventPump.Instance == null) 28 | { 29 | UnityEngine.GameObject parent = new UnityEngine.GameObject("Kinect Desktop Event Pump"); 30 | EventPump.Instance = parent.AddComponent(); 31 | DontDestroyOnLoad(parent); 32 | } 33 | } 34 | } 35 | } 36 | catch 37 | { 38 | UnityEngine.Debug.LogError("Events must be registered on the main thread."); 39 | return; 40 | } 41 | } 42 | 43 | private void Update() 44 | { 45 | lock (m_Queue) 46 | { 47 | while (m_Queue.Count > 0) 48 | { 49 | var action = m_Queue.Dequeue(); 50 | try 51 | { 52 | action.Invoke(); 53 | } 54 | catch { } 55 | } 56 | } 57 | } 58 | 59 | private void OnApplicationQuit() 60 | { 61 | var sensor = Windows.Kinect.KinectSensor.GetDefault(); 62 | if (sensor != null && sensor.IsOpen) 63 | { 64 | sensor.Close(); 65 | } 66 | 67 | NativeObjectCache.Flush(); 68 | } 69 | 70 | public void Enqueue(Action action) 71 | { 72 | lock (m_Queue) 73 | { 74 | m_Queue.Enqueue(action); 75 | } 76 | } 77 | } 78 | } -------------------------------------------------------------------------------- /Assets/Standard Assets/EventPump.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 701e0706c6b21ee4fab81bb9e69ef832 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/ExceptionHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace Helper 5 | { 6 | public static class ExceptionHelper 7 | { 8 | private const int E_NOTIMPL = unchecked((int)0x80004001); 9 | private const int E_OUTOFMEMORY = unchecked((int)0x8007000E); 10 | private const int E_INVALIDARG = unchecked((int)0x80070057); 11 | private const int E_POINTER = unchecked((int) 0x80004003); 12 | private const int E_PENDING = unchecked((int)0x8000000A); 13 | private const int E_FAIL = unchecked((int)0x80004005); 14 | 15 | public static void CheckLastError() 16 | { 17 | int hr = Marshal.GetLastWin32Error(); 18 | 19 | if ((hr == E_PENDING) || (hr == E_FAIL)) 20 | { 21 | // Ignore E_PENDING/E_FAIL - We use this to indicate no pending or missed frames 22 | return; 23 | } 24 | 25 | if (hr < 0) 26 | { 27 | Exception exception = Marshal.GetExceptionForHR(hr); 28 | string message = string.Format("This API has returned an exception from an HRESULT: 0x{0:X}", hr); 29 | 30 | switch (hr) 31 | { 32 | case E_NOTIMPL: 33 | throw new NotImplementedException(message, exception); 34 | 35 | case E_OUTOFMEMORY: 36 | throw new OutOfMemoryException(message, exception); 37 | 38 | case E_INVALIDARG: 39 | throw new ArgumentException(message, exception); 40 | 41 | case E_POINTER: 42 | throw new ArgumentNullException(message, exception); 43 | 44 | default: 45 | throw new InvalidOperationException(message, exception); 46 | } 47 | } 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /Assets/Standard Assets/ExceptionHelper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3c74717cd7640384083c1a01ef88993c 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/INativeWrapper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Runtime.InteropServices; 4 | using System.Linq; 5 | 6 | namespace Helper 7 | { 8 | internal interface INativeWrapper 9 | { 10 | System.IntPtr nativePtr { get; } 11 | } 12 | } -------------------------------------------------------------------------------- /Assets/Standard Assets/INativeWrapper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 20715b97c56809d41991f09af4ca1791 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/KinectBuffer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7bd6d021b09929e42ae72b49060bb91e 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/KinectSpecialCases.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c59b79770236fae42a76e291570f2447 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/NativeObjectCache.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c1f77dd67b03a6c43baea840653a8393 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/NativeWrapper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Runtime.InteropServices; 4 | using System.Linq; 5 | 6 | namespace Helper 7 | { 8 | public static class NativeWrapper 9 | { 10 | public static System.IntPtr GetNativePtr(Object obj) 11 | { 12 | if(obj == null) 13 | { 14 | return System.IntPtr.Zero; 15 | } 16 | 17 | var nativeWrapperIface = obj as INativeWrapper; 18 | if(nativeWrapperIface != null) 19 | { 20 | return nativeWrapperIface.nativePtr; 21 | } 22 | else 23 | { 24 | throw new ArgumentException("Object must wrap native type"); 25 | } 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /Assets/Standard Assets/NativeWrapper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 28c081e2f607f374487741566d989c9b 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/SmartGCHandle.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Runtime.InteropServices; 4 | using System.Linq; 5 | 6 | namespace Helper 7 | { 8 | public class SmartGCHandle : IDisposable 9 | { 10 | private GCHandle handle; 11 | public SmartGCHandle(GCHandle handle) 12 | { 13 | this.handle = handle; 14 | } 15 | 16 | ~SmartGCHandle() 17 | { 18 | Dispose(false); 19 | } 20 | 21 | public System.IntPtr AddrOfPinnedObject() 22 | { 23 | return handle.AddrOfPinnedObject(); 24 | } 25 | 26 | public virtual void Dispose() 27 | { 28 | Dispose(true); 29 | } 30 | 31 | protected virtual void Dispose(bool disposing) 32 | { 33 | this.handle.Free(); 34 | } 35 | 36 | public static implicit operator GCHandle(SmartGCHandle other) 37 | { 38 | 39 | return other.handle; 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /Assets/Standard Assets/SmartGCHandle.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9c80caf7da43ac94b9e8943bac67cd46 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/ThreadSafeDictionary.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Runtime.InteropServices; 4 | using System.Linq; 5 | 6 | namespace Helper 7 | { 8 | public class ThreadSafeDictionary 9 | { 10 | protected readonly Dictionary _impl = new Dictionary(); 11 | public TValue this[TKey key] 12 | { 13 | get 14 | { 15 | lock (_impl) 16 | { 17 | return _impl[key]; 18 | } 19 | } 20 | set 21 | { 22 | lock (_impl) 23 | { 24 | _impl[key] = value; 25 | } 26 | } 27 | } 28 | 29 | public void Add(TKey key, TValue value) 30 | { 31 | lock (_impl) 32 | { 33 | _impl.Add(key, value); 34 | } 35 | } 36 | 37 | public bool TryGetValue(TKey key, out TValue value) 38 | { 39 | lock (_impl) 40 | { 41 | return _impl.TryGetValue(key, out value); 42 | } 43 | } 44 | 45 | public bool Remove(TKey key) 46 | { 47 | lock (_impl) 48 | { 49 | return _impl.Remove(key); 50 | } 51 | } 52 | 53 | public void Clear() 54 | { 55 | lock (_impl) 56 | { 57 | _impl.Clear(); 58 | } 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /Assets/Standard Assets/ThreadSafeDictionary.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 549c8d742f7bbe648a2c7090db7db367 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 92e22375ffb029f47a76c48592816044 3 | folderAsset: yes 4 | timeCreated: 1452435806 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Data.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3c3f9ae845e7dd2428db47a3cb9810bb 3 | folderAsset: yes 4 | timeCreated: 1452435806 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Data/PropertyChangedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Data 5 | { 6 | // 7 | // Windows.Data.PropertyChangedEventArgs 8 | // 9 | public sealed partial class PropertyChangedEventArgs : RootSystem.EventArgs, Helper.INativeWrapper 10 | 11 | { 12 | internal RootSystem.IntPtr _pNative; 13 | RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } 14 | 15 | // Constructors and Finalizers 16 | internal PropertyChangedEventArgs(RootSystem.IntPtr pNative) 17 | { 18 | _pNative = pNative; 19 | Windows_Data_PropertyChangedEventArgs_AddRefObject(ref _pNative); 20 | } 21 | 22 | ~PropertyChangedEventArgs() 23 | { 24 | Dispose(false); 25 | } 26 | 27 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 28 | private static extern void Windows_Data_PropertyChangedEventArgs_ReleaseObject(ref RootSystem.IntPtr pNative); 29 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 30 | private static extern void Windows_Data_PropertyChangedEventArgs_AddRefObject(ref RootSystem.IntPtr pNative); 31 | private void Dispose(bool disposing) 32 | { 33 | if (_pNative == RootSystem.IntPtr.Zero) 34 | { 35 | return; 36 | } 37 | 38 | __EventCleanup(); 39 | 40 | Helper.NativeObjectCache.RemoveObject(_pNative); 41 | Windows_Data_PropertyChangedEventArgs_ReleaseObject(ref _pNative); 42 | 43 | _pNative = RootSystem.IntPtr.Zero; 44 | } 45 | 46 | 47 | // Public Properties 48 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 49 | private static extern RootSystem.IntPtr Windows_Data_PropertyChangedEventArgs_get_PropertyName(RootSystem.IntPtr pNative); 50 | public string PropertyName 51 | { 52 | get 53 | { 54 | if (_pNative == RootSystem.IntPtr.Zero) 55 | { 56 | throw new RootSystem.ObjectDisposedException("PropertyChangedEventArgs"); 57 | } 58 | 59 | RootSystem.IntPtr objectPointer = Windows_Data_PropertyChangedEventArgs_get_PropertyName(_pNative); 60 | Helper.ExceptionHelper.CheckLastError(); 61 | 62 | var managedString = RootSystem.Runtime.InteropServices.Marshal.PtrToStringUni(objectPointer); 63 | RootSystem.Runtime.InteropServices.Marshal.FreeCoTaskMem(objectPointer); 64 | return managedString; 65 | } 66 | } 67 | 68 | private void __EventCleanup() 69 | { 70 | } 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Data/PropertyChangedEventArgs.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0f717bd2a5c39cc43a49fc8904889932 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f560efe00ce409428b366ba89d7c89b 3 | folderAsset: yes 4 | timeCreated: 1452435806 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/Activity.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.Activity 8 | // 9 | public enum Activity : int 10 | { 11 | EyeLeftClosed =0, 12 | EyeRightClosed =1, 13 | MouthOpen =2, 14 | MouthMoved =3, 15 | LookingAway =4, 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/Activity.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ec6785f19ac6c494a9957fa63f49fcf5 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/Appearance.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.Appearance 8 | // 9 | public enum Appearance : int 10 | { 11 | WearingGlasses =0, 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/Appearance.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 00eb0d9c4964c0b4f9e3090704ff7201 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/AudioBeam.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e64f7eb8de6f72e42874eb2ea7c01be5 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/AudioBeamFrame.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ff93fd69396b944ea1e0d067cf5b091 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/AudioBeamFrameArrivedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.AudioBeamFrameArrivedEventArgs 8 | // 9 | public sealed partial class AudioBeamFrameArrivedEventArgs : RootSystem.EventArgs, Helper.INativeWrapper 10 | 11 | { 12 | internal RootSystem.IntPtr _pNative; 13 | RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } 14 | 15 | // Constructors and Finalizers 16 | internal AudioBeamFrameArrivedEventArgs(RootSystem.IntPtr pNative) 17 | { 18 | _pNative = pNative; 19 | Windows_Kinect_AudioBeamFrameArrivedEventArgs_AddRefObject(ref _pNative); 20 | } 21 | 22 | ~AudioBeamFrameArrivedEventArgs() 23 | { 24 | Dispose(false); 25 | } 26 | 27 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 28 | private static extern void Windows_Kinect_AudioBeamFrameArrivedEventArgs_ReleaseObject(ref RootSystem.IntPtr pNative); 29 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 30 | private static extern void Windows_Kinect_AudioBeamFrameArrivedEventArgs_AddRefObject(ref RootSystem.IntPtr pNative); 31 | private void Dispose(bool disposing) 32 | { 33 | if (_pNative == RootSystem.IntPtr.Zero) 34 | { 35 | return; 36 | } 37 | 38 | __EventCleanup(); 39 | 40 | Helper.NativeObjectCache.RemoveObject(_pNative); 41 | Windows_Kinect_AudioBeamFrameArrivedEventArgs_ReleaseObject(ref _pNative); 42 | 43 | _pNative = RootSystem.IntPtr.Zero; 44 | } 45 | 46 | 47 | // Public Properties 48 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 49 | private static extern RootSystem.IntPtr Windows_Kinect_AudioBeamFrameArrivedEventArgs_get_FrameReference(RootSystem.IntPtr pNative); 50 | public Windows.Kinect.AudioBeamFrameReference FrameReference 51 | { 52 | get 53 | { 54 | if (_pNative == RootSystem.IntPtr.Zero) 55 | { 56 | throw new RootSystem.ObjectDisposedException("AudioBeamFrameArrivedEventArgs"); 57 | } 58 | 59 | RootSystem.IntPtr objectPointer = Windows_Kinect_AudioBeamFrameArrivedEventArgs_get_FrameReference(_pNative); 60 | Helper.ExceptionHelper.CheckLastError(); 61 | if (objectPointer == RootSystem.IntPtr.Zero) 62 | { 63 | return null; 64 | } 65 | 66 | return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.AudioBeamFrameReference(n)); 67 | } 68 | } 69 | 70 | private void __EventCleanup() 71 | { 72 | } 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/AudioBeamFrameArrivedEventArgs.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bb78a9668fb2c694881a216e349cb1e9 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/AudioBeamFrameList.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.AudioBeamFrameList 8 | // 9 | public sealed partial class AudioBeamFrameList : RootSystem.IDisposable, Helper.INativeWrapper 10 | 11 | { 12 | internal RootSystem.IntPtr _pNative; 13 | RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } 14 | 15 | // Constructors and Finalizers 16 | internal AudioBeamFrameList(RootSystem.IntPtr pNative) 17 | { 18 | _pNative = pNative; 19 | Windows_Kinect_AudioBeamFrameList_AddRefObject(ref _pNative); 20 | } 21 | 22 | ~AudioBeamFrameList() 23 | { 24 | Dispose(false); 25 | } 26 | 27 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 28 | private static extern void Windows_Kinect_AudioBeamFrameList_ReleaseObject(ref RootSystem.IntPtr pNative); 29 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 30 | private static extern void Windows_Kinect_AudioBeamFrameList_AddRefObject(ref RootSystem.IntPtr pNative); 31 | private void Dispose(bool disposing) 32 | { 33 | if (_pNative == RootSystem.IntPtr.Zero) 34 | { 35 | return; 36 | } 37 | 38 | __EventCleanup(); 39 | 40 | Helper.NativeObjectCache.RemoveObject(_pNative); 41 | 42 | if (disposing) 43 | { 44 | Windows_Kinect_AudioBeamFrameList_Dispose(_pNative); 45 | } 46 | Windows_Kinect_AudioBeamFrameList_ReleaseObject(ref _pNative); 47 | 48 | _pNative = RootSystem.IntPtr.Zero; 49 | } 50 | 51 | 52 | // Public Methods 53 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 54 | private static extern void Windows_Kinect_AudioBeamFrameList_Dispose(RootSystem.IntPtr pNative); 55 | public void Dispose() 56 | { 57 | if (_pNative == RootSystem.IntPtr.Zero) 58 | { 59 | return; 60 | } 61 | 62 | Dispose(true); 63 | RootSystem.GC.SuppressFinalize(this); 64 | } 65 | 66 | private void __EventCleanup() 67 | { 68 | } 69 | } 70 | 71 | } 72 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/AudioBeamFrameList.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe7ef6722da9a6d42b589d3f8b35b6f9 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/AudioBeamFrameReader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: df51c172437a76942a0ec4a4f1438a8f 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/AudioBeamFrameReference.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0fe91384e0a914a4985b0cc2f1026a72 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/AudioBeamMode.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.AudioBeamMode 8 | // 9 | public enum AudioBeamMode : int 10 | { 11 | Automatic =0, 12 | Manual =1, 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/AudioBeamMode.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1f287bc065b7e7a4faa7cf96c175eabb 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/AudioBeamSubFrame.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e3bf3859145801247a7f6d4dcd90b2be 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/AudioBodyCorrelation.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.AudioBodyCorrelation 8 | // 9 | public sealed partial class AudioBodyCorrelation : Helper.INativeWrapper 10 | 11 | { 12 | internal RootSystem.IntPtr _pNative; 13 | RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } 14 | 15 | // Constructors and Finalizers 16 | internal AudioBodyCorrelation(RootSystem.IntPtr pNative) 17 | { 18 | _pNative = pNative; 19 | Windows_Kinect_AudioBodyCorrelation_AddRefObject(ref _pNative); 20 | } 21 | 22 | ~AudioBodyCorrelation() 23 | { 24 | Dispose(false); 25 | } 26 | 27 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 28 | private static extern void Windows_Kinect_AudioBodyCorrelation_ReleaseObject(ref RootSystem.IntPtr pNative); 29 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 30 | private static extern void Windows_Kinect_AudioBodyCorrelation_AddRefObject(ref RootSystem.IntPtr pNative); 31 | private void Dispose(bool disposing) 32 | { 33 | if (_pNative == RootSystem.IntPtr.Zero) 34 | { 35 | return; 36 | } 37 | 38 | __EventCleanup(); 39 | 40 | Helper.NativeObjectCache.RemoveObject(_pNative); 41 | Windows_Kinect_AudioBodyCorrelation_ReleaseObject(ref _pNative); 42 | 43 | _pNative = RootSystem.IntPtr.Zero; 44 | } 45 | 46 | 47 | // Public Properties 48 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 49 | private static extern ulong Windows_Kinect_AudioBodyCorrelation_get_BodyTrackingId(RootSystem.IntPtr pNative); 50 | public ulong BodyTrackingId 51 | { 52 | get 53 | { 54 | if (_pNative == RootSystem.IntPtr.Zero) 55 | { 56 | throw new RootSystem.ObjectDisposedException("AudioBodyCorrelation"); 57 | } 58 | 59 | return Windows_Kinect_AudioBodyCorrelation_get_BodyTrackingId(_pNative); 60 | } 61 | } 62 | 63 | private void __EventCleanup() 64 | { 65 | } 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/AudioBodyCorrelation.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f12e3715b57390a47aeecc0046c6d6ff 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/AudioSource.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb60632e999b8d44cb5cfd848e264abf 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/Body.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2de6a71b01a15e740a2fb488ab8a1b07 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/BodyFrame.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 19d23b65a55461b4c8fcfc815e9a8be5 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/BodyFrameArrivedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.BodyFrameArrivedEventArgs 8 | // 9 | public sealed partial class BodyFrameArrivedEventArgs : RootSystem.EventArgs, Helper.INativeWrapper 10 | 11 | { 12 | internal RootSystem.IntPtr _pNative; 13 | RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } 14 | 15 | // Constructors and Finalizers 16 | internal BodyFrameArrivedEventArgs(RootSystem.IntPtr pNative) 17 | { 18 | _pNative = pNative; 19 | Windows_Kinect_BodyFrameArrivedEventArgs_AddRefObject(ref _pNative); 20 | } 21 | 22 | ~BodyFrameArrivedEventArgs() 23 | { 24 | Dispose(false); 25 | } 26 | 27 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 28 | private static extern void Windows_Kinect_BodyFrameArrivedEventArgs_ReleaseObject(ref RootSystem.IntPtr pNative); 29 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 30 | private static extern void Windows_Kinect_BodyFrameArrivedEventArgs_AddRefObject(ref RootSystem.IntPtr pNative); 31 | private void Dispose(bool disposing) 32 | { 33 | if (_pNative == RootSystem.IntPtr.Zero) 34 | { 35 | return; 36 | } 37 | 38 | __EventCleanup(); 39 | 40 | Helper.NativeObjectCache.RemoveObject(_pNative); 41 | Windows_Kinect_BodyFrameArrivedEventArgs_ReleaseObject(ref _pNative); 42 | 43 | _pNative = RootSystem.IntPtr.Zero; 44 | } 45 | 46 | 47 | // Public Properties 48 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 49 | private static extern RootSystem.IntPtr Windows_Kinect_BodyFrameArrivedEventArgs_get_FrameReference(RootSystem.IntPtr pNative); 50 | public Windows.Kinect.BodyFrameReference FrameReference 51 | { 52 | get 53 | { 54 | if (_pNative == RootSystem.IntPtr.Zero) 55 | { 56 | throw new RootSystem.ObjectDisposedException("BodyFrameArrivedEventArgs"); 57 | } 58 | 59 | RootSystem.IntPtr objectPointer = Windows_Kinect_BodyFrameArrivedEventArgs_get_FrameReference(_pNative); 60 | Helper.ExceptionHelper.CheckLastError(); 61 | if (objectPointer == RootSystem.IntPtr.Zero) 62 | { 63 | return null; 64 | } 65 | 66 | return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.BodyFrameReference(n)); 67 | } 68 | } 69 | 70 | private void __EventCleanup() 71 | { 72 | } 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/BodyFrameArrivedEventArgs.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 676ce9850965f6d4fad5e20fa2a8da30 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/BodyFrameReader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3af2f300d248d614eb0f026c16be6e51 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/BodyFrameReference.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.BodyFrameReference 8 | // 9 | public sealed partial class BodyFrameReference : Helper.INativeWrapper 10 | 11 | { 12 | internal RootSystem.IntPtr _pNative; 13 | RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } 14 | 15 | // Constructors and Finalizers 16 | internal BodyFrameReference(RootSystem.IntPtr pNative) 17 | { 18 | _pNative = pNative; 19 | Windows_Kinect_BodyFrameReference_AddRefObject(ref _pNative); 20 | } 21 | 22 | ~BodyFrameReference() 23 | { 24 | Dispose(false); 25 | } 26 | 27 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 28 | private static extern void Windows_Kinect_BodyFrameReference_ReleaseObject(ref RootSystem.IntPtr pNative); 29 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 30 | private static extern void Windows_Kinect_BodyFrameReference_AddRefObject(ref RootSystem.IntPtr pNative); 31 | private void Dispose(bool disposing) 32 | { 33 | if (_pNative == RootSystem.IntPtr.Zero) 34 | { 35 | return; 36 | } 37 | 38 | __EventCleanup(); 39 | 40 | Helper.NativeObjectCache.RemoveObject(_pNative); 41 | Windows_Kinect_BodyFrameReference_ReleaseObject(ref _pNative); 42 | 43 | _pNative = RootSystem.IntPtr.Zero; 44 | } 45 | 46 | 47 | // Public Properties 48 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 49 | private static extern long Windows_Kinect_BodyFrameReference_get_RelativeTime(RootSystem.IntPtr pNative); 50 | public RootSystem.TimeSpan RelativeTime 51 | { 52 | get 53 | { 54 | if (_pNative == RootSystem.IntPtr.Zero) 55 | { 56 | throw new RootSystem.ObjectDisposedException("BodyFrameReference"); 57 | } 58 | 59 | return RootSystem.TimeSpan.FromMilliseconds(Windows_Kinect_BodyFrameReference_get_RelativeTime(_pNative)); 60 | } 61 | } 62 | 63 | 64 | // Public Methods 65 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 66 | private static extern RootSystem.IntPtr Windows_Kinect_BodyFrameReference_AcquireFrame(RootSystem.IntPtr pNative); 67 | public Windows.Kinect.BodyFrame AcquireFrame() 68 | { 69 | if (_pNative == RootSystem.IntPtr.Zero) 70 | { 71 | throw new RootSystem.ObjectDisposedException("BodyFrameReference"); 72 | } 73 | 74 | RootSystem.IntPtr objectPointer = Windows_Kinect_BodyFrameReference_AcquireFrame(_pNative); 75 | Helper.ExceptionHelper.CheckLastError(); 76 | if (objectPointer == RootSystem.IntPtr.Zero) 77 | { 78 | return null; 79 | } 80 | 81 | return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.BodyFrame(n)); 82 | } 83 | 84 | private void __EventCleanup() 85 | { 86 | } 87 | } 88 | 89 | } 90 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/BodyFrameReference.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 083a7736def5ad3429a51cc96a6c4564 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/BodyFrameSource.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3679e372811a218438e365b6da52873c 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/BodyIndexFrame.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 31029a9c200fe984790d50a6d2875e32 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/BodyIndexFrameArrivedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.BodyIndexFrameArrivedEventArgs 8 | // 9 | public sealed partial class BodyIndexFrameArrivedEventArgs : RootSystem.EventArgs, Helper.INativeWrapper 10 | 11 | { 12 | internal RootSystem.IntPtr _pNative; 13 | RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } 14 | 15 | // Constructors and Finalizers 16 | internal BodyIndexFrameArrivedEventArgs(RootSystem.IntPtr pNative) 17 | { 18 | _pNative = pNative; 19 | Windows_Kinect_BodyIndexFrameArrivedEventArgs_AddRefObject(ref _pNative); 20 | } 21 | 22 | ~BodyIndexFrameArrivedEventArgs() 23 | { 24 | Dispose(false); 25 | } 26 | 27 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 28 | private static extern void Windows_Kinect_BodyIndexFrameArrivedEventArgs_ReleaseObject(ref RootSystem.IntPtr pNative); 29 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 30 | private static extern void Windows_Kinect_BodyIndexFrameArrivedEventArgs_AddRefObject(ref RootSystem.IntPtr pNative); 31 | private void Dispose(bool disposing) 32 | { 33 | if (_pNative == RootSystem.IntPtr.Zero) 34 | { 35 | return; 36 | } 37 | 38 | __EventCleanup(); 39 | 40 | Helper.NativeObjectCache.RemoveObject(_pNative); 41 | Windows_Kinect_BodyIndexFrameArrivedEventArgs_ReleaseObject(ref _pNative); 42 | 43 | _pNative = RootSystem.IntPtr.Zero; 44 | } 45 | 46 | 47 | // Public Properties 48 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 49 | private static extern RootSystem.IntPtr Windows_Kinect_BodyIndexFrameArrivedEventArgs_get_FrameReference(RootSystem.IntPtr pNative); 50 | public Windows.Kinect.BodyIndexFrameReference FrameReference 51 | { 52 | get 53 | { 54 | if (_pNative == RootSystem.IntPtr.Zero) 55 | { 56 | throw new RootSystem.ObjectDisposedException("BodyIndexFrameArrivedEventArgs"); 57 | } 58 | 59 | RootSystem.IntPtr objectPointer = Windows_Kinect_BodyIndexFrameArrivedEventArgs_get_FrameReference(_pNative); 60 | Helper.ExceptionHelper.CheckLastError(); 61 | if (objectPointer == RootSystem.IntPtr.Zero) 62 | { 63 | return null; 64 | } 65 | 66 | return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.BodyIndexFrameReference(n)); 67 | } 68 | } 69 | 70 | private void __EventCleanup() 71 | { 72 | } 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/BodyIndexFrameArrivedEventArgs.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 673826e3a38138946b030da95a1d0f95 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/BodyIndexFrameReader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0a9ba9eb393e51241bb15db5d3bf3390 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/BodyIndexFrameReference.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.BodyIndexFrameReference 8 | // 9 | public sealed partial class BodyIndexFrameReference : Helper.INativeWrapper 10 | 11 | { 12 | internal RootSystem.IntPtr _pNative; 13 | RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } 14 | 15 | // Constructors and Finalizers 16 | internal BodyIndexFrameReference(RootSystem.IntPtr pNative) 17 | { 18 | _pNative = pNative; 19 | Windows_Kinect_BodyIndexFrameReference_AddRefObject(ref _pNative); 20 | } 21 | 22 | ~BodyIndexFrameReference() 23 | { 24 | Dispose(false); 25 | } 26 | 27 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 28 | private static extern void Windows_Kinect_BodyIndexFrameReference_ReleaseObject(ref RootSystem.IntPtr pNative); 29 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 30 | private static extern void Windows_Kinect_BodyIndexFrameReference_AddRefObject(ref RootSystem.IntPtr pNative); 31 | private void Dispose(bool disposing) 32 | { 33 | if (_pNative == RootSystem.IntPtr.Zero) 34 | { 35 | return; 36 | } 37 | 38 | __EventCleanup(); 39 | 40 | Helper.NativeObjectCache.RemoveObject(_pNative); 41 | Windows_Kinect_BodyIndexFrameReference_ReleaseObject(ref _pNative); 42 | 43 | _pNative = RootSystem.IntPtr.Zero; 44 | } 45 | 46 | 47 | // Public Properties 48 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 49 | private static extern long Windows_Kinect_BodyIndexFrameReference_get_RelativeTime(RootSystem.IntPtr pNative); 50 | public RootSystem.TimeSpan RelativeTime 51 | { 52 | get 53 | { 54 | if (_pNative == RootSystem.IntPtr.Zero) 55 | { 56 | throw new RootSystem.ObjectDisposedException("BodyIndexFrameReference"); 57 | } 58 | 59 | return RootSystem.TimeSpan.FromMilliseconds(Windows_Kinect_BodyIndexFrameReference_get_RelativeTime(_pNative)); 60 | } 61 | } 62 | 63 | 64 | // Public Methods 65 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 66 | private static extern RootSystem.IntPtr Windows_Kinect_BodyIndexFrameReference_AcquireFrame(RootSystem.IntPtr pNative); 67 | public Windows.Kinect.BodyIndexFrame AcquireFrame() 68 | { 69 | if (_pNative == RootSystem.IntPtr.Zero) 70 | { 71 | throw new RootSystem.ObjectDisposedException("BodyIndexFrameReference"); 72 | } 73 | 74 | RootSystem.IntPtr objectPointer = Windows_Kinect_BodyIndexFrameReference_AcquireFrame(_pNative); 75 | Helper.ExceptionHelper.CheckLastError(); 76 | if (objectPointer == RootSystem.IntPtr.Zero) 77 | { 78 | return null; 79 | } 80 | 81 | return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.BodyIndexFrame(n)); 82 | } 83 | 84 | private void __EventCleanup() 85 | { 86 | } 87 | } 88 | 89 | } 90 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/BodyIndexFrameReference.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3ee08767e1297454a93a5759b975860d 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/BodyIndexFrameSource.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7568d115ed2fcca4ba26af8d7e3252c6 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/CameraSpacePoint.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.CameraSpacePoint 8 | // 9 | [RootSystem.Runtime.InteropServices.StructLayout(RootSystem.Runtime.InteropServices.LayoutKind.Sequential)] 10 | public struct CameraSpacePoint 11 | { 12 | public float X { get; set; } 13 | public float Y { get; set; } 14 | public float Z { get; set; } 15 | 16 | public override int GetHashCode() 17 | { 18 | return X.GetHashCode() ^ Y.GetHashCode() ^ Z.GetHashCode(); 19 | } 20 | 21 | public override bool Equals(object obj) 22 | { 23 | if (!(obj is CameraSpacePoint)) 24 | { 25 | return false; 26 | } 27 | 28 | return this.Equals((CameraSpacePoint)obj); 29 | } 30 | 31 | public bool Equals(CameraSpacePoint obj) 32 | { 33 | return X.Equals(obj.X) && Y.Equals(obj.Y) && Z.Equals(obj.Z); 34 | } 35 | 36 | public static bool operator ==(CameraSpacePoint a, CameraSpacePoint b) 37 | { 38 | return a.Equals(b); 39 | } 40 | 41 | public static bool operator !=(CameraSpacePoint a, CameraSpacePoint b) 42 | { 43 | return !(a.Equals(b)); 44 | } 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/CameraSpacePoint.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ef37675a811881f44be680e69695e9e3 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/ColorCameraSettings.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1f199f6bb5e11b941b4c707a6783daaa 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/ColorFrame.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4e3ef938a829c1d4385d938971be0b73 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/ColorFrameArrivedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.ColorFrameArrivedEventArgs 8 | // 9 | public sealed partial class ColorFrameArrivedEventArgs : RootSystem.EventArgs, Helper.INativeWrapper 10 | 11 | { 12 | internal RootSystem.IntPtr _pNative; 13 | RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } 14 | 15 | // Constructors and Finalizers 16 | internal ColorFrameArrivedEventArgs(RootSystem.IntPtr pNative) 17 | { 18 | _pNative = pNative; 19 | Windows_Kinect_ColorFrameArrivedEventArgs_AddRefObject(ref _pNative); 20 | } 21 | 22 | ~ColorFrameArrivedEventArgs() 23 | { 24 | Dispose(false); 25 | } 26 | 27 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 28 | private static extern void Windows_Kinect_ColorFrameArrivedEventArgs_ReleaseObject(ref RootSystem.IntPtr pNative); 29 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 30 | private static extern void Windows_Kinect_ColorFrameArrivedEventArgs_AddRefObject(ref RootSystem.IntPtr pNative); 31 | private void Dispose(bool disposing) 32 | { 33 | if (_pNative == RootSystem.IntPtr.Zero) 34 | { 35 | return; 36 | } 37 | 38 | __EventCleanup(); 39 | 40 | Helper.NativeObjectCache.RemoveObject(_pNative); 41 | Windows_Kinect_ColorFrameArrivedEventArgs_ReleaseObject(ref _pNative); 42 | 43 | _pNative = RootSystem.IntPtr.Zero; 44 | } 45 | 46 | 47 | // Public Properties 48 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 49 | private static extern RootSystem.IntPtr Windows_Kinect_ColorFrameArrivedEventArgs_get_FrameReference(RootSystem.IntPtr pNative); 50 | public Windows.Kinect.ColorFrameReference FrameReference 51 | { 52 | get 53 | { 54 | if (_pNative == RootSystem.IntPtr.Zero) 55 | { 56 | throw new RootSystem.ObjectDisposedException("ColorFrameArrivedEventArgs"); 57 | } 58 | 59 | RootSystem.IntPtr objectPointer = Windows_Kinect_ColorFrameArrivedEventArgs_get_FrameReference(_pNative); 60 | Helper.ExceptionHelper.CheckLastError(); 61 | if (objectPointer == RootSystem.IntPtr.Zero) 62 | { 63 | return null; 64 | } 65 | 66 | return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.ColorFrameReference(n)); 67 | } 68 | } 69 | 70 | private void __EventCleanup() 71 | { 72 | } 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/ColorFrameArrivedEventArgs.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 383ab6b5e32edbc4ca3eca80db481330 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/ColorFrameReader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6c8a043d45b0ce641bfe872c2654ec00 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/ColorFrameReference.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.ColorFrameReference 8 | // 9 | public sealed partial class ColorFrameReference : Helper.INativeWrapper 10 | 11 | { 12 | internal RootSystem.IntPtr _pNative; 13 | RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } 14 | 15 | // Constructors and Finalizers 16 | internal ColorFrameReference(RootSystem.IntPtr pNative) 17 | { 18 | _pNative = pNative; 19 | Windows_Kinect_ColorFrameReference_AddRefObject(ref _pNative); 20 | } 21 | 22 | ~ColorFrameReference() 23 | { 24 | Dispose(false); 25 | } 26 | 27 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 28 | private static extern void Windows_Kinect_ColorFrameReference_ReleaseObject(ref RootSystem.IntPtr pNative); 29 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 30 | private static extern void Windows_Kinect_ColorFrameReference_AddRefObject(ref RootSystem.IntPtr pNative); 31 | private void Dispose(bool disposing) 32 | { 33 | if (_pNative == RootSystem.IntPtr.Zero) 34 | { 35 | return; 36 | } 37 | 38 | __EventCleanup(); 39 | 40 | Helper.NativeObjectCache.RemoveObject(_pNative); 41 | Windows_Kinect_ColorFrameReference_ReleaseObject(ref _pNative); 42 | 43 | _pNative = RootSystem.IntPtr.Zero; 44 | } 45 | 46 | 47 | // Public Properties 48 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 49 | private static extern long Windows_Kinect_ColorFrameReference_get_RelativeTime(RootSystem.IntPtr pNative); 50 | public RootSystem.TimeSpan RelativeTime 51 | { 52 | get 53 | { 54 | if (_pNative == RootSystem.IntPtr.Zero) 55 | { 56 | throw new RootSystem.ObjectDisposedException("ColorFrameReference"); 57 | } 58 | 59 | return RootSystem.TimeSpan.FromMilliseconds(Windows_Kinect_ColorFrameReference_get_RelativeTime(_pNative)); 60 | } 61 | } 62 | 63 | 64 | // Public Methods 65 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 66 | private static extern RootSystem.IntPtr Windows_Kinect_ColorFrameReference_AcquireFrame(RootSystem.IntPtr pNative); 67 | public Windows.Kinect.ColorFrame AcquireFrame() 68 | { 69 | if (_pNative == RootSystem.IntPtr.Zero) 70 | { 71 | throw new RootSystem.ObjectDisposedException("ColorFrameReference"); 72 | } 73 | 74 | RootSystem.IntPtr objectPointer = Windows_Kinect_ColorFrameReference_AcquireFrame(_pNative); 75 | Helper.ExceptionHelper.CheckLastError(); 76 | if (objectPointer == RootSystem.IntPtr.Zero) 77 | { 78 | return null; 79 | } 80 | 81 | return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.ColorFrame(n)); 82 | } 83 | 84 | private void __EventCleanup() 85 | { 86 | } 87 | } 88 | 89 | } 90 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/ColorFrameReference.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 05fb49d39d96f5a4ea512141fab5cff6 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/ColorFrameSource.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 31be1a3a8cdc0d1408a7eada947fe966 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/ColorImageFormat.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.ColorImageFormat 8 | // 9 | public enum ColorImageFormat : int 10 | { 11 | None =0, 12 | Rgba =1, 13 | Yuv =2, 14 | Bgra =3, 15 | Bayer =4, 16 | Yuy2 =5, 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/ColorImageFormat.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a203492c798220244927d338800eec2f 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/ColorSpacePoint.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.ColorSpacePoint 8 | // 9 | [RootSystem.Runtime.InteropServices.StructLayout(RootSystem.Runtime.InteropServices.LayoutKind.Sequential)] 10 | public struct ColorSpacePoint 11 | { 12 | public float X { get; set; } 13 | public float Y { get; set; } 14 | 15 | public override int GetHashCode() 16 | { 17 | return X.GetHashCode() ^ Y.GetHashCode(); 18 | } 19 | 20 | public override bool Equals(object obj) 21 | { 22 | if (!(obj is ColorSpacePoint)) 23 | { 24 | return false; 25 | } 26 | 27 | return this.Equals((ColorSpacePoint)obj); 28 | } 29 | 30 | public bool Equals(ColorSpacePoint obj) 31 | { 32 | return X.Equals(obj.X) && Y.Equals(obj.Y); 33 | } 34 | 35 | public static bool operator ==(ColorSpacePoint a, ColorSpacePoint b) 36 | { 37 | return a.Equals(b); 38 | } 39 | 40 | public static bool operator !=(ColorSpacePoint a, ColorSpacePoint b) 41 | { 42 | return !(a.Equals(b)); 43 | } 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/ColorSpacePoint.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9eb5711cb5d886b45883ead06f286283 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/CoordinateMapper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 452370c006443bb40bc44aa5d4bd8def 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/CoordinateMappingChangedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.CoordinateMappingChangedEventArgs 8 | // 9 | public sealed partial class CoordinateMappingChangedEventArgs : RootSystem.EventArgs, Helper.INativeWrapper 10 | 11 | { 12 | internal RootSystem.IntPtr _pNative; 13 | RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } 14 | 15 | // Constructors and Finalizers 16 | internal CoordinateMappingChangedEventArgs(RootSystem.IntPtr pNative) 17 | { 18 | _pNative = pNative; 19 | Windows_Kinect_CoordinateMappingChangedEventArgs_AddRefObject(ref _pNative); 20 | } 21 | 22 | ~CoordinateMappingChangedEventArgs() 23 | { 24 | Dispose(false); 25 | } 26 | 27 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 28 | private static extern void Windows_Kinect_CoordinateMappingChangedEventArgs_ReleaseObject(ref RootSystem.IntPtr pNative); 29 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 30 | private static extern void Windows_Kinect_CoordinateMappingChangedEventArgs_AddRefObject(ref RootSystem.IntPtr pNative); 31 | private void Dispose(bool disposing) 32 | { 33 | if (_pNative == RootSystem.IntPtr.Zero) 34 | { 35 | return; 36 | } 37 | 38 | __EventCleanup(); 39 | 40 | Helper.NativeObjectCache.RemoveObject(_pNative); 41 | Windows_Kinect_CoordinateMappingChangedEventArgs_ReleaseObject(ref _pNative); 42 | 43 | _pNative = RootSystem.IntPtr.Zero; 44 | } 45 | 46 | private void __EventCleanup() 47 | { 48 | } 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/CoordinateMappingChangedEventArgs.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 82cb5d8afd91cba43a5380999e22e2cb 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/DepthFrame.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1cc3d786ee7037e40b806839fdca184a 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/DepthFrameArrivedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.DepthFrameArrivedEventArgs 8 | // 9 | public sealed partial class DepthFrameArrivedEventArgs : RootSystem.EventArgs, Helper.INativeWrapper 10 | 11 | { 12 | internal RootSystem.IntPtr _pNative; 13 | RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } 14 | 15 | // Constructors and Finalizers 16 | internal DepthFrameArrivedEventArgs(RootSystem.IntPtr pNative) 17 | { 18 | _pNative = pNative; 19 | Windows_Kinect_DepthFrameArrivedEventArgs_AddRefObject(ref _pNative); 20 | } 21 | 22 | ~DepthFrameArrivedEventArgs() 23 | { 24 | Dispose(false); 25 | } 26 | 27 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 28 | private static extern void Windows_Kinect_DepthFrameArrivedEventArgs_ReleaseObject(ref RootSystem.IntPtr pNative); 29 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 30 | private static extern void Windows_Kinect_DepthFrameArrivedEventArgs_AddRefObject(ref RootSystem.IntPtr pNative); 31 | private void Dispose(bool disposing) 32 | { 33 | if (_pNative == RootSystem.IntPtr.Zero) 34 | { 35 | return; 36 | } 37 | 38 | __EventCleanup(); 39 | 40 | Helper.NativeObjectCache.RemoveObject(_pNative); 41 | Windows_Kinect_DepthFrameArrivedEventArgs_ReleaseObject(ref _pNative); 42 | 43 | _pNative = RootSystem.IntPtr.Zero; 44 | } 45 | 46 | 47 | // Public Properties 48 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 49 | private static extern RootSystem.IntPtr Windows_Kinect_DepthFrameArrivedEventArgs_get_FrameReference(RootSystem.IntPtr pNative); 50 | public Windows.Kinect.DepthFrameReference FrameReference 51 | { 52 | get 53 | { 54 | if (_pNative == RootSystem.IntPtr.Zero) 55 | { 56 | throw new RootSystem.ObjectDisposedException("DepthFrameArrivedEventArgs"); 57 | } 58 | 59 | RootSystem.IntPtr objectPointer = Windows_Kinect_DepthFrameArrivedEventArgs_get_FrameReference(_pNative); 60 | Helper.ExceptionHelper.CheckLastError(); 61 | if (objectPointer == RootSystem.IntPtr.Zero) 62 | { 63 | return null; 64 | } 65 | 66 | return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.DepthFrameReference(n)); 67 | } 68 | } 69 | 70 | private void __EventCleanup() 71 | { 72 | } 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/DepthFrameArrivedEventArgs.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c09496fb04e3d9c43b5fbf4ac998ff6e 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/DepthFrameReader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 19e437f0dfc211640b0b56e1e0221a8f 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/DepthFrameReference.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.DepthFrameReference 8 | // 9 | public sealed partial class DepthFrameReference : Helper.INativeWrapper 10 | 11 | { 12 | internal RootSystem.IntPtr _pNative; 13 | RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } 14 | 15 | // Constructors and Finalizers 16 | internal DepthFrameReference(RootSystem.IntPtr pNative) 17 | { 18 | _pNative = pNative; 19 | Windows_Kinect_DepthFrameReference_AddRefObject(ref _pNative); 20 | } 21 | 22 | ~DepthFrameReference() 23 | { 24 | Dispose(false); 25 | } 26 | 27 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 28 | private static extern void Windows_Kinect_DepthFrameReference_ReleaseObject(ref RootSystem.IntPtr pNative); 29 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 30 | private static extern void Windows_Kinect_DepthFrameReference_AddRefObject(ref RootSystem.IntPtr pNative); 31 | private void Dispose(bool disposing) 32 | { 33 | if (_pNative == RootSystem.IntPtr.Zero) 34 | { 35 | return; 36 | } 37 | 38 | __EventCleanup(); 39 | 40 | Helper.NativeObjectCache.RemoveObject(_pNative); 41 | Windows_Kinect_DepthFrameReference_ReleaseObject(ref _pNative); 42 | 43 | _pNative = RootSystem.IntPtr.Zero; 44 | } 45 | 46 | 47 | // Public Properties 48 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 49 | private static extern long Windows_Kinect_DepthFrameReference_get_RelativeTime(RootSystem.IntPtr pNative); 50 | public RootSystem.TimeSpan RelativeTime 51 | { 52 | get 53 | { 54 | if (_pNative == RootSystem.IntPtr.Zero) 55 | { 56 | throw new RootSystem.ObjectDisposedException("DepthFrameReference"); 57 | } 58 | 59 | return RootSystem.TimeSpan.FromMilliseconds(Windows_Kinect_DepthFrameReference_get_RelativeTime(_pNative)); 60 | } 61 | } 62 | 63 | 64 | // Public Methods 65 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 66 | private static extern RootSystem.IntPtr Windows_Kinect_DepthFrameReference_AcquireFrame(RootSystem.IntPtr pNative); 67 | public Windows.Kinect.DepthFrame AcquireFrame() 68 | { 69 | if (_pNative == RootSystem.IntPtr.Zero) 70 | { 71 | throw new RootSystem.ObjectDisposedException("DepthFrameReference"); 72 | } 73 | 74 | RootSystem.IntPtr objectPointer = Windows_Kinect_DepthFrameReference_AcquireFrame(_pNative); 75 | Helper.ExceptionHelper.CheckLastError(); 76 | if (objectPointer == RootSystem.IntPtr.Zero) 77 | { 78 | return null; 79 | } 80 | 81 | return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.DepthFrame(n)); 82 | } 83 | 84 | private void __EventCleanup() 85 | { 86 | } 87 | } 88 | 89 | } 90 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/DepthFrameReference.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f53daf0889b08bf4494ecbd1914a99d6 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/DepthFrameSource.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ec16a6a3c150d4c479a008f45c1851ec 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/DepthSpacePoint.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.DepthSpacePoint 8 | // 9 | [RootSystem.Runtime.InteropServices.StructLayout(RootSystem.Runtime.InteropServices.LayoutKind.Sequential)] 10 | public struct DepthSpacePoint 11 | { 12 | public float X { get; set; } 13 | public float Y { get; set; } 14 | 15 | public override int GetHashCode() 16 | { 17 | return X.GetHashCode() ^ Y.GetHashCode(); 18 | } 19 | 20 | public override bool Equals(object obj) 21 | { 22 | if (!(obj is DepthSpacePoint)) 23 | { 24 | return false; 25 | } 26 | 27 | return this.Equals((DepthSpacePoint)obj); 28 | } 29 | 30 | public bool Equals(DepthSpacePoint obj) 31 | { 32 | return X.Equals(obj.X) && Y.Equals(obj.Y); 33 | } 34 | 35 | public static bool operator ==(DepthSpacePoint a, DepthSpacePoint b) 36 | { 37 | return a.Equals(b); 38 | } 39 | 40 | public static bool operator !=(DepthSpacePoint a, DepthSpacePoint b) 41 | { 42 | return !(a.Equals(b)); 43 | } 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/DepthSpacePoint.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 87a047e9c131269479b899f8dd9cac89 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/DetectionResult.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.DetectionResult 8 | // 9 | public enum DetectionResult : int 10 | { 11 | Unknown =0, 12 | No =1, 13 | Maybe =2, 14 | Yes =3, 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/DetectionResult.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6f242e10b172a6340a49529ef0ad2d90 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/Expression.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.Expression 8 | // 9 | public enum Expression : int 10 | { 11 | Neutral =0, 12 | Happy =1, 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/Expression.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 13c84518ab4fa60499742f896207e91e 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/FrameCapturedEventArgs.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 085ec75a343f958408701e00ba2168ce 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/FrameCapturedStatus.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.FrameCapturedStatus 8 | // 9 | public enum FrameCapturedStatus : int 10 | { 11 | Unknown =0, 12 | Queued =1, 13 | Dropped =2, 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/FrameCapturedStatus.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ccf1cabe437c4764d9818a2fd30827f0 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/FrameDescription.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 855fcb405500ab14b8902d15d27ed0ab 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/FrameEdges.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.FrameEdges 8 | // 9 | [RootSystem.Flags] 10 | public enum FrameEdges : uint 11 | { 12 | None =0, 13 | Right =1, 14 | Left =2, 15 | Top =4, 16 | Bottom =8, 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/FrameEdges.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 34cd6f0c5382cd9458b3b1ef06e001ba 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/FrameSourceTypes.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.FrameSourceTypes 8 | // 9 | [RootSystem.Flags] 10 | public enum FrameSourceTypes : uint 11 | { 12 | None =0, 13 | Color =1, 14 | Infrared =2, 15 | LongExposureInfrared =4, 16 | Depth =8, 17 | BodyIndex =16, 18 | Body =32, 19 | Audio =64, 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/FrameSourceTypes.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bbb237f869b7c684aa4bff904d74ceed 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/HandState.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.HandState 8 | // 9 | public enum HandState : int 10 | { 11 | Unknown =0, 12 | NotTracked =1, 13 | Open =2, 14 | Closed =3, 15 | Lasso =4, 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/HandState.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 61c6c0071af9a08459843e571124cbef 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/InfraredFrame.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 716d52dd0cd344f439914ed99e62b0e5 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/InfraredFrameArrivedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.InfraredFrameArrivedEventArgs 8 | // 9 | public sealed partial class InfraredFrameArrivedEventArgs : RootSystem.EventArgs, Helper.INativeWrapper 10 | 11 | { 12 | internal RootSystem.IntPtr _pNative; 13 | RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } 14 | 15 | // Constructors and Finalizers 16 | internal InfraredFrameArrivedEventArgs(RootSystem.IntPtr pNative) 17 | { 18 | _pNative = pNative; 19 | Windows_Kinect_InfraredFrameArrivedEventArgs_AddRefObject(ref _pNative); 20 | } 21 | 22 | ~InfraredFrameArrivedEventArgs() 23 | { 24 | Dispose(false); 25 | } 26 | 27 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 28 | private static extern void Windows_Kinect_InfraredFrameArrivedEventArgs_ReleaseObject(ref RootSystem.IntPtr pNative); 29 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 30 | private static extern void Windows_Kinect_InfraredFrameArrivedEventArgs_AddRefObject(ref RootSystem.IntPtr pNative); 31 | private void Dispose(bool disposing) 32 | { 33 | if (_pNative == RootSystem.IntPtr.Zero) 34 | { 35 | return; 36 | } 37 | 38 | __EventCleanup(); 39 | 40 | Helper.NativeObjectCache.RemoveObject(_pNative); 41 | Windows_Kinect_InfraredFrameArrivedEventArgs_ReleaseObject(ref _pNative); 42 | 43 | _pNative = RootSystem.IntPtr.Zero; 44 | } 45 | 46 | 47 | // Public Properties 48 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 49 | private static extern RootSystem.IntPtr Windows_Kinect_InfraredFrameArrivedEventArgs_get_FrameReference(RootSystem.IntPtr pNative); 50 | public Windows.Kinect.InfraredFrameReference FrameReference 51 | { 52 | get 53 | { 54 | if (_pNative == RootSystem.IntPtr.Zero) 55 | { 56 | throw new RootSystem.ObjectDisposedException("InfraredFrameArrivedEventArgs"); 57 | } 58 | 59 | RootSystem.IntPtr objectPointer = Windows_Kinect_InfraredFrameArrivedEventArgs_get_FrameReference(_pNative); 60 | Helper.ExceptionHelper.CheckLastError(); 61 | if (objectPointer == RootSystem.IntPtr.Zero) 62 | { 63 | return null; 64 | } 65 | 66 | return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.InfraredFrameReference(n)); 67 | } 68 | } 69 | 70 | private void __EventCleanup() 71 | { 72 | } 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/InfraredFrameArrivedEventArgs.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 47e956b7b74fcd447a28c068f2fcaf56 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/InfraredFrameReader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0937005bb1a679a40a0bffab4f8fa84b 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/InfraredFrameReference.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.InfraredFrameReference 8 | // 9 | public sealed partial class InfraredFrameReference : Helper.INativeWrapper 10 | 11 | { 12 | internal RootSystem.IntPtr _pNative; 13 | RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } 14 | 15 | // Constructors and Finalizers 16 | internal InfraredFrameReference(RootSystem.IntPtr pNative) 17 | { 18 | _pNative = pNative; 19 | Windows_Kinect_InfraredFrameReference_AddRefObject(ref _pNative); 20 | } 21 | 22 | ~InfraredFrameReference() 23 | { 24 | Dispose(false); 25 | } 26 | 27 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 28 | private static extern void Windows_Kinect_InfraredFrameReference_ReleaseObject(ref RootSystem.IntPtr pNative); 29 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 30 | private static extern void Windows_Kinect_InfraredFrameReference_AddRefObject(ref RootSystem.IntPtr pNative); 31 | private void Dispose(bool disposing) 32 | { 33 | if (_pNative == RootSystem.IntPtr.Zero) 34 | { 35 | return; 36 | } 37 | 38 | __EventCleanup(); 39 | 40 | Helper.NativeObjectCache.RemoveObject(_pNative); 41 | Windows_Kinect_InfraredFrameReference_ReleaseObject(ref _pNative); 42 | 43 | _pNative = RootSystem.IntPtr.Zero; 44 | } 45 | 46 | 47 | // Public Properties 48 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 49 | private static extern long Windows_Kinect_InfraredFrameReference_get_RelativeTime(RootSystem.IntPtr pNative); 50 | public RootSystem.TimeSpan RelativeTime 51 | { 52 | get 53 | { 54 | if (_pNative == RootSystem.IntPtr.Zero) 55 | { 56 | throw new RootSystem.ObjectDisposedException("InfraredFrameReference"); 57 | } 58 | 59 | return RootSystem.TimeSpan.FromMilliseconds(Windows_Kinect_InfraredFrameReference_get_RelativeTime(_pNative)); 60 | } 61 | } 62 | 63 | 64 | // Public Methods 65 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 66 | private static extern RootSystem.IntPtr Windows_Kinect_InfraredFrameReference_AcquireFrame(RootSystem.IntPtr pNative); 67 | public Windows.Kinect.InfraredFrame AcquireFrame() 68 | { 69 | if (_pNative == RootSystem.IntPtr.Zero) 70 | { 71 | throw new RootSystem.ObjectDisposedException("InfraredFrameReference"); 72 | } 73 | 74 | RootSystem.IntPtr objectPointer = Windows_Kinect_InfraredFrameReference_AcquireFrame(_pNative); 75 | Helper.ExceptionHelper.CheckLastError(); 76 | if (objectPointer == RootSystem.IntPtr.Zero) 77 | { 78 | return null; 79 | } 80 | 81 | return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.InfraredFrame(n)); 82 | } 83 | 84 | private void __EventCleanup() 85 | { 86 | } 87 | } 88 | 89 | } 90 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/InfraredFrameReference.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 89acda427f65cc64dbe156710db8760f 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/InfraredFrameSource.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8b41da8047304434eb12d404c2f99979 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/IsAvailableChangedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.IsAvailableChangedEventArgs 8 | // 9 | public sealed partial class IsAvailableChangedEventArgs : RootSystem.EventArgs, Helper.INativeWrapper 10 | 11 | { 12 | internal RootSystem.IntPtr _pNative; 13 | RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } 14 | 15 | // Constructors and Finalizers 16 | internal IsAvailableChangedEventArgs(RootSystem.IntPtr pNative) 17 | { 18 | _pNative = pNative; 19 | Windows_Kinect_IsAvailableChangedEventArgs_AddRefObject(ref _pNative); 20 | } 21 | 22 | ~IsAvailableChangedEventArgs() 23 | { 24 | Dispose(false); 25 | } 26 | 27 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 28 | private static extern void Windows_Kinect_IsAvailableChangedEventArgs_ReleaseObject(ref RootSystem.IntPtr pNative); 29 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 30 | private static extern void Windows_Kinect_IsAvailableChangedEventArgs_AddRefObject(ref RootSystem.IntPtr pNative); 31 | private void Dispose(bool disposing) 32 | { 33 | if (_pNative == RootSystem.IntPtr.Zero) 34 | { 35 | return; 36 | } 37 | 38 | __EventCleanup(); 39 | 40 | Helper.NativeObjectCache.RemoveObject(_pNative); 41 | Windows_Kinect_IsAvailableChangedEventArgs_ReleaseObject(ref _pNative); 42 | 43 | _pNative = RootSystem.IntPtr.Zero; 44 | } 45 | 46 | 47 | // Public Properties 48 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 49 | private static extern bool Windows_Kinect_IsAvailableChangedEventArgs_get_IsAvailable(RootSystem.IntPtr pNative); 50 | public bool IsAvailable 51 | { 52 | get 53 | { 54 | if (_pNative == RootSystem.IntPtr.Zero) 55 | { 56 | throw new RootSystem.ObjectDisposedException("IsAvailableChangedEventArgs"); 57 | } 58 | 59 | return Windows_Kinect_IsAvailableChangedEventArgs_get_IsAvailable(_pNative); 60 | } 61 | } 62 | 63 | private void __EventCleanup() 64 | { 65 | } 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/IsAvailableChangedEventArgs.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 65a7600b04976b84db9c9ec171a5d71f 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/Joint.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.Joint 8 | // 9 | [RootSystem.Runtime.InteropServices.StructLayout(RootSystem.Runtime.InteropServices.LayoutKind.Sequential)] 10 | public struct Joint 11 | { 12 | public Windows.Kinect.JointType JointType { get; set; } 13 | public Windows.Kinect.CameraSpacePoint Position { get; set; } 14 | public Windows.Kinect.TrackingState TrackingState { get; set; } 15 | 16 | public override int GetHashCode() 17 | { 18 | return JointType.GetHashCode() ^ Position.GetHashCode() ^ TrackingState.GetHashCode(); 19 | } 20 | 21 | public override bool Equals(object obj) 22 | { 23 | if (!(obj is Joint)) 24 | { 25 | return false; 26 | } 27 | 28 | return this.Equals((Joint)obj); 29 | } 30 | 31 | public bool Equals(Joint obj) 32 | { 33 | return JointType.Equals(obj.JointType) && Position.Equals(obj.Position) && TrackingState.Equals(obj.TrackingState); 34 | } 35 | 36 | public static bool operator ==(Joint a, Joint b) 37 | { 38 | return a.Equals(b); 39 | } 40 | 41 | public static bool operator !=(Joint a, Joint b) 42 | { 43 | return !(a.Equals(b)); 44 | } 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/Joint.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c6ab2966f653a9b439da02f3ae85c867 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/JointOrientation.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.JointOrientation 8 | // 9 | [RootSystem.Runtime.InteropServices.StructLayout(RootSystem.Runtime.InteropServices.LayoutKind.Sequential)] 10 | public struct JointOrientation 11 | { 12 | public Windows.Kinect.JointType JointType { get; set; } 13 | public Windows.Kinect.Vector4 Orientation { get; set; } 14 | 15 | public override int GetHashCode() 16 | { 17 | return JointType.GetHashCode() ^ Orientation.GetHashCode(); 18 | } 19 | 20 | public override bool Equals(object obj) 21 | { 22 | if (!(obj is JointOrientation)) 23 | { 24 | return false; 25 | } 26 | 27 | return this.Equals((JointOrientation)obj); 28 | } 29 | 30 | public bool Equals(JointOrientation obj) 31 | { 32 | return JointType.Equals(obj.JointType) && Orientation.Equals(obj.Orientation); 33 | } 34 | 35 | public static bool operator ==(JointOrientation a, JointOrientation b) 36 | { 37 | return a.Equals(b); 38 | } 39 | 40 | public static bool operator !=(JointOrientation a, JointOrientation b) 41 | { 42 | return !(a.Equals(b)); 43 | } 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/JointOrientation.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d616618770c2c84469f5aaa5f72ca2ca 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/JointType.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.JointType 8 | // 9 | public enum JointType : int 10 | { 11 | SpineBase =0, 12 | SpineMid =1, 13 | Neck =2, 14 | Head =3, 15 | ShoulderLeft =4, 16 | ElbowLeft =5, 17 | WristLeft =6, 18 | HandLeft =7, 19 | ShoulderRight =8, 20 | ElbowRight =9, 21 | WristRight =10, 22 | HandRight =11, 23 | HipLeft =12, 24 | KneeLeft =13, 25 | AnkleLeft =14, 26 | FootLeft =15, 27 | HipRight =16, 28 | KneeRight =17, 29 | AnkleRight =18, 30 | FootRight =19, 31 | SpineShoulder =20, 32 | HandTipLeft =21, 33 | ThumbLeft =22, 34 | HandTipRight =23, 35 | ThumbRight =24, 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/JointType.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1791e2ee3f5ea1343a2694b4e1b3f00f 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/KinectAudioCalibrationState.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.KinectAudioCalibrationState 8 | // 9 | public enum KinectAudioCalibrationState : int 10 | { 11 | Unknown =0, 12 | CalibrationRequired =1, 13 | Calibrated =2, 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/KinectAudioCalibrationState.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 87d856dfd833c524381664b12e58813a 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/KinectCapabilities.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.KinectCapabilities 8 | // 9 | [RootSystem.Flags] 10 | public enum KinectCapabilities : uint 11 | { 12 | None =0, 13 | Vision =1, 14 | Audio =2, 15 | Face =4, 16 | Expressions =8, 17 | Gamechat =16, 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/KinectCapabilities.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6dcba0f7ec870d94c849f4d8ed860377 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/KinectSensor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a5a5ec3f3f1b0064fae54e1512e12887 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/KinectUnityAddinUtils.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.KinectUnityAddinUtils 8 | // 9 | public sealed partial class KinectUnityAddinUtils 10 | { 11 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 12 | private static extern void KinectUnityAddin_FreeMemory(RootSystem.IntPtr pToDealloc); 13 | public static void FreeMemory(RootSystem.IntPtr pToDealloc) 14 | { 15 | KinectUnityAddin_FreeMemory(pToDealloc); 16 | } 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/KinectUnityAddinUtils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 985cae59f29daa947acc082d310c3492 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/LongExposureInfraredFrame.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 62e292d05e1f99d4695e2306db22e75f 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/LongExposureInfraredFrameArrivedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.LongExposureInfraredFrameArrivedEventArgs 8 | // 9 | public sealed partial class LongExposureInfraredFrameArrivedEventArgs : RootSystem.EventArgs, Helper.INativeWrapper 10 | 11 | { 12 | internal RootSystem.IntPtr _pNative; 13 | RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } 14 | 15 | // Constructors and Finalizers 16 | internal LongExposureInfraredFrameArrivedEventArgs(RootSystem.IntPtr pNative) 17 | { 18 | _pNative = pNative; 19 | Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_AddRefObject(ref _pNative); 20 | } 21 | 22 | ~LongExposureInfraredFrameArrivedEventArgs() 23 | { 24 | Dispose(false); 25 | } 26 | 27 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 28 | private static extern void Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_ReleaseObject(ref RootSystem.IntPtr pNative); 29 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 30 | private static extern void Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_AddRefObject(ref RootSystem.IntPtr pNative); 31 | private void Dispose(bool disposing) 32 | { 33 | if (_pNative == RootSystem.IntPtr.Zero) 34 | { 35 | return; 36 | } 37 | 38 | __EventCleanup(); 39 | 40 | Helper.NativeObjectCache.RemoveObject(_pNative); 41 | Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_ReleaseObject(ref _pNative); 42 | 43 | _pNative = RootSystem.IntPtr.Zero; 44 | } 45 | 46 | 47 | // Public Properties 48 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 49 | private static extern RootSystem.IntPtr Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_get_FrameReference(RootSystem.IntPtr pNative); 50 | public Windows.Kinect.LongExposureInfraredFrameReference FrameReference 51 | { 52 | get 53 | { 54 | if (_pNative == RootSystem.IntPtr.Zero) 55 | { 56 | throw new RootSystem.ObjectDisposedException("LongExposureInfraredFrameArrivedEventArgs"); 57 | } 58 | 59 | RootSystem.IntPtr objectPointer = Windows_Kinect_LongExposureInfraredFrameArrivedEventArgs_get_FrameReference(_pNative); 60 | Helper.ExceptionHelper.CheckLastError(); 61 | if (objectPointer == RootSystem.IntPtr.Zero) 62 | { 63 | return null; 64 | } 65 | 66 | return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.LongExposureInfraredFrameReference(n)); 67 | } 68 | } 69 | 70 | private void __EventCleanup() 71 | { 72 | } 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/LongExposureInfraredFrameArrivedEventArgs.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dbaaf8e0d23f24848ab81331f4379722 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/LongExposureInfraredFrameReader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 78a6e9053bd545d4f948fa1d8ced5879 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/LongExposureInfraredFrameReference.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.LongExposureInfraredFrameReference 8 | // 9 | public sealed partial class LongExposureInfraredFrameReference : Helper.INativeWrapper 10 | 11 | { 12 | internal RootSystem.IntPtr _pNative; 13 | RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } 14 | 15 | // Constructors and Finalizers 16 | internal LongExposureInfraredFrameReference(RootSystem.IntPtr pNative) 17 | { 18 | _pNative = pNative; 19 | Windows_Kinect_LongExposureInfraredFrameReference_AddRefObject(ref _pNative); 20 | } 21 | 22 | ~LongExposureInfraredFrameReference() 23 | { 24 | Dispose(false); 25 | } 26 | 27 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 28 | private static extern void Windows_Kinect_LongExposureInfraredFrameReference_ReleaseObject(ref RootSystem.IntPtr pNative); 29 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 30 | private static extern void Windows_Kinect_LongExposureInfraredFrameReference_AddRefObject(ref RootSystem.IntPtr pNative); 31 | private void Dispose(bool disposing) 32 | { 33 | if (_pNative == RootSystem.IntPtr.Zero) 34 | { 35 | return; 36 | } 37 | 38 | __EventCleanup(); 39 | 40 | Helper.NativeObjectCache.RemoveObject(_pNative); 41 | Windows_Kinect_LongExposureInfraredFrameReference_ReleaseObject(ref _pNative); 42 | 43 | _pNative = RootSystem.IntPtr.Zero; 44 | } 45 | 46 | 47 | // Public Properties 48 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 49 | private static extern long Windows_Kinect_LongExposureInfraredFrameReference_get_RelativeTime(RootSystem.IntPtr pNative); 50 | public RootSystem.TimeSpan RelativeTime 51 | { 52 | get 53 | { 54 | if (_pNative == RootSystem.IntPtr.Zero) 55 | { 56 | throw new RootSystem.ObjectDisposedException("LongExposureInfraredFrameReference"); 57 | } 58 | 59 | return RootSystem.TimeSpan.FromMilliseconds(Windows_Kinect_LongExposureInfraredFrameReference_get_RelativeTime(_pNative)); 60 | } 61 | } 62 | 63 | 64 | // Public Methods 65 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 66 | private static extern RootSystem.IntPtr Windows_Kinect_LongExposureInfraredFrameReference_AcquireFrame(RootSystem.IntPtr pNative); 67 | public Windows.Kinect.LongExposureInfraredFrame AcquireFrame() 68 | { 69 | if (_pNative == RootSystem.IntPtr.Zero) 70 | { 71 | throw new RootSystem.ObjectDisposedException("LongExposureInfraredFrameReference"); 72 | } 73 | 74 | RootSystem.IntPtr objectPointer = Windows_Kinect_LongExposureInfraredFrameReference_AcquireFrame(_pNative); 75 | Helper.ExceptionHelper.CheckLastError(); 76 | if (objectPointer == RootSystem.IntPtr.Zero) 77 | { 78 | return null; 79 | } 80 | 81 | return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.LongExposureInfraredFrame(n)); 82 | } 83 | 84 | private void __EventCleanup() 85 | { 86 | } 87 | } 88 | 89 | } 90 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/LongExposureInfraredFrameReference.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 91cd9161c056061438655504e2f2f7f4 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/LongExposureInfraredFrameSource.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cdcf249c89943864ca06ab517b1d74f5 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/MultiSourceFrame.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb5e1a9a4aa7a3f4b8190ab4fab84118 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/MultiSourceFrameArrivedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.MultiSourceFrameArrivedEventArgs 8 | // 9 | public sealed partial class MultiSourceFrameArrivedEventArgs : RootSystem.EventArgs, Helper.INativeWrapper 10 | 11 | { 12 | internal RootSystem.IntPtr _pNative; 13 | RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } 14 | 15 | // Constructors and Finalizers 16 | internal MultiSourceFrameArrivedEventArgs(RootSystem.IntPtr pNative) 17 | { 18 | _pNative = pNative; 19 | Windows_Kinect_MultiSourceFrameArrivedEventArgs_AddRefObject(ref _pNative); 20 | } 21 | 22 | ~MultiSourceFrameArrivedEventArgs() 23 | { 24 | Dispose(false); 25 | } 26 | 27 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 28 | private static extern void Windows_Kinect_MultiSourceFrameArrivedEventArgs_ReleaseObject(ref RootSystem.IntPtr pNative); 29 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 30 | private static extern void Windows_Kinect_MultiSourceFrameArrivedEventArgs_AddRefObject(ref RootSystem.IntPtr pNative); 31 | private void Dispose(bool disposing) 32 | { 33 | if (_pNative == RootSystem.IntPtr.Zero) 34 | { 35 | return; 36 | } 37 | 38 | __EventCleanup(); 39 | 40 | Helper.NativeObjectCache.RemoveObject(_pNative); 41 | Windows_Kinect_MultiSourceFrameArrivedEventArgs_ReleaseObject(ref _pNative); 42 | 43 | _pNative = RootSystem.IntPtr.Zero; 44 | } 45 | 46 | 47 | // Public Properties 48 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 49 | private static extern RootSystem.IntPtr Windows_Kinect_MultiSourceFrameArrivedEventArgs_get_FrameReference(RootSystem.IntPtr pNative); 50 | public Windows.Kinect.MultiSourceFrameReference FrameReference 51 | { 52 | get 53 | { 54 | if (_pNative == RootSystem.IntPtr.Zero) 55 | { 56 | throw new RootSystem.ObjectDisposedException("MultiSourceFrameArrivedEventArgs"); 57 | } 58 | 59 | RootSystem.IntPtr objectPointer = Windows_Kinect_MultiSourceFrameArrivedEventArgs_get_FrameReference(_pNative); 60 | Helper.ExceptionHelper.CheckLastError(); 61 | if (objectPointer == RootSystem.IntPtr.Zero) 62 | { 63 | return null; 64 | } 65 | 66 | return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.MultiSourceFrameReference(n)); 67 | } 68 | } 69 | 70 | private void __EventCleanup() 71 | { 72 | } 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/MultiSourceFrameArrivedEventArgs.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1188dd030cd382340966a429c46ed4fe 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/MultiSourceFrameReader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a52acb4cdb90b3a4fa3937ab27ced4ff 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/MultiSourceFrameReference.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.MultiSourceFrameReference 8 | // 9 | public sealed partial class MultiSourceFrameReference : Helper.INativeWrapper 10 | 11 | { 12 | internal RootSystem.IntPtr _pNative; 13 | RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } } 14 | 15 | // Constructors and Finalizers 16 | internal MultiSourceFrameReference(RootSystem.IntPtr pNative) 17 | { 18 | _pNative = pNative; 19 | Windows_Kinect_MultiSourceFrameReference_AddRefObject(ref _pNative); 20 | } 21 | 22 | ~MultiSourceFrameReference() 23 | { 24 | Dispose(false); 25 | } 26 | 27 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 28 | private static extern void Windows_Kinect_MultiSourceFrameReference_ReleaseObject(ref RootSystem.IntPtr pNative); 29 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 30 | private static extern void Windows_Kinect_MultiSourceFrameReference_AddRefObject(ref RootSystem.IntPtr pNative); 31 | private void Dispose(bool disposing) 32 | { 33 | if (_pNative == RootSystem.IntPtr.Zero) 34 | { 35 | return; 36 | } 37 | 38 | __EventCleanup(); 39 | 40 | Helper.NativeObjectCache.RemoveObject(_pNative); 41 | Windows_Kinect_MultiSourceFrameReference_ReleaseObject(ref _pNative); 42 | 43 | _pNative = RootSystem.IntPtr.Zero; 44 | } 45 | 46 | 47 | // Public Methods 48 | [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)] 49 | private static extern RootSystem.IntPtr Windows_Kinect_MultiSourceFrameReference_AcquireFrame(RootSystem.IntPtr pNative); 50 | public Windows.Kinect.MultiSourceFrame AcquireFrame() 51 | { 52 | if (_pNative == RootSystem.IntPtr.Zero) 53 | { 54 | throw new RootSystem.ObjectDisposedException("MultiSourceFrameReference"); 55 | } 56 | 57 | RootSystem.IntPtr objectPointer = Windows_Kinect_MultiSourceFrameReference_AcquireFrame(_pNative); 58 | Helper.ExceptionHelper.CheckLastError(); 59 | if (objectPointer == RootSystem.IntPtr.Zero) 60 | { 61 | return null; 62 | } 63 | 64 | return Helper.NativeObjectCache.CreateOrGetObject(objectPointer, n => new Windows.Kinect.MultiSourceFrame(n)); 65 | } 66 | 67 | private void __EventCleanup() 68 | { 69 | } 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/MultiSourceFrameReference.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8e2ed2961bcca974085bf9ddcaaac6a9 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/TrackingConfidence.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.TrackingConfidence 8 | // 9 | public enum TrackingConfidence : int 10 | { 11 | Low =0, 12 | High =1, 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/TrackingConfidence.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7fc638ac4166d2945b7efa3e6699e510 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/TrackingState.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.TrackingState 8 | // 9 | public enum TrackingState : int 10 | { 11 | NotTracked =0, 12 | Inferred =1, 13 | Tracked =2, 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/TrackingState.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7448c7529f8b6564bb3357abc07b1ccf 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/Vector4.cs: -------------------------------------------------------------------------------- 1 | using RootSystem = System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | namespace Windows.Kinect 5 | { 6 | // 7 | // Windows.Kinect.Vector4 8 | // 9 | [RootSystem.Runtime.InteropServices.StructLayout(RootSystem.Runtime.InteropServices.LayoutKind.Sequential)] 10 | public struct Vector4 11 | { 12 | public float X { get; set; } 13 | public float Y { get; set; } 14 | public float Z { get; set; } 15 | public float W { get; set; } 16 | 17 | public override int GetHashCode() 18 | { 19 | return X.GetHashCode() ^ Y.GetHashCode() ^ Z.GetHashCode() ^ W.GetHashCode(); 20 | } 21 | 22 | public override bool Equals(object obj) 23 | { 24 | if (!(obj is Vector4)) 25 | { 26 | return false; 27 | } 28 | 29 | return this.Equals((Vector4)obj); 30 | } 31 | 32 | public bool Equals(Vector4 obj) 33 | { 34 | return X.Equals(obj.X) && Y.Equals(obj.Y) && Z.Equals(obj.Z) && W.Equals(obj.W); 35 | } 36 | 37 | public static bool operator ==(Vector4 a, Vector4 b) 38 | { 39 | return a.Equals(b); 40 | } 41 | 42 | public static bool operator !=(Vector4 a, Vector4 b) 43 | { 44 | return !(a.Equals(b)); 45 | } 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /Assets/Standard Assets/Windows/Kinect/Vector4.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6722a9a2a7c5eaa4f98f57c7aca7cfab 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/UnityKinect.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5fb8756bc6805cc42ad3a9806d82aa36 3 | folderAsset: yes 4 | timeCreated: 1452436921 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/UnityKinect/BodySourceManager.cs: -------------------------------------------------------------------------------- 1 | using Windows.Kinect; 2 | using UnityEngine; 3 | 4 | namespace Assets.UnityKinect { 5 | 6 | public class BodySourceManager : MonoBehaviour { 7 | 8 | public static Body[] Bodies { get; private set; } 9 | private KinectSensor _Sensor; 10 | private BodyFrameReader _Reader; 11 | 12 | void Start() { 13 | _Sensor = KinectSensor.GetDefault(); 14 | 15 | if (_Sensor != null) { 16 | _Reader = _Sensor.BodyFrameSource.OpenReader(); 17 | 18 | if (!_Sensor.IsOpen) { 19 | _Sensor.Open(); 20 | } 21 | } 22 | } 23 | 24 | void Update() { 25 | if (_Reader != null) { 26 | var frame = _Reader.AcquireLatestFrame(); 27 | if (frame != null) { 28 | Bodies = new Body[_Sensor.BodyFrameSource.BodyCount]; 29 | frame.GetAndRefreshBodyData(Bodies); 30 | frame.Dispose(); 31 | } 32 | } 33 | } 34 | 35 | void OnApplicationQuit() { 36 | if (_Reader != null) { 37 | _Reader.Dispose(); 38 | _Reader = null; 39 | } 40 | 41 | if (_Sensor != null) { 42 | if (_Sensor.IsOpen) { 43 | _Sensor.Close(); 44 | } 45 | 46 | _Sensor = null; 47 | } 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Assets/UnityKinect/BodySourceManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8509b8d56b398e64293f0c7bf99a5c0e 3 | timeCreated: 1452436922 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/UnityKinect/BodySourceManager.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &184434 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 100100000} 8 | serializedVersion: 4 9 | m_Component: 10 | - 4: {fileID: 450554} 11 | - 114: {fileID: 11469414} 12 | m_Layer: 0 13 | m_Name: BodySourceManager 14 | m_TagString: Untagged 15 | m_Icon: {fileID: 0} 16 | m_NavMeshLayer: 0 17 | m_StaticEditorFlags: 0 18 | m_IsActive: 1 19 | --- !u!4 &450554 20 | Transform: 21 | m_ObjectHideFlags: 1 22 | m_PrefabParentObject: {fileID: 0} 23 | m_PrefabInternal: {fileID: 100100000} 24 | m_GameObject: {fileID: 184434} 25 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 26 | m_LocalPosition: {x: 0, y: 0, z: 0} 27 | m_LocalScale: {x: 1, y: 1, z: 1} 28 | m_Children: [] 29 | m_Father: {fileID: 0} 30 | m_RootOrder: 0 31 | --- !u!114 &11469414 32 | MonoBehaviour: 33 | m_ObjectHideFlags: 1 34 | m_PrefabParentObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | m_GameObject: {fileID: 184434} 37 | m_Enabled: 1 38 | m_EditorHideFlags: 0 39 | m_Script: {fileID: 11500000, guid: 8509b8d56b398e64293f0c7bf99a5c0e, type: 3} 40 | m_Name: 41 | m_EditorClassIdentifier: 42 | --- !u!1001 &100100000 43 | Prefab: 44 | m_ObjectHideFlags: 1 45 | serializedVersion: 2 46 | m_Modification: 47 | m_TransformParent: {fileID: 0} 48 | m_Modifications: [] 49 | m_RemovedComponents: [] 50 | m_ParentPrefab: {fileID: 0} 51 | m_RootGameObject: {fileID: 184434} 52 | m_IsPrefabParent: 1 53 | -------------------------------------------------------------------------------- /Assets/UnityKinect/BodySourceManager.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: accf09355369ace4c868487a1cad058d 3 | timeCreated: 1452467929 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 0 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_DisableAudio: 0 16 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Gravity: {x: 0, y: -9.81000042, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: .00499999989 11 | m_DefaultContactOffset: .00999999978 12 | m_SolverIterationCount: 6 13 | m_QueriesHitTriggers: 1 14 | m_EnableAdaptiveForce: 0 15 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 16 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/ProjectionMapping/Demo/RoomFeatureAlignment/RoomFeatureAlignment.unity 10 | - enabled: 1 11 | path: Assets/ProjectionMapping/Demo/DrawingWithKinect/DrawingWithKinect.unity 12 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_WebSecurityEmulationEnabled: 0 10 | m_WebSecurityEmulationHostUrl: http://www.mydomain.com/mygame.unity3d 11 | m_DefaultBehaviorMode: 0 12 | m_SpritePackerMode: 2 13 | m_SpritePackerPaddingPower: 1 14 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 15 | m_ProjectGenerationRootNamespace: 16 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_LegacyDeferred: 14 | m_Mode: 1 15 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 16 | m_AlwaysIncludedShaders: 17 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 18 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 19 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 20 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 21 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 22 | - {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0} 23 | m_PreloadedShaders: [] 24 | m_ShaderSettings: 25 | useScreenSpaceShadows: 1 26 | m_BuildTargetShaderSettings: [] 27 | m_LightmapStripping: 0 28 | m_FogStripping: 0 29 | m_LightmapKeepPlain: 1 30 | m_LightmapKeepDirCombined: 1 31 | m_LightmapKeepDirSeparate: 1 32 | m_LightmapKeepDynamicPlain: 1 33 | m_LightmapKeepDynamicDirCombined: 1 34 | m_LightmapKeepDynamicDirSeparate: 1 35 | m_FogKeepLinear: 1 36 | m_FogKeepExp: 1 37 | m_FogKeepExp2: 1 38 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshAreas: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Gravity: {x: 0, y: -9.81000042} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: .200000003 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_MinPenetrationForPenalty: .00999999978 17 | m_BaumgarteScale: .200000003 18 | m_BaumgarteTimeOfImpactScale: .75 19 | m_TimeToSleep: .5 20 | m_LinearSleepTolerance: .00999999978 21 | m_AngularSleepTolerance: 2 22 | m_QueriesHitTriggers: 1 23 | m_QueriesStartInColliders: 1 24 | m_ChangeStopsCallbacks: 0 25 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 26 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 5.3.1p1 2 | m_StandardAssetsVersion: 0 3 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - Room 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: .0199999996 7 | Maximum Allowed Timestep: .333333343 8 | m_TimeScale: 1 9 | -------------------------------------------------------------------------------- /ProjectSettings/UnityAdsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!292 &1 4 | UnityAdsSettings: 5 | m_ObjectHideFlags: 0 6 | m_Enabled: 0 7 | m_InitializeOnStartup: 1 8 | m_TestMode: 0 9 | m_EnabledPlatforms: 4294967295 10 | m_IosGameId: 11 | m_AndroidGameId: 12 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | UnityPurchasingSettings: 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | UnityAnalyticsSettings: 10 | m_Enabled: 0 11 | m_InitializeOnStartup: 1 12 | m_TestMode: 0 13 | m_TestEventUrl: 14 | m_TestConfigUrl: 15 | --------------------------------------------------------------------------------