Re: [pygame] extending pygame masks

2009-01-05 Thread Michael George
Nirav Patel wrote: Sorry about the very long delay on this, but I finally committed Mike's convolve function and tests as revision 1796. Nirav Thanks! --Mike

Re: [pygame] extending pygame masks

2009-01-04 Thread Lenard Lindstrom
It was just that, line endings. I took care of it so no one else will be caught by surprise. Lenard Lenard Lindstrom wrote: Hi, Possibly just carriage returns. I will see what happens when I run makeref.py on a fresh checkout. Lenard Nirav Patel wrote: Lenard, I didn't make any changes

Re: [pygame] extending pygame masks

2009-01-04 Thread Lenard Lindstrom
Hi, Possibly just carriage returns. I will see what happens when I run makeref.py on a fresh checkout. Lenard Nirav Patel wrote: Lenard, I didn't make any changes, and the diffs show no changes, but for some reason, they were included in the commit anyway. Nirav On Sun, Jan 4, 2009 at 5:4

Re: [pygame] extending pygame masks

2009-01-04 Thread Nirav Patel
Lenard, I didn't make any changes, and the diffs show no changes, but for some reason, they were included in the commit anyway. Nirav On Sun, Jan 4, 2009 at 5:41 PM, Lenard Lindstrom wrote: > Hi Nirav, > > Did you make changes to locals.html, camera.html, index.html, color.html and > pixelarray

Re: [pygame] extending pygame masks

2009-01-04 Thread Lenard Lindstrom
Hi Nirav, Did you make changes to locals.html, camera.html, index.html, color.html and pixelarray.html? I ask because I almost clobbered them when I ran makeref.py after applying a patch to src\music.doc. Lenard Nirav Patel wrote: Sorry about the very long delay on this, but I finally commit

Re: [pygame] extending pygame masks

2009-01-04 Thread Nirav Patel
Sorry about the very long delay on this, but I finally committed Mike's convolve function and tests as revision 1796. Nirav On Fri, Oct 17, 2008 at 10:25 PM, Michael George wrote: > Here are the files. It turns out the actual convolution is much simpler > than the one I sent out before, since I

Re: [pygame] extending pygame masks

2008-10-17 Thread Michael George
Here are the files. It turns out the actual convolution is much simpler than the one I sent out before, since I learned about the bitmask_draw method and just use that internally. It might be slightly slower, but it's more likely to be correct. As I was coding it up, I realized I'm still not

Re: [pygame] extending pygame masks

2008-10-17 Thread Nirav Patel
You can use the diff command to generate patches, but if its easier for you, you can just upload or email the files you changed. Nirav On Fri, Oct 17, 2008 at 6:57 PM, Michael George <[EMAIL PROTECTED]> wrote: > I added a convolve function with the proposed interface, as well as docs and > a hand

Re: [pygame] extending pygame masks

2008-10-17 Thread Michael George
I added a convolve function with the proposed interface, as well as docs and a handful of unit tests. How do I generate and submit a patch? --Mike René Dudfield wrote: Sounds cool. Remember to also write unittests :) The mask module is falling behind it unittests at the moment. cheers!

Re: [pygame] extending pygame masks

2008-10-15 Thread René Dudfield
Sounds cool. Remember to also write unittests :) The mask module is falling behind it unittests at the moment. cheers! On Thu, Oct 16, 2008 at 5:40 AM, Michael George <[EMAIL PROTECTED]> wrote: > Nirav Patel wrote: >> >> It's not necessarily a good idea to have stuff that specific to an app >

Re: [pygame] extending pygame masks

2008-10-15 Thread Michael George
Nirav Patel wrote: It's not necessarily a good idea to have stuff that specific to an app in a library. I think it would be good to have the convolution function built into mask, and leave the rest of the implementation up to the user. As for how to deal with the interface for convolving, perha

Re: [pygame] extending pygame masks

2008-10-15 Thread Nirav Patel
It's not necessarily a good idea to have stuff that specific to an app in a library. I think it would be good to have the convolution function built into mask, and leave the rest of the implementation up to the user. As for how to deal with the interface for convolving, perhaps it would be useful

Re: [pygame] extending pygame masks

2008-10-15 Thread Michael George
Would it make sense for me to build this right into the Mask module and send you a patch then, or would it be better for me to develop it separately as I have been and share the source with you when it's finished so that you can put it together? I'm still not entirely sure about the interface

Re: [pygame] extending pygame masks

2008-10-14 Thread Michael George
I just realized that with a very slight modification the code I sent you could be used for sweep-based pixel-perfect collision detection. That is, by convolving a mask with a path you would have a mask that covers all of the pixels that the object touches as it traverses the path (rather than

Re: [pygame] extending pygame masks

2008-10-14 Thread Michael George
Attached. It's not integrated w/ python yet, but the tricky part is mostly done. --Mike Nirav Patel wrote: Mike Ah, very interesting. Can I see the source on that? I would love to see that included in the Mask module. Nirav On Tue, Oct 14, 2008 at 10:44 AM, Michael George <[EMAIL PROTECTE

Re: [pygame] extending pygame masks

2008-10-14 Thread Nirav Patel
Mike Ah, very interesting. Can I see the source on that? I would love to see that included in the Mask module. Nirav On Tue, Oct 14, 2008 at 10:44 AM, Michael George <[EMAIL PROTECTED]> wrote: > Thanks, > > what I need is different - I need to compute overlap_mask for each possible > offset, so

Re: [pygame] extending pygame masks

2008-10-14 Thread Michael George
Thanks, what I need is different - I need to compute overlap_mask for each possible offset, so that I can search for an optimal placement. Of course I could write a loop and call overlap_mask for each offset, but I think that would be prohibitively slow - I'm computing it all in one pass. T

Re: [pygame] extending pygame masks

2008-10-14 Thread Nirav Patel
Mike, I'm not sure if this is what you mean, but the Mask module has a function in SVN called Mask.overlap_mask, which returns a mask of the overlapping pixels between two masks by an offset. The internals of most of the bitmask stuff is exposed in bitmask.h. It could be useful to move the define

[pygame] extending pygame masks

2008-10-14 Thread Michael George
hello, I've been working on some code that generates what I've been calling a "hitmask", namely a mask with the (x,y) bit set if placing one mask on another offset by (x,y) would cause a collision. It's part of a slick algorithm I'm working on for drag-and-drop collision response. I've impl