| Author |
Message |
|
|
smallfly
|
Posted: Mon Nov 23, 2009 2:10 pm |
|
|
Joined: Fri Mar 02, 2007 12:13 amPosts: 122Location: Montreal |
Your example is perfect. My post was not clear at all. Here is what I'm trying to do: 1- Using 'myMtButton' testApp.h Code: vector <myMtButton> fiducialSelectorsButton;
testApp.cpp Code: //-------------------------------------------------------------- void testApp::addSelector(int symbolID, float _x, float _y, float _angle){ //button myMtButton newMTButton; newMTButton.setPos(50, 50); newMTButton.setSize(100, 100); newMTButton.registerForMultitouchEvents();
fiducialSelectorsButton.push_back(newMTButton); }
I use the TUIOSimulator. The function addSelector is called when a fiducial is added to the 'system'... and it's working. But as soon as I simulate a finger, the app crashes. I get this error Code: [Switching to process 7203] Program received signal: “EXC_BAD_ACCESS”. [Switching to process 7203] No memory available to program now: unsafe to call malloc Data Formatters temporarily unavailable, will re-try after a 'continue'. (Not safe to call dlopen at this time.) Cannot access memory at address 0x8408e7d Cannot access memory at address 0x8408e7d
2- Using 'myMtEventButton' Exactly the same code but with 'myMtEventButton'. The project don't compile. I get the following error. Code: ../../../libs/poco/include/Poco/FIFOEvent.h:82:0 ../../../libs/poco/include/Poco/FIFOEvent.h:82: error: 'Poco::FIFOEvent<TArgs>::FIFOEvent(const Poco::FIFOEvent<TArgs>&) [with TArgs = ofEventArgs]' is private
|
|
Top
|
|
|
smallfly
|
Posted: Mon Nov 23, 2009 4:10 pm |
|
|
Joined: Fri Mar 02, 2007 12:13 amPosts: 122Location: Montreal |
ok, I solved my stupid problem. Sorry about that. Code: //-------------------------------------------------------------- void testApp::addSelector(int symbolID, float _x, float _y, float _angle){ //button myMtButton * newMTButton = new myMtButton(); newMTButton->setPos(50, 50); newMTButton->setSize(100, 100); newMTButton->registerForMultitouchEvents();
fiducialSelectorsButton->push_back(newMTButton); }
|
|
Top
|
|
|
Dazzid
|
Posted: Mon Dec 21, 2009 12:00 pm |
|
|
| Joined: Sat Jul 25, 2009 2:23 pmPosts: 6 |
Hi, I need a little help compiling the examples (ofxTuioServer). I’m using the oscReceiverExample to create the Xcode project in OF-006. When I try to compile a have errors like this:
OscReceivedElements.h: No such file or directory osc/OscPrintReceivedElements.h: No such file or directory ip/UdpSocket.h: No such file or directory ip/PacketListener.h: No such file or directory expected namespace-name before ';' token
But i have the ofxOsc already in my addons carpet. What I’m missing? Thanks for the help D.
|
|
Top
|
|
|
arturo
|
Posted: Tue Dec 22, 2009 12:34 pm |
|
|
| Site AdminJoined: Wed Apr 11, 2007 1:02 amPosts: 1192Location: barcelona |
TuioCpp includes osc files like: Code: #include "osc/something.h" while ofxOsc includes them like: Code: #include "something.h" this means that the options for the project need a compiler search path pointing to: Code: ../../../addons/ofxOsc/libs/oscpack/include while in the ofxOsc example it's set to: Code: ../../../addons/ofxOsc/libs/oscpack/include/osc ../../../addons/ofxOsc/libs/oscpack/include/ip
if you're in mac os x, there's no search paths in the settings except for poco since xcode does that automatically for every directory that has a .h file in it.
|
|
Top
|
|
|
Dazzid
|
Posted: Tue Dec 22, 2009 9:04 pm |
|
|
| Joined: Sat Jul 25, 2009 2:23 pmPosts: 6 |
Hi Arturo, Thanks for the help, now the compiler is running better without this error that I had with osc. Now I just need help with the last error, now the compiler doesn’t find a library called libfmodex (lfmodex). Why is this error happening?
cp: /OpenFrameworks 006/apps/addonsExamples/ofxMultiTouch/bin//openFrameworks.app/Contents/MacOS/libfmodex.dylib: No such file or directory
Thanks a lot for the help, D.
|
|
Top
|
|
|
Dazzid
|
Posted: Thu Dec 24, 2009 11:41 am |
|
|
| Joined: Sat Jul 25, 2009 2:23 pmPosts: 6 |
Hi, I re-built the Xcode project and now it’s working, thanks a lot for the help. I really like this example! D.
|
|
Top
|
|
|
jhochenbaum
|
Posted: Thu Jan 21, 2010 6:44 am |
|
|
| Joined: Thu Jan 21, 2010 6:36 amPosts: 9 |
Thanks a lot for ofxTuioWrapper, looks great! I was playing around with the example code, and was trying to make the myMTButton class draggable. I noticed thats where the random x and y location were being set onMultiTouchUp, so I figured I could just do the following to make it draggble: Code: void onMultiTouchMoved(float x, float y, int touchId, ofxMultiTouchCustomData *data = NULL) { this->x = x; this->y = y; }; I played around for a long while with other ways but couldn't get it working. Is there something I'm missing? Thanks for your help, J
|
|
Top
|
|
|
moka
|
Posted: Thu Jan 21, 2010 8:24 am |
|
|
| Joined: Mon Jun 02, 2008 8:24 pmPosts: 409Location: Kiel - Germany |
smallfly provided some code to make it dragable.- I didnt have the time to put it into the official release though, but you can ask him!
|
|
Top
|
|
|
jhochenbaum
|
Posted: Thu Jan 21, 2010 8:53 am |
|
|
| Joined: Thu Jan 21, 2010 6:36 amPosts: 9 |
thanks moka, appreciate the help.
cheers
|
|
Top
|
|
|
smallfly
|
Posted: Sat Jan 23, 2010 4:58 pm |
|
|
Joined: Fri Mar 02, 2007 12:13 amPosts: 122Location: Montreal |
I need to make some changes and additions to 'my' code and to put together an example. I hope to have this done by the end of next week (maybe sooner). I will then drop it here.
|
|
Top
|
|
|
jhochenbaum
|
Posted: Wed Feb 03, 2010 12:39 am |
|
|
| Joined: Thu Jan 21, 2010 6:36 amPosts: 9 |
Great, look forward to seeing how you went about doing the draggable!
br, Jordan
|
|
Top
|
|
|
smallfly
|
Posted: Mon Feb 08, 2010 4:20 am |
|
|
Joined: Fri Mar 02, 2007 12:13 amPosts: 122Location: Montreal |
Hi, I finally found the time to come back to this. ofxMultiTouchActions allows to create objects that react to common multitouch actions (drag, scale and rotate). Objects can be assigned to 'listen' to any combination of mt actions (i.e. some objects can be only draggable, while others can be rotatable and scable, etc... ). Actions can also be assigned to be triggered by any specific number of fingers (i.e. draggable by 4 fingers instead of one and rotatable with 3 fingers instead of two, etc..) see a demo video of the example running on my multitouch setup here: http://www.vimeo.com/9284786get ofxMultiTouchActions here: http://code.google.com/p/smallfly/downloads/listTo run the example you need to have the following addons ofxMultiTouchObject , ofxTuioWrapper, ofxMSAInteractiveObject and ofxMultiTouch. [Thanks to Moka and Memo for those addons] To test it you can use the tuio simulator - http://reactable.iua.upf.edu/?softwareSome of the classes are based on code shared by Marek [Thanks !] It's not finished, there is maybe bugs and certainly a lot of room for improvement  -h
|
|
Top
|
|
|
moka
|
Posted: Mon Feb 08, 2010 1:40 pm |
|
|
| Joined: Mon Jun 02, 2008 8:24 pmPosts: 409Location: Kiel - Germany |
thats nice! I think we should put everything together in one package soon, and also base it on the multitouch functions which are included in the newest OF realease by default. Unfortunatelly I don't really have time for it right now, so if anybody feels like doing it, go ahead  !
|
|
Top
|
|
|
memo
|
Posted: Mon Feb 08, 2010 3:00 pm |
|
|
Joined: Tue May 27, 2008 10:03 amPosts: 691Location: London, UK |
yea definitely this sounds great. As of current version of openframeworks on git (post 0061) there are multitouch events in ofcore. You can see example code (look at the iphone examples) at http://github.com/memo/openframeworksso in short ofxMultitouch is becoming obsolete and it would be good to phase all multitouch related stuff into the core of events.
|
|
Top
|
|
|
smallfly
|
Posted: Tue Feb 09, 2010 2:47 am |
|
|
Joined: Fri Mar 02, 2007 12:13 amPosts: 122Location: Montreal |
Yes merging some of the addons would be a good thing. What are you thinking ?
I haven't look to the 0061 yet. If ofxMultitouch is obsolete now, does that mean that we would end up with a new ofxMultiTouch (a merge of ofxMultiTouchObject and ofxMultiTouchActions and maybe some of the extra stuff in ofxMultitouch), ofxMSAInteractiveObject and ofxTuioWrapper ?
I can start to look into this. But I'm not sure when I will have time to complete it. Any advices before starting would be good.
Cheers
|
|
Top
|
|
|
|