UPDATE(KinectUtils): ADD several changed to make the gestureManager work but still some development to do to test

pull/19/head
Johan LACHENAL 1 year ago
parent f7821f3a49
commit 6a1611d511

@ -3,9 +3,9 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MyGesturesBank;
using KinectUtils;
namespace KinectUtils
namespace MyGesturesBank
{
public class AllGesturesFactory : IGestureFactory
{
@ -13,8 +13,8 @@ namespace KinectUtils
{
return new List<BaseGesture>
{
new SwipeRightHand(),
new ClapHands()
//new SwipeRightHand(),
//new ClapHands()
// Ajoutez d'autres gestes ici
};
}

@ -9,7 +9,7 @@ namespace KinectUtils
public event EventHandler GestureRecognized;
// Nom du geste - marqué comme virtual pour permettre la substitution
public string GestureName { get; protected set; }
public virtual string GestureName { get; protected set; }
// Méthode abstraite pour tester le geste
public abstract void TestGesture(Body body);

@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace KinectUtils
{
abstract class Gesture : BaseGesture
public abstract class Gesture : BaseGesture
{
public bool IsRecognitionRunning { get; set; }

@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace KinectUtils
{
interface IGestureFactory
public interface IGestureFactory
{
IEnumerable<BaseGesture> CreateGestures();
}

@ -52,10 +52,6 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LibMyGesturesBank\MyGesturesBank.csproj">
<Project>{2496dfb1-eb55-47a1-a780-211e079b289d}</Project>
<Name>MyGesturesBank</Name>
</ProjectReference>
<ProjectReference Include="..\Lib\Lib.csproj">
<Project>{0751c83e-7845-4e5f-a5d3-e11aba393aca}</Project>
<Name>Lib</Name>

@ -16,7 +16,7 @@ namespace KinectUtils
if (TestPosture(body))
{
// Posture is recognized
OnGestureRecognized();
OnGestureRecognized(body);
}
}

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using KinectUtils;
namespace MyGesturesBank
{
public class AllGesturesFactory : IGestureFactory
{
public IEnumerable<BaseGesture> CreateGestures()
{
return new List<BaseGesture>
{
new SwipeRightHand(),
//new ClapHands()
// Ajoutez d'autres gestes ici
};
}
}
}
Loading…
Cancel
Save