|
@@ -34,13 +34,19 @@ namespace FireDrill
|
|
// 用于显示 BodyIndexFrame 数据的颜色集合
|
|
// 用于显示 BodyIndexFrame 数据的颜色集合
|
|
private static readonly uint[] BodyColor =
|
|
private static readonly uint[] BodyColor =
|
|
{
|
|
{
|
|
- 0x0000FF00,
|
|
|
|
- 0x00FF0000,
|
|
|
|
- 0xFFFF4000,
|
|
|
|
- 0x40FFFF00,
|
|
|
|
- 0xFF40FF00,
|
|
|
|
- 0xFF808000,
|
|
|
|
- };
|
|
|
|
|
|
+ //0x0000FF00,
|
|
|
|
+ //0x00FF0000,
|
|
|
|
+ //0xFFFF4000,
|
|
|
|
+ //0x40FFFF00,
|
|
|
|
+ //0xFF40FF00,
|
|
|
|
+ //0xFF808000,
|
|
|
|
+ (uint)System.Drawing.Color.White.ToArgb(),
|
|
|
|
+ (uint)System.Drawing.Color.White.ToArgb(),
|
|
|
|
+ (uint)System.Drawing.Color.White.ToArgb(),
|
|
|
|
+ (uint)System.Drawing.Color.White.ToArgb(),
|
|
|
|
+ (uint)System.Drawing.Color.White.ToArgb(),
|
|
|
|
+ (uint)System.Drawing.Color.White.ToArgb(),
|
|
|
|
+ };
|
|
|
|
|
|
// 坐标映射器将一种类型的点映射到另一种
|
|
// 坐标映射器将一种类型的点映射到另一种
|
|
private CoordinateMapper _coordinateMapper = null;
|
|
private CoordinateMapper _coordinateMapper = null;
|
|
@@ -133,7 +139,7 @@ namespace FireDrill
|
|
// allocate space to put the pixels being converted
|
|
// allocate space to put the pixels being converted
|
|
bodyIndexPixels = new uint[bodyIndexFrameDescription.Width * bodyIndexFrameDescription.Height];
|
|
bodyIndexPixels = new uint[bodyIndexFrameDescription.Width * bodyIndexFrameDescription.Height];
|
|
// create the bitmap to display
|
|
// create the bitmap to display
|
|
- bodyIndexBitmap = new WriteableBitmap(bodyIndexFrameDescription.Width, bodyIndexFrameDescription.Height, 96.0, 96.0, PixelFormats.Bgr32, null);
|
|
|
|
|
|
+ bodyIndexBitmap = new WriteableBitmap(bodyIndexFrameDescription.Width, bodyIndexFrameDescription.Height, 96.0, 96.0, PixelFormats.Bgra32, null);
|
|
// 设置 IsAvailableChanged 事件通知程序
|
|
// 设置 IsAvailableChanged 事件通知程序
|
|
_kinectSensor.IsAvailableChanged += this.Sensor_IsAvailableChanged;
|
|
_kinectSensor.IsAvailableChanged += this.Sensor_IsAvailableChanged;
|
|
// 打开传感器
|
|
// 打开传感器
|
|
@@ -283,7 +289,8 @@ namespace FireDrill
|
|
else
|
|
else
|
|
{
|
|
{
|
|
// 此像素不是播放器的一部分,显示黑色
|
|
// 此像素不是播放器的一部分,显示黑色
|
|
- bodyIndexPixels[i] = 0x00000000;
|
|
|
|
|
|
+ //bodyIndexPixels[i] = 0x0000000F;
|
|
|
|
+ bodyIndexPixels[i] = (uint)System.Drawing.Color.Transparent.ToArgb();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|