Skip to content

Commit f216001

Browse files
committed
Added TUIOsharp and OSCsharp submodules.
1 parent f6876c1 commit f216001

14 files changed

Lines changed: 32 additions & 50 deletions

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "TUIOsharp"]
2+
path = TUIOsharp
3+
url = https://github.com/valyard/TUIOsharp.git

TUIOsharp

Submodule TUIOsharp added at 1fb24c8

TouchScript.sln

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ Microsoft Visual Studio Solution File, Format Version 11.00
33
# Visual Studio 2010
44
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TouchScript", "TouchScript\TouchScript.csproj", "{128FD14A-9D70-4B07-8F9A-E85A511BA28B}"
55
EndProject
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OSCsharp", "TUIOsharp\OSCsharp\OSCsharp.csproj", "{0ADB210D-0D25-4576-8868-9C47DC4762BE}"
7+
EndProject
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TUIOsharp", "TUIOsharp\TUIOsharp\TUIOsharp.csproj", "{6080AD8B-8ACD-4C0E-ABAD-26DB043E202B}"
9+
EndProject
610
Global
711
GlobalSection(SolutionConfigurationPlatforms) = preSolution
812
Debug|Any CPU = Debug|Any CPU
@@ -13,6 +17,14 @@ Global
1317
{128FD14A-9D70-4B07-8F9A-E85A511BA28B}.Debug|Any CPU.Build.0 = Debug|Any CPU
1418
{128FD14A-9D70-4B07-8F9A-E85A511BA28B}.Release|Any CPU.ActiveCfg = Release|Any CPU
1519
{128FD14A-9D70-4B07-8F9A-E85A511BA28B}.Release|Any CPU.Build.0 = Release|Any CPU
20+
{0ADB210D-0D25-4576-8868-9C47DC4762BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{0ADB210D-0D25-4576-8868-9C47DC4762BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{0ADB210D-0D25-4576-8868-9C47DC4762BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{0ADB210D-0D25-4576-8868-9C47DC4762BE}.Release|Any CPU.Build.0 = Release|Any CPU
24+
{6080AD8B-8ACD-4C0E-ABAD-26DB043E202B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
25+
{6080AD8B-8ACD-4C0E-ABAD-26DB043E202B}.Debug|Any CPU.Build.0 = Debug|Any CPU
26+
{6080AD8B-8ACD-4C0E-ABAD-26DB043E202B}.Release|Any CPU.ActiveCfg = Release|Any CPU
27+
{6080AD8B-8ACD-4C0E-ABAD-26DB043E202B}.Release|Any CPU.Build.0 = Release|Any CPU
1628
EndGlobalSection
1729
GlobalSection(SolutionProperties) = preSolution
1830
HideSolutionNode = FALSE

TouchScript/InputSources/TuioInput.cs

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,10 @@ public class TuioInput : InputSource {
2828
/// Handles touches disappearing and reappearing again in short period of time.
2929
/// </summary>
3030
//public bool PreventTouchFlicker = true;
31-
3231
/// <summary>
3332
/// Maximum distance in cm for a new touch to be considered as disappeared old touch.
3433
/// </summary>
3534
//public float TouchFlickerDistance = 0.5f;
36-
3735
/// <summary>
3836
/// Maximum time in seconds while touch is considered to be still alive.
3937
/// </summary>
@@ -42,11 +40,10 @@ public class TuioInput : InputSource {
4240
#endregion
4341

4442
#region Private variables
45-
46-
private TUIOServer server;
43+
private TuioServer server;
4744

4845
private readonly object sync = new object();
49-
private readonly Dictionary<TUIOCursor, int> cursorToInternalId = new Dictionary<TUIOCursor, int>();
46+
private readonly Dictionary<TuioCursor, int> cursorToInternalId = new Dictionary<TuioCursor, int>();
5047

5148
#endregion
5249

@@ -55,13 +52,11 @@ public class TuioInput : InputSource {
5552
protected override void Start() {
5653
base.Start();
5754

58-
server = new TUIOServer();
55+
server = new TuioServer();
5956
server.CursorAdded += OnCursorAdded;
6057
server.CursorUpdated += OnCursorUpdated;
6158
server.CursorRemoved += OnCursorRemoved;
6259
server.Connect();
63-
64-
updateServerProperties();
6560
}
6661

6762
protected override void Update() {
@@ -83,18 +78,11 @@ protected override void OnDestroy() {
8378
#endregion
8479

8580
#region Private functions
86-
87-
private void updateServerProperties() {
88-
server.PreventTouchFlicker = false;// PreventTouchFlicker;
89-
//server.TouchFlickerDistance = TouchFlickerDistance*TouchManager.Instance.DotsPerCentimeter/ScreenWidth;
90-
//server.TouchFlickerDelay = TouchFlickerDelay;
91-
}
92-
9381
#endregion
9482

9583
#region Event handlers
9684

97-
private void OnCursorAdded(object sender, TUIOCursorEventArgs tuioCursorEventArgs) {
85+
private void OnCursorAdded(object sender, TuioCursorEventArgs tuioCursorEventArgs) {
9886
var cursor = tuioCursorEventArgs.Cursor;
9987
lock (sync) {
10088
var x = cursor.X*ScreenWidth;
@@ -103,7 +91,7 @@ private void OnCursorAdded(object sender, TUIOCursorEventArgs tuioCursorEventArg
10391
}
10492
}
10593

106-
private void OnCursorUpdated(object sender, TUIOCursorEventArgs tuioCursorEventArgs) {
94+
private void OnCursorUpdated(object sender, TuioCursorEventArgs tuioCursorEventArgs) {
10795
var cursor = tuioCursorEventArgs.Cursor;
10896
lock (sync) {
10997
int existingCursor;
@@ -116,7 +104,7 @@ private void OnCursorUpdated(object sender, TUIOCursorEventArgs tuioCursorEventA
116104
}
117105
}
118106

119-
private void OnCursorRemoved(object sender, TUIOCursorEventArgs tuioCursorEventArgs) {
107+
private void OnCursorRemoved(object sender, TuioCursorEventArgs tuioCursorEventArgs) {
120108
var cursor = tuioCursorEventArgs.Cursor;
121109
lock (sync) {
122110
int existingCursor;

TouchScript/TouchScript.csproj

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@
3535
<Reference Include="System" />
3636
<Reference Include="System.Core" />
3737
<Reference Include="System.Xml" />
38-
<Reference Include="TUIOSharp">
39-
<HintPath>..\Lib\TUIOSharp.dll</HintPath>
40-
</Reference>
4138
<Reference Include="UnityEngine">
4239
<HintPath>..\Lib\UnityEngine.dll</HintPath>
4340
<Private>False</Private>
@@ -75,7 +72,16 @@
7572
<Compile Include="TouchOptions.cs" />
7673
<Compile Include="TouchPoint.cs" />
7774
</ItemGroup>
78-
<ItemGroup />
75+
<ItemGroup>
76+
<ProjectReference Include="..\TUIOsharp\OSCsharp\OSCsharp.csproj">
77+
<Project>{0ADB210D-0D25-4576-8868-9C47DC4762BE}</Project>
78+
<Name>OSCsharp</Name>
79+
</ProjectReference>
80+
<ProjectReference Include="..\TUIOsharp\TUIOsharp\TUIOsharp.csproj">
81+
<Project>{6080AD8B-8ACD-4C0E-ABAD-26DB043E202B}</Project>
82+
<Name>TUIOsharp</Name>
83+
</ProjectReference>
84+
</ItemGroup>
7985
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
8086
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
8187
Other similar extension points exist, see Microsoft.Common.targets.
-21 KB
Binary file not shown.

UnityTest/Assets/TouchScript/Plugins/Bespoke.Common.Osc.dll.meta

Lines changed: 0 additions & 6 deletions
This file was deleted.
-39.5 KB
Binary file not shown.

UnityTest/Assets/TouchScript/Plugins/Bespoke.Common.dll.meta

Lines changed: 0 additions & 6 deletions
This file was deleted.
36.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)