Merge branch 'dev' into CreateGestures

pull/20/head
Louis DUFOUR 1 year ago
commit 3a2a0feb10

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

@ -9,7 +9,7 @@ namespace KinectUtils
public event EventHandler GestureRecognized; public event EventHandler GestureRecognized;
// Nom du geste - marqué comme virtual pour permettre la substitution // 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 // Méthode abstraite pour tester le geste
public abstract void TestGesture(Body body); public abstract void TestGesture(Body body);

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

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

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

@ -16,7 +16,7 @@ namespace KinectUtils
if (TestPosture(body)) if (TestPosture(body))
{ {
// Posture is recognized // 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