Perl 6 - the future is here, just unevenly distributed

IRC log for #openframeworks, 2014-04-01

| Channels | #openframeworks index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:00 husk00 joined #openframeworks
00:01 husk00 hi
00:01 husk00 I'km a beginners (coming from processing)
00:01 husk00 I got stuck in a very basic thing
00:02 husk00 maybe someone can help me
00:02 husk00 I'm following the class tutorial
00:02 husk00 I create several different ball and every thing fine
00:03 husk00 but if I try to use ofRect instead of ofCircle in the draw function
00:03 husk00 nothing is drew
00:03 husk00 I cannot get why this is happening
00:03 husk00 very frustrating
00:03 keeran are you setting the colour?
00:04 husk00 yes
00:04 husk00 setColor(255,120,120)
00:06 husk00 the weird part is if I write this update() function every thing works as expected
00:06 husk00 if(x < 0 ){ x = 0; speedX *= -1; } else if(x > ofGetWidth()){ x = ofGetWidth(); speedX *= -1; }   if(y < 0 ){ y = 0; speedY *= -1; } else if(y > ofGetHeight()){ y = ofGetHeight(); speedY *= -1; }  x+=speedX; y+=speedY;
00:06 husk00 if I write just x++; y++; in update function ofRect will be not displayed while ofCircle will be still there following my x and y
00:07 husk00 I expect to render ofRect as well and instead only ofCircle is drew
00:07 pizthewiz You probably want to gist/pastebin that code, IRC isn't great at anything more than a single line 😑
00:08 husk00 that is very weird to e
00:08 husk00 yes
00:08 husk00 :)
00:08 husk00 pizthewiz: sorry
00:08 pizthewiz If you comment out all your drawing code and just have an ofRect(…) call, does it work?
00:08 husk00 nop (if in my update I have just x++ and y++
00:08 husk00 I paste the code
00:08 husk00 wait a sec
00:08 husk00 :)
00:09 pizthewiz These two lines do nothing in your application?
00:09 pizthewiz ofSetColor(ofColor::red); ofRect(0.0f, 0.0f, 100.0f, 100.0f);
00:11 husk00 this is the working one
00:11 husk00 http://pastebin.com/GAcw3NzF
00:12 husk00 circle and rect are rendered as expected
00:12 pizthewiz Hmm, for now just eliminate all the custom-code and focus on just drawing a rect - if that works then dig into your custom code :0)
00:13 husk00 pizthewiz: still no rect in my screen
00:14 pizthewiz void testApp::draw() { ofSetColor(ofColor::red); ofRect(0.0f, 0.0f, 100.0f, 100.0f); } ?
00:15 husk00 this is the not working version: http://pastebin.com/mhMKx3bW
00:15 husk00 you can see I basically replace all the code in update() function for a simple x++ and y++
00:15 husk00 that's all the change
00:16 husk00 and now no rect
00:16 husk00 pizthewiz: nop, it doesn't work in the code I just pasted above
00:16 pizthewiz What if you don't disable filling?
00:16 husk00 white of screen
00:17 pizthewiz Just to confirm, your application's draw method has the set color and rect draw only and you see nothing?
00:18 husk00 pizthewiz: withot noFill() still nothing
00:19 husk00 in the draw testApp I recall draw method of ofball class
00:19 husk00 in draw method of ofBall class I have just ofSetColor(120,120,120); ofCircle(x, y, dim);
00:20 husk00 and  it doesn't render anything
00:23 pizthewiz I'd suggest you work backwards, verify that you can draw a rectangle in your application, then try and draw it from your ball class
00:23 pizthewiz Eliminate custom stuff, comment out all of setup and draw and just try to draw a rect and then build up from there
00:24 husk00 pizthewiz: you were right! it was the noFilling() instruction!
00:24 pizthewiz Interesting that your circle was being filled
00:24 husk00 thanks man, but why exactly is happening? I mean...it should render a lined rectangle right?
00:25 pizthewiz I don't know, you'd have to look at the default "style" it might fill rects and not stroke them
00:25 husk00 anyway, thanks a lot....I will investigate further
00:26 pizthewiz You bet, glad you got it sorted out
00:36 _pizthewiz joined #openframeworks
01:47 ilbot3 joined #openframeworks
01:47 Topic for #openframeworks is now Welcome to http://openframeworks.cc/ | logs at http://irclog.perlgeek.de/openframeworks/ 
03:34 Joel_re joined #openframeworks
03:53 cultureshock joined #openframeworks
04:14 jedahan joined #openframeworks
04:40 husk00 hallo
04:40 husk00 I added a      ofAddListener(ofEvents().mousePressed, this, &ofSnap::_mousePressed); function in my class
04:41 husk00 I use void _mousePressed(ofMouseEventArgs& eventArgs); definition in my .h file
04:41 gamemancer joined #openframeworks
04:41 husk00 now I don't know how I access the mouse event from testApp.cpp
04:42 husk00 I tyed something like mySnap[i]->_mousePressed(eventArgs.mouse);
04:42 husk00 but it gives me errorr
04:42 husk00 what is the proper way to get mouse event as arguments?
04:48 husk00 sorru for the noise
04:48 husk00 I found the documentaqtion on-line
05:28 abergmeier joined #openframeworks
06:00 abergmeier joined #openframeworks
06:26 abergmeier joined #openframeworks
07:04 ncls joined #openframeworks
08:14 ofarturo joined #openframeworks
08:44 groolot is it possible to add some pre-make command to the project Makefile, and how ?
08:44 groolot I just want to compile some POT i18n file at the same time of the compilation time
08:55 admsyn joined #openframeworks
09:02 Hurtzy joined #openframeworks
09:09 jonbro joined #openframeworks
09:29 nylki joined #openframeworks
09:43 italo joined #openframeworks
09:47 admsyn joined #openframeworks
10:00 abergmeier joined #openframeworks
10:00 groolot joined #openframeworks
10:13 neue joined #openframeworks
10:30 admsyn joined #openframeworks
11:21 moofy joined #openframeworks
11:26 nylki hm wanted to try oF 0.8.1 with ADT. no path.make.default was present. created it myself, but eclipse complains about Description Resource Path Location Type
11:26 nylki make: *** No rule to make target `../../../libs/openFrameworksCompiled/project/android/paths.make'.  Stop. openFrameworks    C/C++ Problem
11:26 moofy wocher
11:37 Joel_re joined #openframeworks
11:50 moofy joined #openframeworks
13:12 jacres joined #openframeworks
13:16 moofy joined #openframeworks
13:17 admsyn joined #openframeworks
13:23 gamemancer joined #openframeworks
13:24 _mh joined #openframeworks
14:04 groolot joined #openframeworks
14:22 admsyn joined #openframeworks
14:37 ofarturo joined #openframeworks
14:38 vade joined #openframeworks
14:40 abergmeier joined #openframeworks
14:47 jacres joined #openframeworks
15:09 Iyad joined #openframeworks
15:18 husk_ joined #openframeworks
15:19 booltox joined #openframeworks
15:20 husk_ hi all, I'm looking for an explication. Maybe someone here can help me
15:20 husk_ I'm passing (ofMouseEventArgs & mouse) args to my class function _mouseMoved
15:20 husk_ in the constructor of the class I register the listener: ofAddListener(ofEvents().mouseMoved, this, &ofSnap::_mouseMoved);
15:21 husk_ but now I don't understand how I can get it works in the testApp
15:21 husk_ I try mySnap[i]->_mouseMoved(int x, int y);
15:21 husk_ but it doesn't work
15:22 husk_ what is the correct way to call ofSnap::_mouseMoved() from the testApp?
15:22 husk_ hat are the arguments?
15:24 admsyn hi husk_
15:24 husk_ hi @admsyn
15:25 admsyn not sure I get the question, is ofSnap:: a typo?
15:25 husk_ ofSnap is my class
15:25 admsyn oh ok
15:25 husk_ _mouseMoved is a method of my class
15:25 admsyn this->_mouseMoved should work?
15:25 admsyn or just _mouseMoved()
15:25 husk_ basically I want to activate mouse events for my class
15:26 admsyn alright
15:26 admsyn they're on by default, though?
15:27 husk_ yes, I thought so, but when I trying to use it to control a over state over my instances it doesn't work as expected
15:27 husk_ I explain
15:27 admsyn they should get called by ofEvents, you wouldn't have to call them yourself unless you're being tricky
15:27 husk_ every ofSnap is a rect
15:27 husk_ I want to implement a over state (I'm a beginner coming from processing)
15:28 admsyn ah ok so you're looking for something like a function that gets called on your ofSnap whenever the mouse hovers over it?
15:28 husk_ ok, but what happen is that my over bolean is made true for all the instance at the same time
15:28 husk_ even using this (that was my first option)
15:28 husk_ yes
15:28 husk_ I'm looking for this
15:28 admsyn yeah I don't think ofEvents can do that sort of thing, might be wrong (ofarturo might know?)
15:29 admsyn but I'd think if you do a for loop in your ofApp's mouseMoved, and check if the point is inside the rect
15:29 admsyn and then go from there
15:29 husk_ I was looking at ofxMSAInteractiveObject
15:29 husk_ how it handle this
15:29 husk_ do you know this addons?
15:29 admsyn yepp
15:30 husk_ ok, so, basically it addListeners of mouse events dispacing to class::function
15:30 husk_ that is what I'm trying to do
15:30 husk_ but then I don't know how to call it from the testApp
15:30 husk_ may I paste the code in some pastebin
15:31 admsyn yeah that'd be helpful
15:31 admsyn but you wouldn't call anything from within your app, you'd just want to set up each rect as a listener, and then have it do the check itself in response to the event
15:32 admsyn (I'm kinda out of it right now so I may just be missing something :) )
15:32 husk_ can you point me to some code?
15:32 admsyn I think there's an example that does that sort of thing
15:32 admsyn customEventsExample?
15:32 * admsyn looks
15:33 admsyn yeah advancedEventsExample associates events with specific objects
15:34 husk_ I check, thanks
15:42 neue anyone know why ofXml setTo keeps telling me invalid path for paths like "pictures/picture[0]" when I've copied the example XML exactly? Even though things like getNumChildren are working
15:47 admsyn neue: not sure, is it possible that you're using different versions of ofXml?
15:47 admsyn I think XPath stuff is something that's been updated semi-recently
15:47 neue ohhhh could be that, cheers!
15:47 admsyn cool
16:04 husk_ still struggling with my class and events
16:04 husk_ I simplified every thins and I'm not using any custom events
16:05 husk_ from testApp::mousePressed()  I call myClass::_mousePressed()
16:05 husk_ the same for testApp::mouseMoved() calling myClass::_mouseMoved()
16:06 husk_ every thing seems to works (I mean I get the instance value of isOver state and isClicked)
16:06 husk_ but when I try to change the color of instance based on isOver bool variable it change the color of all instance at time+
16:07 husk_ and is just the last instance created to work on press, even ifevery instance give me back the correct id and isOver bool value
16:08 husk_ so the question is: why setColor(0) is coloring all the instances drew at screen and not just the istances from whitin is called?
16:19 ncls joined #openframeworks
16:19 cupofnestor joined #openframeworks
16:27 cupofnestor Hi, all.  I am attempting to modify Arturo and Kyle's faceSubstitution example and running in to some issues creating solid meshes to be used in place of the "mask" meshes normally provided.
16:29 gamemancer joined #openframeworks
16:31 cupofnestor I need a solid mesh, without eye or mouth holes.  I am using ofxTriangle to generate the mesh based on the FACE_OUTLINE feature.  However, when I attempt to apply the texCoords from my src image to the target mesh, the UVs are all wrong.  Meshes have the same # of triangles, but they seem to be "mirrored".
16:32 cupofnestor Here is an example:  http://imgur.com/yXdHISk
16:34 jedahan joined #openframeworks
16:41 husk_ I wrote a post in the forum in the case someone wants to have a look: http://forum.openframeworks.cc/t/why-all-the-instances-of-my-class-are-colored-at-once/15243
16:49 austinslominski joined #openframeworks
17:23 vade joined #openframeworks
17:46 austinslominski joined #openframeworks
18:01 pizthewiz joined #openframeworks
18:05 GuidovanPossum joined #openframeworks
18:05 vade joined #openframeworks
18:22 nylki_ joined #openframeworks
18:38 laserpilot joined #openframeworks
18:39 laserpilot anyone on here worked with core image units or quartzcore in OF?
18:41 pizthewiz Not I, while I've used both, I haven't with oF
18:43 laserpilot http://bathatmedia.blogspot.com/2013/08/using-coreimage-filters-in.html#comment-form
18:43 laserpilot im trying to get this goin' but im just not linking something properly
18:44 laserpilot it's telling me "NSOpenGLPixelFormatAttribute" is an unknown type, but thats in AppKit which is included in regular of builds
18:46 pizthewiz Hmm, is the file being compiled Objective-C++?
18:47 pizthewiz Interesting that that is the first AppKit symbol referenced in that file
18:47 ofarturo joined #openframeworks
18:48 laserpilot i just did project generator and changed to main.mm and ofApp.mm and ofApp.h
19:02 muralia joined #openframeworks
19:07 vade joined #openframeworks
19:08 cupofnestor joined #openframeworks
19:13 nylki_ joined #openframeworks
19:15 muralia left #openframeworks
19:37 nylki_ joined #openframeworks
19:46 groolot joined #openframeworks
19:57 GuidovanPossum joined #openframeworks
21:32 pizthewiz joined #openframeworks
22:04 austinslominski joined #openframeworks
22:08 OliverUv joined #openframeworks
23:28 DrCode joined #openframeworks

| Channels | #openframeworks index | Today | | Search | Google Search | Plain-Text | summary