1 of 10
1
WPF Multitouch Framework
Posted: 19 May 2008 09:53 AM   [ Ignore ]
Rank
Joined  2008-03-19
Total Posts:  20
New Member

The past view months we have worked on a WPF Multitouch Framework based on the TUIO protocol.

We would like to invite you to download this easy to use framework, try some things and share your
experience with us.

We have included a quick start guide and a demonstration application.

It is nessacary to use Visual Studio 2008 and the .Net Framework 3.5.
We also used Microsoft Expression Blend, but that isn’t specially needed.

Soon we will add a quickstart video on youtube so you can see how everything works.

This is a beta version so not al code is already optimized, and some writelines have to be deleted.

Good luck with the framework and we hope to hear from you soon!

Edit:
We have made a google code project: http://code.google.com/p/multitouchframework/
At this page a SVN checkout is available and you can see an introduction video about our framework.

Edit 2 (06-06-2008):
We have made an real time demonstration of our framework!

First we show you the “scatterview” , then a short demo of some multitouch controls and at the end
we demonstrate an example of a control room

Edit 3 (11-6-2008)
New version online with improved scale and rotate, the possibility to show the position of your fingers and some bug fixes!

File Attachments
MultiTouchable Framework.zip  (File Size: 1620KB - Downloads: 2114)
Profile
 
 
Posted: 19 May 2008 10:07 AM   [ Ignore ]   [ # 1 ]
Avatar
RankRank
Joined  2008-01-28
Total Posts:  124
Member

thnx ... will try it soon .....

Profile
 
 
Posted: 19 May 2008 11:09 AM   [ Ignore ]   [ # 2 ]
Avatar
RankRank
Joined  2007-08-19
Total Posts:  212
Member

thanx JURBO.

gonna try it as soon as i get home....
cool smile

 Signature 

"And crawling on the planets face. Some insects called the human race.
Lost in time, And lost in space and meaning… “

Profile
 
 
Posted: 20 May 2008 02:21 AM   [ Ignore ]   [ # 3 ]
Rank
Joined  2008-03-19
Total Posts:  20
New Member

Thanks for your reactions!

I have noticed that the multitouch controls have to be added to the toolbox by yourself.
You can use the MTControls library in the debug directory (WPF Components), so you can use the
desinger to add controls.

Jurbo

Profile
 
 
Posted: 20 May 2008 03:06 AM   [ Ignore ]   [ # 4 ]
Rank
Joined  2008-05-14
Total Posts:  25
New Member

hey there, i really like the work your doing here.  There is just one thing i need to ask you, is it possible to display or hightlight the finger positions?? I’m struggling to find my fingers on a form.

Thanks very much! I like the controls.

Profile
 
 
Posted: 20 May 2008 03:17 AM   [ Ignore ]   [ # 5 ]
Rank
Joined  2008-03-19
Total Posts:  20
New Member

When you are simulating input with a mouse a black ellipse appears, but most of the time this is behind the object.
You can (temporary) solve this problem by creating an ellipse by yourself and set the position in the fingermoved or fingerdown event.

I am going to change this and upload a.s.a.p. a new version with this problem solved.

Profile
 
 
Posted: 20 May 2008 03:33 AM   [ Ignore ]   [ # 6 ]
Rank
Joined  2008-03-19
Total Posts:  20
New Member

In simulation mode it is now possible to see where the fingers are touching the surface (black ellipse).
Use the left en right mouse button to simulate input.

File Attachments
WPF MTFramework.zip  (File Size: 1448KB - Downloads: 1319)
Profile
 
 
Posted: 20 May 2008 03:36 AM   [ Ignore ]   [ # 7 ]
Rank
Joined  2008-05-14
Total Posts:  25
New Member

i don’t want to place my fingers using the mouse i want it when i touch the surface there will be an ellipse on the form representing the location of my fingers? must that just be done manually by placing ellipses??

Thanks for the framework

Profile
 
 
Posted: 20 May 2008 03:49 AM   [ Ignore ]   [ # 8 ]
Rank
Joined  2008-05-14
Total Posts:  25
New Member

If i try and add an ellipse in the FingerMoved event then i get this error

The calling thread must be STA, because many UI components require this.

here is my code

Ellipse el = new Ellipse();
            
el.Width 20;
            
el.Height 20;
            
MTCanvas.SetLeft(elobj.Finger.X);
            
MTCanvas.SetTop(elobj.Finger.Y);
            
this.mTCanvas1.Children.Add(el);

Profile
 
 
Posted: 20 May 2008 04:55 AM   [ Ignore ]   [ # 9 ]
Rank
Joined  2008-03-19
Total Posts:  20
New Member

I have tried to add this to the framework but it generates some problems (with visualhit and so on).
The code you use is correct but you have to add this to let it work properly:
Add into the constructor:

ellipseHash = new Hashtable();//Dont forget to define it
_processing.FingerMoved += new TouchLibEvents.TuioMoveFingerHandler(_processing_FingerMoved);
_processing.FingerNew += new TouchLibEvents.TuioNewFingerHandler(_processing_FingerNew);
_processing.FingerRemoved += new TouchLibEvents.TuioRemoveFingerHandler(_processing_FingerRemoved);

Add to the methods:

void _processing_FingerRemoved(object senderTouchLibEvents.TuioRemoveFingerEventArgs obj)
        
{
            mTCanvas1
.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Input, (Action)delegate()
            
{
                this
.mTCanvas1.Children.Remove((UIElement)this.ellipseHash[obj.Id]);
                
this.ellipseHash.Remove(obj.Id);
            
});
        
}

        void _processing_FingerNew
(object senderTouchLibEvents.TuioNewFingerEventArgs obj)
        
{
            mTCanvas1
.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Input, (Action)delegate()
            
{
                Ellipse el 
= new Ellipse();
                
el.Width 20;
                
el.Height 20;
                
el.Fill = new SolidColorBrush(Colors.Black);
                
this.mTCanvas1.Children.Add(el);
                
this.ellipseHash.Add(obj.Id,el);
                
MTCanvas.SetZIndex(el26);
            
});
        
}

        void _processing_FingerMoved
(object senderTouchLibEvents.TuioMoveFingerEventArgs obj)
        
{
            mTCanvas1
.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Input, (Action)delegate()
            
{
                MTCanvas
.SetLeft((UIElement)ellipseHash[obj.Finger.Id]obj.Finger.position.SystemParameters.PrimaryScreenWidth);
                
MTCanvas.SetTop((UIElement)ellipseHash[obj.Finger.Id]obj.Finger.position.SystemParameters.PrimaryScreenHeight);
            
});
        
}

The position of your fingers is now clear, but everything is not working too well.. So it is better to skip this code.

Why do you want to see the position of your fingers?

Profile
 
 
Posted: 20 May 2008 05:25 AM   [ Ignore ]   [ # 10 ]
Rank
Joined  2008-05-14
Total Posts:  25
New Member

my fingers are not being positioned properly.. and what better than to test with a proper program.. so that is the main reason.

I copy and pasted all of the code required and added the definition for HashTable ellipseHash..

But now i get this

Exception has been thrown by the target of an invocation.

I guess it is just not meant to draw the circles for me smile haha

Okay, i traced the code and i think the problem is occuring because the FingerMoved methods seems to be called before the FingerNew, so it does not seem to be create a finger ellipse but moved is trying to access an Ellipse that does not exist in the hashtable.. Any idea’s why FingerNew would not be called?

This should be my final edit.. smile
I fixed that with a simple if statement, so now it works but i see what you mean nothing seems to work properly otherwise. you can’t click the buttons or you can draw images or resize them, that is quote strange but now i can see where my fingers are supposed to be rasberry

Profile
 
 
Posted: 20 May 2008 06:22 AM   [ Ignore ]   [ # 11 ]
Rank
Joined  2008-03-19
Total Posts:  20
New Member

I will check why the newfinger raises later than the fingermoved…

The problems occurs because of the Hittest method. This method applies with help of the visualtreehelper a hittest and returns an object.
But when an ellipse is drawn under your fingers the hittest will return that ellipse what isn’t the right object. Thats why you can’t move the images and other objects.

Try to move your fingers fast than it its possible to hit the right objectswink

I will try to change the hittest method so we can solve this problem.

What kind of MT Table do you use?

Profile
 
 
Posted: 20 May 2008 07:09 PM   [ Ignore ]   [ # 12 ]
RankRank
Joined  2007-06-06
Total Posts:  157
Member
Jurbo - 20 May 2008 06:22 AM

I will check why the newfinger raises later than the fingermoved…

The problems occurs because of the Hittest method. This method applies with help of the visualtreehelper a hittest and returns an object.
But when an ellipse is drawn under your fingers the hittest will return that ellipse what isn’t the right object. Thats why you can’t move the images and other objects.

Try to move your fingers fast than it its possible to hit the right objectswink

I will try to change the hittest method so we can solve this problem.

What kind of MT Table do you use?

Why not use adorners for the touch highlighting?

Profile
 
 
Posted: 21 May 2008 02:16 AM   [ Ignore ]   [ # 13 ]
Rank
Joined  2008-03-19
Total Posts:  20
New Member

We already use adorners, but we use them to show what object has been hit, and not to visualise the position of the fingers.

I will try to add it to the framework

Profile
 
 
Posted: 22 May 2008 10:22 AM   [ Ignore ]   [ # 14 ]
RankRank
Joined  2008-05-16
Total Posts:  117
Member

Jurbo: Do you have a website or vid that shows the features / screenshots and control set of your framework? It would be very nice for those who do not have the necessary hardware and software required to try out the framework for ourselves.

Profile
 
 
Posted: 23 May 2008 06:35 AM   [ Ignore ]   [ # 15 ]
Rank
Joined  2008-03-19
Total Posts:  20
New Member

We have made a google code project with all the info of our framework.
http://code.google.com/p/multitouchframework/

At the wiki tab you can find a link to the introduction video of the framework.
In the video we will explain how the framework can be used, and do some demonstration.

Profile
 
 
   
1 of 10
1