fix error
This commit is contained in:
parent
15ed32aea0
commit
66907c8492
7 changed files with 83 additions and 11 deletions
|
@ -58,6 +58,7 @@
|
|||
<ItemGroup>
|
||||
<Compile Include="Assets\Scenes\Examples\Composition\script\BallMapping.cs" />
|
||||
<Compile Include="Assets\Scenes\Examples\Composition\script\RmsAnalyzer.cs" />
|
||||
<Compile Include="Assets\Scenes\Examples\KinectSkelton\script\Skelton.cs" />
|
||||
<Compile Include="Assets\Scenes\Examples\LevelThreshold\script\ConstructionColumnBehaviour.cs" />
|
||||
<Compile Include="Assets\Scenes\Examples\LevelThreshold\script\Spawner.cs" />
|
||||
<Compile Include="Assets\Scenes\Examples\MIDI\script\CubeSync.cs" />
|
||||
|
@ -101,8 +102,10 @@
|
|||
<Compile Include="Assets\Scripts\Versioning\VersionToggleBehaviour.cs" />
|
||||
<Compile Include="Assets\Scripts\VideoInput\ComponentFactory.cs" />
|
||||
<Compile Include="Assets\Scripts\VideoInput\InfraredCamera.cs" />
|
||||
<Compile Include="Assets\Scripts\VideoInput\KinectFacade.cs" />
|
||||
<Compile Include="Assets\Scripts\VideoInput\KinectManagerBehaviour.cs" />
|
||||
<Compile Include="Assets\Scripts\VideoInput\KinectSensor.cs" />
|
||||
<Compile Include="Assets\Scripts\VideoInput\SkeletonTracker.cs" />
|
||||
<Compile Include="Assets\Scripts\Visualizer\CombMesh.cs" />
|
||||
<Compile Include="Assets\Scripts\Visualizer\IRPanelBehaviour.cs" />
|
||||
<Compile Include="Assets\Scripts\Visualizer\PointCloudBehaviour.cs" />
|
||||
|
|
|
@ -4,7 +4,7 @@ using UnityEngine;
|
|||
namespace cylvester
|
||||
{
|
||||
[CustomEditor(typeof(PdBackend))]
|
||||
public class PdBackendEditor : Editor
|
||||
public class PdBackendEditor : UnityEditor.Editor
|
||||
{
|
||||
private PdBackend pdBackend_;
|
||||
private SerializedProperty midiMessageReceivedProperty_;
|
||||
|
|
|
@ -4,7 +4,7 @@ using UnityEditor;
|
|||
namespace cylvester
|
||||
{
|
||||
[CustomEditor(typeof(PdSpectrumBind))]
|
||||
class PdSpectrumBindEditor : Editor
|
||||
class PdSpectrumBindEditor : UnityEditor.Editor
|
||||
{
|
||||
private readonly string[] channels_ =
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@ using UnityEngine;
|
|||
namespace cylvester
|
||||
{
|
||||
[CustomEditor(typeof(MidiSequencer))]
|
||||
public class MidiSequencerEditor : Editor
|
||||
public class MidiSequencerEditor : UnityEditor.Editor
|
||||
{
|
||||
private SerializedProperty timeProperty_;
|
||||
private SerializedProperty sequenceProperty_;
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace cylvester
|
|||
{
|
||||
|
||||
[CustomEditor(typeof(StateManager))]
|
||||
public class StateManagerEditor : Editor
|
||||
public class StateManagerEditor : UnityEditor.Editor
|
||||
{
|
||||
public override void OnInspectorGUI ()
|
||||
{
|
||||
|
|
|
@ -26,7 +26,7 @@ RenderSettings:
|
|||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_SkyboxMaterial: {fileID: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
|
@ -120,6 +120,75 @@ NavMeshSettings:
|
|||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1001 &1384498139
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 4731626927875726491, guid: 2cf41770dc7914b46aa31a442508dd25,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: KinectVisualization
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4731626927875726468, guid: 2cf41770dc7914b46aa31a442508dd25,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4731626927875726468, guid: 2cf41770dc7914b46aa31a442508dd25,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4731626927875726468, guid: 2cf41770dc7914b46aa31a442508dd25,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4731626927875726468, guid: 2cf41770dc7914b46aa31a442508dd25,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4731626927875726468, guid: 2cf41770dc7914b46aa31a442508dd25,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4731626927875726468, guid: 2cf41770dc7914b46aa31a442508dd25,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4731626927875726468, guid: 2cf41770dc7914b46aa31a442508dd25,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4731626927875726468, guid: 2cf41770dc7914b46aa31a442508dd25,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4731626927875726468, guid: 2cf41770dc7914b46aa31a442508dd25,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4731626927875726468, guid: 2cf41770dc7914b46aa31a442508dd25,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4731626927875726468, guid: 2cf41770dc7914b46aa31a442508dd25,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 2cf41770dc7914b46aa31a442508dd25, type: 3}
|
||||
--- !u!1 &1931119204
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -3,18 +3,18 @@ using System.IO;
|
|||
using UnityEngine;
|
||||
using Windows.Kinect;
|
||||
|
||||
namespace VideoInput
|
||||
namespace cylvester
|
||||
{
|
||||
public interface IInfraredCamera
|
||||
{
|
||||
Texture2D Data { get; }
|
||||
Texture2D InfraredTexture { get; }
|
||||
|
||||
void Update();
|
||||
}
|
||||
|
||||
public class InfraredCamera : IInfraredCamera
|
||||
{
|
||||
public Texture2D Data { get; }
|
||||
public Texture2D InfraredTexture { get; }
|
||||
|
||||
private Windows.Kinect.KinectSensor sensor_;
|
||||
private readonly InfraredFrameReader reader_;
|
||||
|
@ -33,7 +33,7 @@ namespace VideoInput
|
|||
|
||||
var frameDesc = sensor_.InfraredFrameSource.FrameDescription;
|
||||
irData_ = new ushort[frameDesc.LengthInPixels];
|
||||
Data = new Texture2D(frameDesc.Width, frameDesc.Height, TextureFormat.R16, false);
|
||||
InfraredTexture = new Texture2D(frameDesc.Width, frameDesc.Height, TextureFormat.R16, false);
|
||||
|
||||
if (!sensor_.IsOpen)
|
||||
sensor_.Open();
|
||||
|
@ -53,10 +53,10 @@ namespace VideoInput
|
|||
{
|
||||
fixed(ushort* irDataPtr = irData_)
|
||||
{
|
||||
Data.LoadRawTextureData((IntPtr) irDataPtr, sizeof(ushort) * irData_.Length);
|
||||
InfraredTexture.LoadRawTextureData((IntPtr) irDataPtr, sizeof(ushort) * irData_.Length);
|
||||
}
|
||||
}
|
||||
Data.Apply();
|
||||
InfraredTexture.Apply();
|
||||
frame.Dispose();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue