|
@@ -9,6 +9,7 @@ using OpenTK;
|
|
using OpenTK.Graphics.OpenGL;
|
|
using OpenTK.Graphics.OpenGL;
|
|
using MathNet.Numerics.LinearAlgebra.Single;
|
|
using MathNet.Numerics.LinearAlgebra.Single;
|
|
using bbiwarg.DataSource;
|
|
using bbiwarg.DataSource;
|
|
|
|
+using bbiwarg.Graphics.GraphicElements3D;
|
|
|
|
|
|
|
|
|
|
namespace bbiwarg.Graphics
|
|
namespace bbiwarg.Graphics
|
|
@@ -61,24 +62,24 @@ namespace bbiwarg.Graphics
|
|
|
|
|
|
// palm (iisu)
|
|
// palm (iisu)
|
|
Vector palmPosition = videoHandle.getPalmPosition3D(1);
|
|
Vector palmPosition = videoHandle.getPalmPosition3D(1);
|
|
- Point palmPoint = new Point(palmPosition, Color.Yellow, 0.005f);
|
|
|
|
|
|
+ Point3D palmPoint = new Point3D(palmPosition, Color.Yellow, 0.005f);
|
|
palmPoint.draw();
|
|
palmPoint.draw();
|
|
|
|
|
|
// foreFinger
|
|
// foreFinger
|
|
Vector foreFingerPosition = videoHandle.getForeFingerPosition3D(1);
|
|
Vector foreFingerPosition = videoHandle.getForeFingerPosition3D(1);
|
|
- Point foreFingerPoint = new Point(foreFingerPosition, Color.Red, 0.05f);
|
|
|
|
|
|
+ Point3D foreFingerPoint = new Point3D(foreFingerPosition, Color.Red, 0.05f);
|
|
foreFingerPoint.draw();
|
|
foreFingerPoint.draw();
|
|
|
|
|
|
//handPoints
|
|
//handPoints
|
|
List<Vector> handPoints = videoHandle.getHandPoints();
|
|
List<Vector> handPoints = videoHandle.getHandPoints();
|
|
for (int i = 0; i < handPoints.Count(); i++)
|
|
for (int i = 0; i < handPoints.Count(); i++)
|
|
{
|
|
{
|
|
- new Point(videoHandle.pixel2VertexPosition(handPoints[i]), Color.Yellow, 0.001f).draw();
|
|
|
|
|
|
+ new Point3D(videoHandle.pixel2VertexPosition(handPoints[i]), Color.Yellow, 0.001f).draw();
|
|
}
|
|
}
|
|
|
|
|
|
// foreArm (iisu)
|
|
// foreArm (iisu)
|
|
Vector foreArmPosition = videoHandle.getForearmPosition3D(1);
|
|
Vector foreArmPosition = videoHandle.getForearmPosition3D(1);
|
|
- Point foreArmPoint = new Point(foreArmPosition, Color.Yellow, 0.005f);
|
|
|
|
|
|
+ Point3D foreArmPoint = new Point3D(foreArmPosition, Color.Yellow, 0.005f);
|
|
foreArmPoint.draw();
|
|
foreArmPoint.draw();
|
|
|
|
|
|
// finger (iisu)
|
|
// finger (iisu)
|
|
@@ -88,14 +89,14 @@ namespace bbiwarg.Graphics
|
|
{
|
|
{
|
|
if (fingerStatus[i] == DetectionStatus.Detected || fingerStatus[i] == DetectionStatus.Tracked)
|
|
if (fingerStatus[i] == DetectionStatus.Detected || fingerStatus[i] == DetectionStatus.Tracked)
|
|
{
|
|
{
|
|
- Point fingerPoint = new Point(fingerPositions[i], Color.Yellow, 0.005f);
|
|
|
|
|
|
+ Point3D fingerPoint = new Point3D(fingerPositions[i], Color.Yellow, 0.005f);
|
|
fingerPoint.draw();
|
|
fingerPoint.draw();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
// palm
|
|
// palm
|
|
Palm palm = videoHandle.getPalm(1);
|
|
Palm palm = videoHandle.getPalm(1);
|
|
- Rectangle palmRect = new Rectangle(palm.getCorners(), Color.FromArgb(128, Color.Blue));
|
|
|
|
|
|
+ Rectangle3D palmRect = new Rectangle3D(palm.getCorners(), Color.FromArgb(128, Color.Blue));
|
|
palmRect.draw();
|
|
palmRect.draw();
|
|
|
|
|
|
sw.Stop();
|
|
sw.Stop();
|