UPDATE(AllStreamsWork): Add all classes, methods and variable with not implemented exceptions so the architecture's already done

pull/17/head
Johan LACHENAL 1 year ago
parent e5f56ee92c
commit 5326981d8f

@ -54,10 +54,6 @@
<None Include="packages.config" />
</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>

@ -1,5 +1,4 @@
using Lib;
using LibMyGesturesBank;
using Microsoft.Kinect;
using System;
using System.Collections.Generic;

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace KinectUtils
{
public class AllGesturesFactory : IGestureFactory
{
public IEnumerable<BaseGesture> CreateGestures()
{
throw new NotImplementedException();
}
}
}

@ -1,7 +1,7 @@
using System;
using Microsoft.Kinect;
namespace LibMyGesturesBank
namespace KinectUtils
{
public abstract class BaseGesture
{

@ -0,0 +1,33 @@
using Microsoft.Kinect;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace KinectUtils
{
class BaseMapping<T>
{
public void SubscribeToStartGesture(BaseGesture gesture)
{
throw new NotImplementedException();
}
public void SubscribeToEndGesture(BaseGesture gesture)
{
throw new NotImplementedException();
}
public void SubscribeToToggleGesture(BaseGesture gesture)
{
throw new NotImplementedException();
}
protected T Mapping(Body body)
{
throw new NotImplementedException();
}
public bool TestMapping(Body body, out T output)
{
throw new NotImplementedException();
}
}
}

@ -0,0 +1,34 @@
using Microsoft.Kinect;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace KinectUtils
{
abstract class Gesture : BaseGesture
{
protected int _maxNbOfFrames;
protected int _minNbOfFrames;
private int currentFrameCount;
public bool isRecognitionRunning { get; set; }
public int MinNbOfFrames {
get { return _minNbOfFrames; }
private set { _minNbOfFrames = value; }
}
public int MaxNbOfFrames
{
get { return _maxNbOfFrames; }
private set { _maxNbOfFrames = value; }
}
public override void TestGesture(Body body)
{
}
abstract protected bool TestInitialConditions(Body body);
abstract protected bool TestPosture(Body body);
abstract protected bool TestRunningGesture(Body body);
abstract protected bool TestEndConditions(Body body);
}
}

@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Lib;
namespace KinectUtils
{
static class GestureManager
{
static event EventHandler GestureRecognized;
static KinectManager KinectManager { get; set; }
static List<BaseGesture> KnownGestures { get; set; }
static public void AddGestures(IGestureFactory factory)
{
KnownGestures = (List<BaseGesture>)factory.CreateGestures();
}
static public void AddGestures(params BaseGesture[] gestures)
{
foreach (var gesture in gestures)
{
KnownGestures.Add(gesture);
}
}
static public void RemoveGesture(BaseGesture gesture)
{
KnownGestures.Remove(gesture);
}
static public void StartAcquiringFrames(KinectManager kinectManager)
{
throw new NotImplementedException();
}
}
}

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace KinectUtils
{
interface IGestureFactory
{
IEnumerable<BaseGesture> CreateGestures();
}
}

@ -42,8 +42,20 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AllGesturesFactory.cs" />
<Compile Include="BaseGesture.cs" />
<Compile Include="BaseMapping.cs" />
<Compile Include="Gesture.cs" />
<Compile Include="GestureManager.cs" />
<Compile Include="IGestureFactory.cs" />
<Compile Include="Posture.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Lib\Lib.csproj">
<Project>{0751c83e-7845-4e5f-a5d3-e11aba393aca}</Project>
<Name>Lib</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

@ -1,13 +1,12 @@
using System;
using Microsoft.Kinect;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Kinect;
using System.Threading.Tasks;
namespace MyGesturesBank
namespace KinectUtils
{
public abstract class Posture : BaseGesture
{
protected abstract bool TestPosture(Body body);
@ -21,7 +20,5 @@ namespace MyGesturesBank
}
}
// Ajoutez ici d'autres méthodes ou propriétés nécessaires
}
}

@ -1,29 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Kinect;
namespace MyGesturesBank
{
public abstract class BaseGesture
{
// Événement déclenché lorsque le geste est reconnu
public event EventHandler GestureRecognized;
// Nom du geste - marqué comme virtual pour permettre la substitution
public virtual string GestureName { get; protected set; }
// Méthode abstraite pour tester le geste
public abstract void TestGesture(Body body);
// Méthode protégée pour déclencher l'événement GestureRecognized
protected virtual void OnGestureRecognized()
{
GestureRecognized?.Invoke(this, EventArgs.Empty);
}
}
}

@ -44,13 +44,17 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="BaseGesture.cs" />
<Compile Include="Posture.cs" />
<Compile Include="PostureHandsOnHead .cs" />
<Compile Include="PostureHandUp.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RightHandUp.cs" />
<Compile Include="TwoHandsDragon.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\KinectUtils\KinectUtils.csproj">
<Project>{2d44487e-f514-4063-9494-2af1e8c9e9c8}</Project>
<Name>KinectUtils</Name>
</ProjectReference>
<ProjectReference Include="..\Lib\Lib.csproj">
<Project>{0751c83e-7845-4e5f-a5d3-e11aba393aca}</Project>
<Name>Lib</Name>

@ -1,9 +1,5 @@
using Microsoft.Kinect;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using KinectUtils;
namespace MyGesturesBank
{

@ -1,9 +1,6 @@
using Microsoft.Kinect;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using KinectUtils;
namespace MyGesturesBank
{

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LibMyGesturesBank
{
internal class RightHandUp
{
}
}

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LibMyGesturesBank
{
internal class TwoHandsDragon
{
}
}
Loading…
Cancel
Save