Middleware TUIO server dll sources modified
authorbastiena
Fri, 09 Mar 2012 16:00:40 +0100
changeset 1 d3bb3934331a
parent 0 6fefd4afe506
child 2 11234537653b
Middleware TUIO server dll sources modified TUIO server dll put in Middleware lib
middleware/extern/TuioServer/TuioServer.suo
middleware/extern/TuioServer/TuioServer/Tuio.csproj
middleware/extern/TuioServer/TuioServer/TuioCursor.cs
middleware/extern/TuioServer/TuioServer/TuioServer.cs
Binary file middleware/extern/TuioServer/TuioServer.suo has changed
--- a/middleware/extern/TuioServer/TuioServer/Tuio.csproj	Fri Mar 09 14:52:11 2012 +0100
+++ b/middleware/extern/TuioServer/TuioServer/Tuio.csproj	Fri Mar 09 16:00:40 2012 +0100
@@ -34,6 +34,7 @@
     <Reference Include="Bespoke.Common.Osc">
       <HintPath>..\Libraries\Bespoke.Common.Osc\Bespoke.Common.Osc.dll</HintPath>
     </Reference>
+    <Reference Include="PresentationCore" />
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Drawing" />
--- a/middleware/extern/TuioServer/TuioServer/TuioCursor.cs	Fri Mar 09 14:52:11 2012 +0100
+++ b/middleware/extern/TuioServer/TuioServer/TuioCursor.cs	Fri Mar 09 16:00:40 2012 +0100
@@ -3,6 +3,7 @@
 using System.Drawing;
 using System.Linq;
 using System.Text;
+using System.Windows.Media.Media3D;
 
 namespace Tuio
 {
@@ -16,8 +17,8 @@
         #region properties
 
         public int Id { get; private set; }
-
-        public PointF Location { get; set; }
+		
+        public Point3D Location { get; set; }
 
         public PointF Speed { get; set; }
 
@@ -27,7 +28,7 @@
 
         #region constructors
 
-        public TuioCursor(int id, PointF location)
+        public TuioCursor(int id, Point3D location)
         {
             Id = id;
             Location = location;
--- a/middleware/extern/TuioServer/TuioServer/TuioServer.cs	Fri Mar 09 14:52:11 2012 +0100
+++ b/middleware/extern/TuioServer/TuioServer/TuioServer.cs	Fri Mar 09 16:00:40 2012 +0100
@@ -6,6 +6,7 @@
 using System.Text;
 
 using Bespoke.Common.Osc;
+using System.Windows.Media.Media3D;
 
 namespace Tuio
 {
@@ -45,7 +46,7 @@
         /// <summary>
         /// Creates a new server with and endpoint at localhost, port 3333.
         /// </summary>
-        public TuioServer() : this("127.0.0.1", 3333) { }
+        public TuioServer() : this("127.0.0.1", 80) { }
 
         /// <summary>
         /// Creates a new server.
@@ -88,7 +89,7 @@
         /// </summary>
         /// <param name="id">New id</param>
         /// <param name="location">Location</param>
-        public void AddTuioCursor(int id, PointF location)
+        public void AddTuioCursor(int id, Point3D location)
         {
             lock(_cursors)
                 if(!_cursors.ContainsKey(id))
@@ -100,7 +101,7 @@
         /// </summary>
         /// <param name="id">Id</param>
         /// <param name="location">Location</param>
-        public void UpdateTuioCursor(int id, PointF location)
+        public void UpdateTuioCursor(int id, Point3D location)
         {
             TuioCursor cursor;
             if(_cursors.TryGetValue(id, out cursor))
@@ -161,8 +162,9 @@
 
             msg.Append("set");
             msg.Append((Int32)cursor.Id);
-            msg.Append(cursor.Location.X);
-            msg.Append(cursor.Location.Y);
+            msg.Append((float)cursor.Location.X);
+            msg.Append((float)cursor.Location.Y);
+            msg.Append((float)cursor.Location.Z);
             msg.Append(cursor.Speed.X);
             msg.Append(cursor.Speed.Y);
             msg.Append(cursor.MotionAcceleration);