diff --git a/UnityProject/.idea/.idea.UnityProject/.idea/contentModel.xml b/UnityProject/.idea/.idea.UnityProject/.idea/contentModel.xml
index 39d977f..5aca1ba 100644
--- a/UnityProject/.idea/.idea.UnityProject/.idea/contentModel.xml
+++ b/UnityProject/.idea/.idea.UnityProject/.idea/contentModel.xml
@@ -14,6 +14,7 @@
+
@@ -34,6 +35,11 @@
+
+
+
+
+
@@ -43,12 +49,16 @@
+
+
+
+
@@ -83,15 +93,18 @@
-
+
+
+
+
@@ -111,21 +124,11 @@
-
-
-
-
-
-
-
-
-
-
@@ -171,291 +174,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -541,10 +259,6 @@
-
-
-
-
diff --git a/UnityProject/.idea/.idea.UnityProject/.idea/workspace.xml b/UnityProject/.idea/.idea.UnityProject/.idea/workspace.xml
index 2dbf783..57bc556 100644
--- a/UnityProject/.idea/.idea.UnityProject/.idea/workspace.xml
+++ b/UnityProject/.idea/.idea.UnityProject/.idea/workspace.xml
@@ -2,101 +2,34 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -128,76 +61,89 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
@@ -314,6 +273,7 @@
+
1562485186899
@@ -453,8 +413,26 @@
+
+ file://$PROJECT_DIR$/Assets/Scenes/Examples/KinectSkelton/script/Skeleton.cs
+ 10
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/UnityProject/Assembly-CSharp.csproj b/UnityProject/Assembly-CSharp.csproj
index 9800a6d..168da28 100644
--- a/UnityProject/Assembly-CSharp.csproj
+++ b/UnityProject/Assembly-CSharp.csproj
@@ -58,7 +58,7 @@
-
+
@@ -100,10 +100,7 @@
-
-
-
diff --git a/UnityProject/Assets/Materials/IRPanel.mat b/UnityProject/Assets/Materials/IRPanel.mat
index 5c578cc..f8d3801 100644
--- a/UnityProject/Assets/Materials/IRPanel.mat
+++ b/UnityProject/Assets/Materials/IRPanel.mat
@@ -8,7 +8,7 @@ Material:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: IRPanel
- m_Shader: {fileID: -6465566751694194690, guid: 0710b26be2a23d24d8005549cc475ba2,
+ m_Shader: {fileID: -6465566751694194690, guid: ab1500b418a77404a9a159988c31409e,
type: 3}
m_ShaderKeywords: _NORMALMAP_TANGENT_SPACE
m_LightmapFlags: 4
diff --git a/UnityProject/Assets/Prefabs/KinectVisualization.prefab b/UnityProject/Assets/Prefabs/KinectVisualization.prefab
index 408fba5..6a1a3dd 100644
--- a/UnityProject/Assets/Prefabs/KinectVisualization.prefab
+++ b/UnityProject/Assets/Prefabs/KinectVisualization.prefab
@@ -1,5 +1,48 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
+--- !u!1 &826238032
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 826238033}
+ - component: {fileID: 826238034}
+ m_Layer: 0
+ m_Name: Skeleton
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!4 &826238033
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 826238032}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 4731626927875726468}
+ m_RootOrder: 1
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!114 &826238034
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 826238032}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: d2ea1c499e186a74e9ba944b44026403, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
--- !u!1 &4731626927875726491
GameObject:
m_ObjectHideFlags: 0
@@ -29,7 +72,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 4731626929094548426}
- - {fileID: 4731626929341064471}
+ - {fileID: 826238033}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -45,6 +88,36 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 5b54a31bc1a14c1abb51fe86c56c6227, type: 3}
m_Name:
m_EditorClassIdentifier:
+ infrared: 1
+ infraredFrameReceived:
+ m_PersistentCalls:
+ m_Calls:
+ - m_Target: {fileID: 4731626929094548427}
+ m_MethodName: OnInfraredFrameReceived
+ m_Mode: 0
+ m_Arguments:
+ m_ObjectArgument: {fileID: 0}
+ m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
+ m_IntArgument: 0
+ m_FloatArgument: 0
+ m_StringArgument:
+ m_BoolArgument: 0
+ m_CallState: 2
+ skeleton: 1
+ skeletonDataReceived:
+ m_PersistentCalls:
+ m_Calls:
+ - m_Target: {fileID: 826238034}
+ m_MethodName: OnSkeletonFrameReceived
+ m_Mode: 0
+ m_Arguments:
+ m_ObjectArgument: {fileID: 0}
+ m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
+ m_IntArgument: 0
+ m_FloatArgument: 0
+ m_StringArgument:
+ m_BoolArgument: 0
+ m_CallState: 2
--- !u!1 &4731626929094548425
GameObject:
m_ObjectHideFlags: 0
@@ -136,99 +209,4 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c0603bf64edb4c8885cefbc40ee206fe, type: 3}
m_Name:
m_EditorClassIdentifier:
- kinectManagerBehaviour: {fileID: 5059429581819481323}
panel: {fileID: 4731626929094548425}
---- !u!1 &4731626929341064470
-GameObject:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- serializedVersion: 6
- m_Component:
- - component: {fileID: 4731626929341064471}
- - component: {fileID: 4731626929341064466}
- - component: {fileID: 4731626929341064465}
- - component: {fileID: 4731626929341064464}
- m_Layer: 0
- m_Name: PointCloud
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 0
---- !u!4 &4731626929341064471
-Transform:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 4731626929341064470}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 4731626927875726468}
- m_RootOrder: 1
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
---- !u!23 &4731626929341064466
-MeshRenderer:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 4731626929341064470}
- m_Enabled: 1
- m_CastShadows: 0
- m_ReceiveShadows: 0
- m_DynamicOccludee: 0
- m_MotionVectors: 1
- m_LightProbeUsage: 1
- m_ReflectionProbeUsage: 1
- m_RenderingLayerMask: 1
- m_RendererPriority: 0
- m_Materials:
- - {fileID: 2100000, guid: 3f6444796bbb89e45a6a51b5bb0037f6, type: 2}
- m_StaticBatchInfo:
- firstSubMesh: 0
- subMeshCount: 0
- m_StaticBatchRoot: {fileID: 0}
- m_ProbeAnchor: {fileID: 0}
- m_LightProbeVolumeOverride: {fileID: 0}
- m_ScaleInLightmap: 1
- m_ReceiveGI: 1
- m_PreserveUVs: 0
- m_IgnoreNormalsForChartDetection: 0
- m_ImportantGI: 0
- m_StitchLightmapSeams: 0
- m_SelectedEditorRenderState: 3
- m_MinimumChartSize: 4
- m_AutoUVMaxDistance: 0.5
- m_AutoUVMaxAngle: 89
- m_LightmapParameters: {fileID: 0}
- m_SortingLayerID: 0
- m_SortingLayer: 0
- m_SortingOrder: 0
---- !u!33 &4731626929341064465
-MeshFilter:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 4731626929341064470}
- m_Mesh: {fileID: 0}
---- !u!114 &4731626929341064464
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 4731626929341064470}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: ffecec984845420991cec1a5fcf11959, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- zScale: 1
- kinectManagerBehaviour: {fileID: 5059429581819481323}
- meshFilter: {fileID: 4731626929341064465}
diff --git a/UnityProject/Assets/Scenes/Examples/KinectSceneGraph/Shader Graphs_Max Kinect Effect.mat b/UnityProject/Assets/Scenes/Examples/KinectSceneGraph/Shader Graphs_Max Kinect Effect.mat
index 9a3e24c..f4cacdc 100644
--- a/UnityProject/Assets/Scenes/Examples/KinectSceneGraph/Shader Graphs_Max Kinect Effect.mat
+++ b/UnityProject/Assets/Scenes/Examples/KinectSceneGraph/Shader Graphs_Max Kinect Effect.mat
@@ -8,7 +8,7 @@ Material:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Shader Graphs_Max Kinect Effect
- m_Shader: {fileID: -6465566751694194690, guid: 0710b26be2a23d24d8005549cc475ba2,
+ m_Shader: {fileID: -6465566751694194690, guid: ab1500b418a77404a9a159988c31409e,
type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
diff --git a/UnityProject/Assets/Scenes/Examples/KinectSkelton.meta b/UnityProject/Assets/Scenes/Examples/KinectSkeleton.meta
similarity index 100%
rename from UnityProject/Assets/Scenes/Examples/KinectSkelton.meta
rename to UnityProject/Assets/Scenes/Examples/KinectSkeleton.meta
diff --git a/UnityProject/Assets/Scenes/Examples/KinectSkelton/Skeleton.unity b/UnityProject/Assets/Scenes/Examples/KinectSkeleton/Skeleton.unity
similarity index 80%
rename from UnityProject/Assets/Scenes/Examples/KinectSkelton/Skeleton.unity
rename to UnityProject/Assets/Scenes/Examples/KinectSkeleton/Skeleton.unity
index 56a74b0..b473b04 100644
--- a/UnityProject/Assets/Scenes/Examples/KinectSkelton/Skeleton.unity
+++ b/UnityProject/Assets/Scenes/Examples/KinectSkeleton/Skeleton.unity
@@ -120,6 +120,115 @@ NavMeshSettings:
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
+--- !u!1 &863219604
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 863219609}
+ - component: {fileID: 863219608}
+ - component: {fileID: 863219607}
+ - component: {fileID: 863219606}
+ - component: {fileID: 863219605}
+ m_Layer: 0
+ m_Name: Cube
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!111 &863219605
+Animation:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 863219604}
+ m_Enabled: 1
+ serializedVersion: 3
+ m_Animation: {fileID: 7400000, guid: 5adbcf2e6f7f1d24e91fb33e84d0df0e, type: 2}
+ m_Animations:
+ - {fileID: 0}
+ m_WrapMode: 0
+ m_PlayAutomatically: 1
+ m_AnimatePhysics: 1
+ m_CullingType: 0
+--- !u!65 &863219606
+BoxCollider:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 863219604}
+ m_Material: {fileID: 0}
+ m_IsTrigger: 0
+ m_Enabled: 1
+ serializedVersion: 2
+ m_Size: {x: 1, y: 1, z: 1}
+ m_Center: {x: 0, y: 0, z: 0}
+--- !u!23 &863219607
+MeshRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 863219604}
+ m_Enabled: 1
+ m_CastShadows: 1
+ m_ReceiveShadows: 1
+ m_DynamicOccludee: 1
+ m_MotionVectors: 1
+ m_LightProbeUsage: 1
+ m_ReflectionProbeUsage: 1
+ m_RenderingLayerMask: 1
+ m_RendererPriority: 0
+ m_Materials:
+ - {fileID: 2100000, guid: 73c176f402d2c2f4d929aa5da7585d17, type: 2}
+ m_StaticBatchInfo:
+ firstSubMesh: 0
+ subMeshCount: 0
+ m_StaticBatchRoot: {fileID: 0}
+ m_ProbeAnchor: {fileID: 0}
+ m_LightProbeVolumeOverride: {fileID: 0}
+ m_ScaleInLightmap: 1
+ m_ReceiveGI: 1
+ m_PreserveUVs: 0
+ m_IgnoreNormalsForChartDetection: 0
+ m_ImportantGI: 0
+ m_StitchLightmapSeams: 1
+ m_SelectedEditorRenderState: 3
+ m_MinimumChartSize: 4
+ m_AutoUVMaxDistance: 0.5
+ m_AutoUVMaxAngle: 89
+ m_LightmapParameters: {fileID: 0}
+ m_SortingLayerID: 0
+ m_SortingLayer: 0
+ m_SortingOrder: 0
+--- !u!33 &863219608
+MeshFilter:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 863219604}
+ m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
+--- !u!4 &863219609
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 863219604}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: -1.2028971, y: -0.6283364, z: 0.5670376}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 0}
+ m_RootOrder: 3
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1384498139
PrefabInstance:
m_ObjectHideFlags: 0
@@ -187,46 +296,11 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- - target: {fileID: 5059429581819481323, guid: 2cf41770dc7914b46aa31a442508dd25,
- type: 3}
- propertyPath: infraredFrameReceived.m_PersistentCalls.m_Calls.Array.size
- value: 1
- objectReference: {fileID: 0}
- - target: {fileID: 5059429581819481323, guid: 2cf41770dc7914b46aa31a442508dd25,
- type: 3}
- propertyPath: infrared
- value: 1
- objectReference: {fileID: 0}
- - target: {fileID: 5059429581819481323, guid: 2cf41770dc7914b46aa31a442508dd25,
- type: 3}
- propertyPath: skeleton
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5059429581819481323, guid: 2cf41770dc7914b46aa31a442508dd25,
- type: 3}
- propertyPath: infraredFrameReceived.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5059429581819481323, guid: 2cf41770dc7914b46aa31a442508dd25,
- type: 3}
- propertyPath: infraredFrameReceived.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
- value: 2
- objectReference: {fileID: 0}
- - target: {fileID: 5059429581819481323, guid: 2cf41770dc7914b46aa31a442508dd25,
- type: 3}
- propertyPath: infraredFrameReceived.m_PersistentCalls.m_Calls.Array.data[0].m_Target
+ - target: {fileID: 826238034, guid: 2cf41770dc7914b46aa31a442508dd25, type: 3}
+ propertyPath: spherePrefab
value:
- objectReference: {fileID: 2080636163}
- - target: {fileID: 5059429581819481323, guid: 2cf41770dc7914b46aa31a442508dd25,
+ objectReference: {fileID: 7867200591126897977, guid: aa3a931c281348c4a91db2ad6fd4c7d6,
type: 3}
- propertyPath: infraredFrameReceived.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
- value: OnInfraredFrameReceived
- objectReference: {fileID: 0}
- - target: {fileID: 5059429581819481323, guid: 2cf41770dc7914b46aa31a442508dd25,
- type: 3}
- propertyPath: infraredFrameReceived.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
- value: UnityEngine.Object, UnityEngine
- objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2cf41770dc7914b46aa31a442508dd25, type: 3}
--- !u!1 &1931119204
@@ -506,15 +580,3 @@ MonoBehaviour:
kernelSize: 5
lightAngle: 1
maxDepthBias: 0.001
---- !u!114 &2080636163 stripped
-MonoBehaviour:
- m_CorrespondingSourceObject: {fileID: 4731626929094548427, guid: 2cf41770dc7914b46aa31a442508dd25,
- type: 3}
- m_PrefabInstance: {fileID: 1384498139}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 0}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: c0603bf64edb4c8885cefbc40ee206fe, type: 3}
- m_Name:
- m_EditorClassIdentifier:
diff --git a/UnityProject/Assets/Scenes/Examples/KinectSkelton/Skeleton.unity.meta b/UnityProject/Assets/Scenes/Examples/KinectSkeleton/Skeleton.unity.meta
similarity index 100%
rename from UnityProject/Assets/Scenes/Examples/KinectSkelton/Skeleton.unity.meta
rename to UnityProject/Assets/Scenes/Examples/KinectSkeleton/Skeleton.unity.meta
diff --git a/UnityProject/Assets/Scenes/Examples/KinectSkeleton/joint.prefab b/UnityProject/Assets/Scenes/Examples/KinectSkeleton/joint.prefab
new file mode 100644
index 0000000..11126cf
--- /dev/null
+++ b/UnityProject/Assets/Scenes/Examples/KinectSkeleton/joint.prefab
@@ -0,0 +1,80 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!1 &7867200591126897977
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1366288549331334081}
+ - component: {fileID: 6482507337449139577}
+ - component: {fileID: 8976194142327021739}
+ m_Layer: 0
+ m_Name: joint
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!4 &1366288549331334081
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 7867200591126897977}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: -1.2028971, y: -0.6283364, z: 0.5670376}
+ m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
+ m_Children: []
+ m_Father: {fileID: 0}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!33 &6482507337449139577
+MeshFilter:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 7867200591126897977}
+ m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
+--- !u!23 &8976194142327021739
+MeshRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 7867200591126897977}
+ m_Enabled: 1
+ m_CastShadows: 1
+ m_ReceiveShadows: 1
+ m_DynamicOccludee: 1
+ m_MotionVectors: 1
+ m_LightProbeUsage: 1
+ m_ReflectionProbeUsage: 1
+ m_RenderingLayerMask: 1
+ m_RendererPriority: 0
+ m_Materials:
+ - {fileID: 10301, guid: 0000000000000000f000000000000000, type: 0}
+ m_StaticBatchInfo:
+ firstSubMesh: 0
+ subMeshCount: 0
+ m_StaticBatchRoot: {fileID: 0}
+ m_ProbeAnchor: {fileID: 0}
+ m_LightProbeVolumeOverride: {fileID: 0}
+ m_ScaleInLightmap: 1
+ m_ReceiveGI: 1
+ m_PreserveUVs: 0
+ m_IgnoreNormalsForChartDetection: 0
+ m_ImportantGI: 0
+ m_StitchLightmapSeams: 1
+ m_SelectedEditorRenderState: 3
+ m_MinimumChartSize: 4
+ m_AutoUVMaxDistance: 0.5
+ m_AutoUVMaxAngle: 89
+ m_LightmapParameters: {fileID: 0}
+ m_SortingLayerID: 0
+ m_SortingLayer: 0
+ m_SortingOrder: 0
diff --git a/UnityProject/Assets/Scripts/VideoInput/Editor.meta b/UnityProject/Assets/Scenes/Examples/KinectSkeleton/joint.prefab.meta
similarity index 57%
rename from UnityProject/Assets/Scripts/VideoInput/Editor.meta
rename to UnityProject/Assets/Scenes/Examples/KinectSkeleton/joint.prefab.meta
index d977d6a..e69f6f2 100644
--- a/UnityProject/Assets/Scripts/VideoInput/Editor.meta
+++ b/UnityProject/Assets/Scenes/Examples/KinectSkeleton/joint.prefab.meta
@@ -1,7 +1,6 @@
fileFormatVersion: 2
-guid: 58dd24ba5af4c404589f501152a5f774
-folderAsset: yes
-DefaultImporter:
+guid: aa3a931c281348c4a91db2ad6fd4c7d6
+PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
diff --git a/UnityProject/Assets/Scenes/Examples/KinectSkelton/script.meta b/UnityProject/Assets/Scenes/Examples/KinectSkeleton/script.meta
similarity index 100%
rename from UnityProject/Assets/Scenes/Examples/KinectSkelton/script.meta
rename to UnityProject/Assets/Scenes/Examples/KinectSkeleton/script.meta
diff --git a/UnityProject/Assets/Scenes/Examples/KinectSkeleton/script/Skeleton.cs b/UnityProject/Assets/Scenes/Examples/KinectSkeleton/script/Skeleton.cs
new file mode 100644
index 0000000..7c634c6
--- /dev/null
+++ b/UnityProject/Assets/Scenes/Examples/KinectSkeleton/script/Skeleton.cs
@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Windows.Kinect;
+using UnityEngine;
+
+namespace cylvester
+{
+ public class Skeleton : MonoBehaviour
+ {
+ [SerializeField] private GameObject spherePrefab;
+
+ private GameObject[] balls_;
+ private void Start()
+ {
+ balls_ = new GameObject[25];
+ for (var i = 0; i < 25; ++i)
+ {
+ balls_[i] = Instantiate(spherePrefab, gameObject.transform, true);
+ }
+ }
+
+
+ public void OnSkeletonFrameReceived(Body[] bodies)
+ {
+ if (bodies.Length == 0)
+ return;
+
+ var body = bodies[0];
+
+ var i = 0;
+ foreach(var pair in body.Joints)
+ {
+ var joint = pair.Value;
+ if(joint.TrackingState == TrackingState.NotTracked)
+ balls_[i].SetActive(false);
+ else
+ {
+ balls_[i].SetActive(true);
+ balls_[i].transform.position = new Vector3(joint.Position.X, joint.Position.Y, 0f);
+ }
+ i++;
+ }
+ }
+ }
+}
diff --git a/UnityProject/Assets/Scripts/VideoInput/InfraredCamera.cs.meta b/UnityProject/Assets/Scenes/Examples/KinectSkeleton/script/Skeleton.cs.meta
similarity index 83%
rename from UnityProject/Assets/Scripts/VideoInput/InfraredCamera.cs.meta
rename to UnityProject/Assets/Scenes/Examples/KinectSkeleton/script/Skeleton.cs.meta
index a928313..d8ee7ed 100644
--- a/UnityProject/Assets/Scripts/VideoInput/InfraredCamera.cs.meta
+++ b/UnityProject/Assets/Scenes/Examples/KinectSkeleton/script/Skeleton.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 9189f3eb01f76664d9f7c970bbd36e02
+guid: d2ea1c499e186a74e9ba944b44026403
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/UnityProject/Assets/Scenes/Examples/KinectSkelton/script/Skelton.cs b/UnityProject/Assets/Scenes/Examples/KinectSkelton/script/Skelton.cs
deleted file mode 100644
index 4fcdf1d..0000000
--- a/UnityProject/Assets/Scenes/Examples/KinectSkelton/script/Skelton.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public class Skelton : MonoBehaviour
-{
- // Start is called before the first frame update
- void Start()
- {
-
- }
-
- // Update is called once per frame
- void Update()
- {
-
- }
-}
diff --git a/UnityProject/Assets/Scenes/Examples/KinectSkelton/script/Skelton.cs.meta b/UnityProject/Assets/Scenes/Examples/KinectSkelton/script/Skelton.cs.meta
deleted file mode 100644
index 477082a..0000000
--- a/UnityProject/Assets/Scenes/Examples/KinectSkelton/script/Skelton.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: e5a7463b4de2d0e4caecea5317286d07
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/UnityProject/Assets/Scripts/VideoInput/InfraredCamera.cs b/UnityProject/Assets/Scripts/VideoInput/InfraredCamera.cs
deleted file mode 100644
index f755af1..0000000
--- a/UnityProject/Assets/Scripts/VideoInput/InfraredCamera.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-using System;
-using System.IO;
-using UnityEngine;
-using Windows.Kinect;
-
-namespace cylvester
-{
-
-}
-
diff --git a/UnityProject/Assets/Scripts/VideoInput/KinectFacade.cs b/UnityProject/Assets/Scripts/VideoInput/KinectFacade.cs
deleted file mode 100644
index 3173283..0000000
--- a/UnityProject/Assets/Scripts/VideoInput/KinectFacade.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace UnityEditor
-{
- public class KinectFacade
- {
-
- }
-}
\ No newline at end of file
diff --git a/UnityProject/Assets/Scripts/VideoInput/KinectFacade.cs.meta b/UnityProject/Assets/Scripts/VideoInput/KinectFacade.cs.meta
deleted file mode 100644
index 30dab51..0000000
--- a/UnityProject/Assets/Scripts/VideoInput/KinectFacade.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 65a1be18ffcd5b44ea6787f744154d3b
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/UnityProject/Assets/Scripts/VideoInput/KinectManagerBehaviour.cs b/UnityProject/Assets/Scripts/VideoInput/KinectManagerBehaviour.cs
index 64e126d..4bc9fc9 100644
--- a/UnityProject/Assets/Scripts/VideoInput/KinectManagerBehaviour.cs
+++ b/UnityProject/Assets/Scripts/VideoInput/KinectManagerBehaviour.cs
@@ -1,5 +1,4 @@
using System;
-using System.Collections.Generic;
using System.IO;
using Windows.Kinect;
using UnityEngine;
@@ -8,7 +7,7 @@ using UnityEngine.Events;
namespace cylvester
{
[Serializable] public class UnityInfraredCameraEvent : UnityEvent{ }
- [Serializable] public class UnitySkeletonEvent : UnityEvent>{ }
+ [Serializable] public class UnitySkeletonEvent : UnityEvent{ }
public class KinectManagerBehaviour : MonoBehaviour
{
@@ -16,15 +15,16 @@ namespace cylvester
[SerializeField] public UnityInfraredCameraEvent infraredFrameReceived;
[SerializeField] private bool skeleton;
- [SerializeField] public UnitySkeletonEvent skeletonDataReveived;
-
- private Texture2D InfraredTexture { get; set;}
+ [SerializeField] public UnitySkeletonEvent skeletonDataReceived;
private KinectSensor sensor_;
private InfraredFrameReader infraredFrameReader_;
private BodyFrameReader bodyFrameReader_;
- private ushort [] irData_;
+ private ushort [] irData_;
+ private Texture2D infraredTexture_;
+ private Body[] bodies_;
+
private EventHandler onInfraredFrameArrived_;
private EventHandler onSkeletonFrameArrived_;
@@ -46,14 +46,14 @@ namespace cylvester
infraredFrameReader_ = sensor_.InfraredFrameSource.OpenReader();
var frameDesc = sensor_.InfraredFrameSource.FrameDescription;
irData_ = new ushort[frameDesc.LengthInPixels];
- InfraredTexture = new Texture2D(frameDesc.Width, frameDesc.Height, TextureFormat.R16, false);
+ infraredTexture_ = new Texture2D(frameDesc.Width, frameDesc.Height, TextureFormat.R16, false);
onInfraredFrameArrived_ = (frameReader, eventArgs) =>
{
if(!infrared)
return;
- using (var infraredFrame = infraredFrameReader_.AcquireLatestFrame())
+ using (var infraredFrame = eventArgs.FrameReference.AcquireFrame())
{
if (infraredFrame == null) return;
infraredFrame.CopyFrameDataToArray(irData_);
@@ -62,30 +62,33 @@ namespace cylvester
{
fixed (ushort* irDataPtr = irData_)
{
- InfraredTexture.LoadRawTextureData((IntPtr) irDataPtr, sizeof(ushort) * irData_.Length);
+ infraredTexture_.LoadRawTextureData((IntPtr) irDataPtr, sizeof(ushort) * irData_.Length);
}
}
- InfraredTexture.Apply();
+ infraredTexture_.Apply();
}
- infraredFrameReceived.Invoke(InfraredTexture);
+ infraredFrameReceived.Invoke(infraredTexture_);
+
};
infraredFrameReader_.FrameArrived += onInfraredFrameArrived_;
}
private void InitSkeletonTracking()
{
+ bodies_ = new Body[1];
-
bodyFrameReader_ = sensor_.BodyFrameSource.OpenReader();
onSkeletonFrameArrived_ = (frameReader, eventArgs) =>
{
if(!skeleton)
return;
-
+
using (var bodyFrame = eventArgs.FrameReference.AcquireFrame())
{
-
+ Array.Resize(ref bodies_, bodyFrame.BodyCount);
+ bodyFrame.GetAndRefreshBodyData(bodies_);
+ skeletonDataReceived.Invoke(bodies_);
}
};
bodyFrameReader_.FrameArrived += onSkeletonFrameArrived_;
diff --git a/UnityProject/Assets/Scripts/VideoInput/SkeletonTracker.cs b/UnityProject/Assets/Scripts/VideoInput/SkeletonTracker.cs
deleted file mode 100644
index 6b09cc6..0000000
--- a/UnityProject/Assets/Scripts/VideoInput/SkeletonTracker.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace cylvester
-{
- public class SkeltonTracker
- {
-
- }
-}
\ No newline at end of file
diff --git a/UnityProject/Assets/Scripts/VideoInput/SkeletonTracker.cs.meta b/UnityProject/Assets/Scripts/VideoInput/SkeletonTracker.cs.meta
deleted file mode 100644
index b386247..0000000
--- a/UnityProject/Assets/Scripts/VideoInput/SkeletonTracker.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 42ff44fc2f2fc574c804d56e68af9bc3
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/UnityProject/Assets/Scripts/Visualizer/CombMesh.cs b/UnityProject/Assets/Scripts/Visualizer/CombMesh.cs
index c24462d..80ed1cc 100644
--- a/UnityProject/Assets/Scripts/Visualizer/CombMesh.cs
+++ b/UnityProject/Assets/Scripts/Visualizer/CombMesh.cs
@@ -76,10 +76,7 @@ namespace cylvester
indices[index++] = offset + 1 + onset;
indices[index++] = 1 + onset;
}
-
return indices;
}
-
-
}
}
\ No newline at end of file