Esempio n. 1
0
 /// <summary>
 /// コンストラクタ
 /// </summary>
 /// <param name="device">キネクトデバイスマネージャー</param>
 /// <param name="bones">ボーンの配列</param>
 public KinectFKUpdater(KinectDeviceManager device, PMXBone[] bones)
 {
     this.device    = device;
     this.bones     = bones;
     BindDictionary = new Dictionary <SkeletonJoint.JointType, string>();
     BindDictionary.Add(SkeletonJoint.JointType.RightShoulder, "右腕");
     BindDictionary.Add(SkeletonJoint.JointType.RightKnee, "右ひじ");
 }
Esempio n. 2
0
 /// <summary>
 /// コンストラクタ
 /// </summary>
 /// <param name="device">キネクトデバイスマネージャー</param>
 /// <param name="bones">ボーンの配列</param>
 public KinectFKUpdater(KinectDeviceManager device, PMXBone[] bones)
 {
     this.device    = device;
     this.bones     = bones;
     BindDictionary = new Dictionary <SkeletonJoint.JointType, string>();
     BindDictionary.Add(SkeletonJoint.JointType.RIGHT_SHOULDER, "右腕");
     BindDictionary.Add(SkeletonJoint.JointType.RIGHT_KNEE, "右ひじ");
 }
Esempio n. 3
0
        public IRTexture(RenderContext context, KinectDeviceManager device)
        {
            this.context = context;
            Texture2DDescription tex2DDesc = new Texture2DDescription()
            {
                ArraySize         = 1,
                BindFlags         = BindFlags.ShaderResource,
                CpuAccessFlags    = CpuAccessFlags.Write,
                Format            = Format.R8G8B8A8_UNorm,
                Height            = 480,
                Width             = 640,
                MipLevels         = 1,
                OptionFlags       = ResourceOptionFlags.None,
                SampleDescription = new SampleDescription(1, 0),
                Usage             = ResourceUsage.Dynamic
            };

            TextureResource = new Texture2D(context.DeviceManager.Device, tex2DDesc);
            videoStream     = device.KinnectDevice.CreateVideoStream(Device.SensorType.Ir);
            videoStream.Start();
            TextureResourceView = new ShaderResourceView(context.DeviceManager.Device, TextureResource);
            NeedUpdate          = true;
        }